// Autogenerated C# message buffer code. // Source: clad/gateway/shared.clad // Full command line: victor-clad/tools/message-buffers/emitters/CSharp_emitter.py -C src -I clad/src lib/util/source/anki/clad robot/clad/src coretech/vision/clad_src coretech/common/clad_src -o generated/cladCSharp clad/gateway/shared.clad namespace Anki { namespace Vector { namespace Gateway { public partial class PoseStruct3d { private float _x; // float_32 private float _y; // float_32 private float _z; // float_32 private float _q0; // float_32 private float _q1; // float_32 private float _q2; // float_32 private float _q3; // float_32 private uint _originID; // uint_32 public float x { get { return _x; } set { _x = value; } } public float y { get { return _y; } set { _y = value; } } public float z { get { return _z; } set { _z = value; } } public float q0 { get { return _q0; } set { _q0 = value; } } public float q1 { get { return _q1; } set { _q1 = value; } } public float q2 { get { return _q2; } set { _q2 = value; } } public float q3 { get { return _q3; } set { _q3 = value; } } public uint originID { get { return _originID; } set { _originID = value; } } /**** Constructors ****/ public PoseStruct3d() { } public PoseStruct3d(float x, float y, float z, float q0, float q1, float q2, float q3, uint originID) { this.x = x; this.y = y; this.z = z; this.q0 = q0; this.q1 = q1; this.q2 = q2; this.q3 = q3; this.originID = originID; } public PoseStruct3d(System.IO.Stream stream) { Unpack(stream); } public PoseStruct3d(System.IO.BinaryReader reader) { Unpack(reader); } public PoseStruct3d Initialize(float x, float y, float z, float q0, float q1, float q2, float q3, uint originID) { this.x = x; this.y = y; this.z = z; this.q0 = q0; this.q1 = q1; this.q2 = q2; this.q3 = q3; this.originID = originID; return this; } public void Unpack(System.IO.Stream stream) { System.IO.BinaryReader reader = new System.IO.BinaryReader(stream); Unpack(reader); } public void Unpack(System.IO.BinaryReader reader) { _x = reader.ReadSingle(); _y = reader.ReadSingle(); _z = reader.ReadSingle(); _q0 = reader.ReadSingle(); _q1 = reader.ReadSingle(); _q2 = reader.ReadSingle(); _q3 = reader.ReadSingle(); _originID = reader.ReadUInt32(); } public void Pack(System.IO.Stream stream) { System.IO.BinaryWriter writer = new System.IO.BinaryWriter(stream); Pack(writer); } public void Pack(System.IO.BinaryWriter writer) { writer.Write((float)_x); writer.Write((float)_y); writer.Write((float)_z); writer.Write((float)_q0); writer.Write((float)_q1); writer.Write((float)_q2); writer.Write((float)_q3); writer.Write((uint)_originID); } public int Size { get { return 32; } } public static bool ArrayEquals(System.Collections.Generic.IList a1, System.Collections.Generic.IList a2) { if (System.Object.ReferenceEquals(a1, a2)) return true; if (System.Object.ReferenceEquals(a1, null) || System.Object.ReferenceEquals(a2, null)) return false; if (a1.Count != a2.Count) return false; for (int i = 0; i < a1.Count; i++) { if (!a1[i].Equals(a2[i])) { return false; } } return true; } public static bool operator ==(PoseStruct3d a, PoseStruct3d b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(PoseStruct3d a, PoseStruct3d b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as PoseStruct3d); } public bool Equals(PoseStruct3d p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._x.Equals(p._x) && this._y.Equals(p._y) && this._z.Equals(p._z) && this._q0.Equals(p._q0) && this._q1.Equals(p._q1) && this._q2.Equals(p._q2) && this._q3.Equals(p._q3) && this._originID.Equals(p._originID); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._x.GetHashCode(); hash = hash * 23 + this._y.GetHashCode(); hash = hash * 23 + this._z.GetHashCode(); hash = hash * 23 + this._q0.GetHashCode(); hash = hash * 23 + this._q1.GetHashCode(); hash = hash * 23 + this._q2.GetHashCode(); hash = hash * 23 + this._q3.GetHashCode(); hash = hash * 23 + this._originID.GetHashCode(); return hash; } } } [System.Flags] public enum ObjectType : int { UnknownObject = 0, Block_LIGHTCUBE1 = 1, Block_LIGHTCUBE2 = 2, Block_LIGHTCUBE3 = 3, Block_LIGHTCUBE_GHOST = 4, Charger_Basic = 5, CustomType00 = 14, CustomType01 = 15, CustomType02 = 16, CustomType03 = 17, CustomType04 = 18, CustomType05 = 19, CustomType06 = 20, CustomType07 = 21, CustomType08 = 22, CustomType09 = 23, CustomType10 = 24, CustomType11 = 25, CustomType12 = 26, CustomType13 = 27, CustomType14 = 28, CustomType15 = 29, CustomType16 = 30, CustomType17 = 31, CustomType18 = 32, CustomType19 = 33, CustomFixedObstacle = 34 }; } // namespace Gateway } // namespace Vector } // namespace Anki