00001
00002
00003 package ros.pkg.geometry_msgs.msg;
00004
00005 import java.nio.ByteBuffer;
00006
00007 public class Polygon extends ros.communication.Message {
00008
00009 public java.util.ArrayList<ros.pkg.geometry_msgs.msg.Point32> points = new java.util.ArrayList<ros.pkg.geometry_msgs.msg.Point32>();
00010
00011 public Polygon() {
00012 }
00013
00014 public static java.lang.String __s_getDataType() { return "geometry_msgs/Polygon"; }
00015 public java.lang.String getDataType() { return __s_getDataType(); }
00016 public static java.lang.String __s_getMD5Sum() { return "cd60a26494a087f577976f0329fa120e"; }
00017 public java.lang.String getMD5Sum() { return __s_getMD5Sum(); }
00018 public static java.lang.String __s_getMessageDefinition() { return "#A specification of a polygon where the first and last points are assumed to be connected\n" +
00019 "geometry_msgs/Point32[] points\n" +
00020 "\n" +
00021 "================================================================================\n" +
00022 "MSG: geometry_msgs/Point32\n" +
00023 "# This contains the position of a point in free space(with 32 bits of precision).\n" +
00024 "# It is recommeded to use Point wherever possible instead of Point32. \n" +
00025 "# \n" +
00026 "# This recommendation is to promote interoperability. \n" +
00027 "#\n" +
00028 "# This message is designed to take up less space when sending\n" +
00029 "# lots of points at once, as in the case of a PointCloud. \n" +
00030 "\n" +
00031 "float32 x\n" +
00032 "float32 y\n" +
00033 "float32 z\n" +
00034 ""; }
00035 public java.lang.String getMessageDefinition() { return __s_getMessageDefinition(); }
00036
00037 public Polygon clone() {
00038 Polygon c = new Polygon();
00039 c.deserialize(serialize(0));
00040 return c;
00041 }
00042
00043 public void setTo(ros.communication.Message m) {
00044 deserialize(m.serialize(0));
00045 }
00046
00047 public int serializationLength() {
00048 int __l = 0;
00049 __l += 4;
00050 for(ros.pkg.geometry_msgs.msg.Point32 val : points) {
00051 __l += val.serializationLength();
00052 }
00053 return __l;
00054 }
00055
00056 public void serialize(ByteBuffer bb, int seq) {
00057 bb.putInt(points.size());
00058 for(ros.pkg.geometry_msgs.msg.Point32 val : points) {
00059 val.serialize(bb, seq);
00060 }
00061 }
00062
00063 public void deserialize(ByteBuffer bb) {
00064
00065 int __points_len = bb.getInt();
00066 points = new java.util.ArrayList<ros.pkg.geometry_msgs.msg.Point32>(__points_len);
00067 for(int __i=0; __i<__points_len; __i++) {
00068 ros.pkg.geometry_msgs.msg.Point32 __tmp = new ros.pkg.geometry_msgs.msg.Point32();
00069 __tmp.deserialize(bb);
00070 points.add(__tmp);;
00071 }
00072 }
00073
00074 @SuppressWarnings("all")
00075 public boolean equals(Object o) {
00076 if(!(o instanceof Polygon))
00077 return false;
00078 Polygon other = (Polygon) o;
00079 return
00080 points.equals(other.points) &&
00081 true;
00082 }
00083
00084 @SuppressWarnings("all")
00085 public int hashCode() {
00086 final int prime = 31;
00087 int result = 1;
00088 long tmp;
00089 result = prime * result + (this.points == null ? 0 : this.points.hashCode());
00090 return result;
00091 }
00092 }
00093