00001
00002
00003 package ros.pkg.geometry_msgs.msg;
00004
00005 import java.nio.ByteBuffer;
00006
00007 public class Quaternion extends ros.communication.Message {
00008
00009 public double x;
00010 public double y;
00011 public double z;
00012 public double w;
00013
00014 public Quaternion() {
00015 }
00016
00017 public static java.lang.String __s_getDataType() { return "geometry_msgs/Quaternion"; }
00018 public java.lang.String getDataType() { return __s_getDataType(); }
00019 public static java.lang.String __s_getMD5Sum() { return "a779879fadf0160734f906b8c19c7004"; }
00020 public java.lang.String getMD5Sum() { return __s_getMD5Sum(); }
00021 public static java.lang.String __s_getMessageDefinition() { return "# This represents an orientation in free space in quaternion form.\n" +
00022 "\n" +
00023 "float64 x\n" +
00024 "float64 y\n" +
00025 "float64 z\n" +
00026 "float64 w\n" +
00027 "\n" +
00028 ""; }
00029 public java.lang.String getMessageDefinition() { return __s_getMessageDefinition(); }
00030
00031 public Quaternion clone() {
00032 Quaternion c = new Quaternion();
00033 c.deserialize(serialize(0));
00034 return c;
00035 }
00036
00037 public void setTo(ros.communication.Message m) {
00038 deserialize(m.serialize(0));
00039 }
00040
00041 public int serializationLength() {
00042 int __l = 0;
00043 __l += 8;
00044 __l += 8;
00045 __l += 8;
00046 __l += 8;
00047 return __l;
00048 }
00049
00050 public void serialize(ByteBuffer bb, int seq) {
00051 bb.putDouble(x);
00052 bb.putDouble(y);
00053 bb.putDouble(z);
00054 bb.putDouble(w);
00055 }
00056
00057 public void deserialize(ByteBuffer bb) {
00058 x = bb.getDouble();
00059 y = bb.getDouble();
00060 z = bb.getDouble();
00061 w = bb.getDouble();
00062 }
00063
00064 @SuppressWarnings("all")
00065 public boolean equals(Object o) {
00066 if(!(o instanceof Quaternion))
00067 return false;
00068 Quaternion other = (Quaternion) o;
00069 return
00070 x == other.x &&
00071 y == other.y &&
00072 z == other.z &&
00073 w == other.w &&
00074 true;
00075 }
00076
00077 @SuppressWarnings("all")
00078 public int hashCode() {
00079 final int prime = 31;
00080 int result = 1;
00081 long tmp;
00082 result = prime * result + (int)((tmp = Double.doubleToLongBits(this.x)) ^ (tmp >>> 32));
00083 result = prime * result + (int)((tmp = Double.doubleToLongBits(this.y)) ^ (tmp >>> 32));
00084 result = prime * result + (int)((tmp = Double.doubleToLongBits(this.z)) ^ (tmp >>> 32));
00085 result = prime * result + (int)((tmp = Double.doubleToLongBits(this.w)) ^ (tmp >>> 32));
00086 return result;
00087 }
00088 }
00089