Exemple #1
0
            public static Body Deserialize(BodyMsg message)
            {
                var body = new Body()
                {
                    TrackingId = message.TrackingId,
                    IsTracked = message.IsTracked,
                    IsRestricted = message.IsRestricted,
                    ClippedEdges = message.ClippedEdges,

                    HandLeft = Hand.Deserialize(message.HandLeft),
                    HandRight = Hand.Deserialize(message.HandRight),

                    Joints = new Dictionary<JointType, Joint>(),
                };

                for (int i = 0; i < message.JointsLength; i++)
                {
                    var joint = Joint.Deserialize(message.GetJoints(i));

                    body.Joints.Add(joint.Type, joint);
                }

                return body;
            }
Exemple #2
0
 public Body GetBodies(Body obj, int j)
 {
     int o = __offset(6); return o != 0 ? obj.__init(__indirect(__vector(o) + j * 4), bb) : null;
 }
Exemple #3
0
 public static Body GetRootAsBody(ByteBuffer _bb, Body obj)
 {
     return (obj.__init(_bb.GetInt(_bb.Position) + _bb.Position, _bb));
 }