Esempio n. 1
0
        public Skeleton ToNetworkModel()
        {
            Skeleton s = new Skeleton();

            s.UserId        = UserId;
            s.BodyLocation  = BodyLocation.ToCoord();
            s.BodyRotation  = BodyRotation.ToCoord();
            s.Head          = Head.ToCoord();
            s.Neck          = Neck.ToCoord();
            s.Spine         = Spine.ToCoord();
            s.Hips          = Hips.ToCoord();
            s.LeftShoulder  = LeftShoulder.ToCoord();
            s.LeftArm       = LeftArm.ToCoord();
            s.LeftHand      = LeftHand.ToCoord();
            s.RightShoulder = RightShoulder.ToCoord();
            s.RightArm      = RightArm.ToCoord();
            s.RightHand     = RightHand.ToCoord();
            s.LeftKnee      = LeftKnee.ToCoord();
            s.LeftFoot      = LeftFoot.ToCoord();
            s.RightKnee     = RightKnee.ToCoord();
            s.RightFoot     = RightFoot.ToCoord();
            return(s);
        }
Esempio n. 2
0
 public void MergeFrom(Skeleton other)
 {
     if (other == null)
     {
         return;
     }
     if (other.UserId != 0UL)
     {
         UserId = other.UserId;
     }
     if (other.bodyLocation_ != null)
     {
         if (bodyLocation_ == null)
         {
             bodyLocation_ = new global::VrLifeShared.Networking.NetworkingModels.Coord();
         }
         BodyLocation.MergeFrom(other.BodyLocation);
     }
     if (other.bodyRotation_ != null)
     {
         if (bodyRotation_ == null)
         {
             bodyRotation_ = new global::VrLifeShared.Networking.NetworkingModels.Coord();
         }
         BodyRotation.MergeFrom(other.BodyRotation);
     }
     if (other.head_ != null)
     {
         if (head_ == null)
         {
             head_ = new global::VrLifeShared.Networking.NetworkingModels.Coord();
         }
         Head.MergeFrom(other.Head);
     }
     if (other.neck_ != null)
     {
         if (neck_ == null)
         {
             neck_ = new global::VrLifeShared.Networking.NetworkingModels.Coord();
         }
         Neck.MergeFrom(other.Neck);
     }
     if (other.spine_ != null)
     {
         if (spine_ == null)
         {
             spine_ = new global::VrLifeShared.Networking.NetworkingModels.Coord();
         }
         Spine.MergeFrom(other.Spine);
     }
     if (other.hips_ != null)
     {
         if (hips_ == null)
         {
             hips_ = new global::VrLifeShared.Networking.NetworkingModels.Coord();
         }
         Hips.MergeFrom(other.Hips);
     }
     if (other.leftShoulder_ != null)
     {
         if (leftShoulder_ == null)
         {
             leftShoulder_ = new global::VrLifeShared.Networking.NetworkingModels.Coord();
         }
         LeftShoulder.MergeFrom(other.LeftShoulder);
     }
     if (other.leftArm_ != null)
     {
         if (leftArm_ == null)
         {
             leftArm_ = new global::VrLifeShared.Networking.NetworkingModels.Coord();
         }
         LeftArm.MergeFrom(other.LeftArm);
     }
     if (other.leftHand_ != null)
     {
         if (leftHand_ == null)
         {
             leftHand_ = new global::VrLifeShared.Networking.NetworkingModels.Coord();
         }
         LeftHand.MergeFrom(other.LeftHand);
     }
     if (other.rightShoulder_ != null)
     {
         if (rightShoulder_ == null)
         {
             rightShoulder_ = new global::VrLifeShared.Networking.NetworkingModels.Coord();
         }
         RightShoulder.MergeFrom(other.RightShoulder);
     }
     if (other.rightArm_ != null)
     {
         if (rightArm_ == null)
         {
             rightArm_ = new global::VrLifeShared.Networking.NetworkingModels.Coord();
         }
         RightArm.MergeFrom(other.RightArm);
     }
     if (other.rightHand_ != null)
     {
         if (rightHand_ == null)
         {
             rightHand_ = new global::VrLifeShared.Networking.NetworkingModels.Coord();
         }
         RightHand.MergeFrom(other.RightHand);
     }
     if (other.leftKnee_ != null)
     {
         if (leftKnee_ == null)
         {
             leftKnee_ = new global::VrLifeShared.Networking.NetworkingModels.Coord();
         }
         LeftKnee.MergeFrom(other.LeftKnee);
     }
     if (other.leftFoot_ != null)
     {
         if (leftFoot_ == null)
         {
             leftFoot_ = new global::VrLifeShared.Networking.NetworkingModels.Coord();
         }
         LeftFoot.MergeFrom(other.LeftFoot);
     }
     if (other.rightKnee_ != null)
     {
         if (rightKnee_ == null)
         {
             rightKnee_ = new global::VrLifeShared.Networking.NetworkingModels.Coord();
         }
         RightKnee.MergeFrom(other.RightKnee);
     }
     if (other.rightFoot_ != null)
     {
         if (rightFoot_ == null)
         {
             rightFoot_ = new global::VrLifeShared.Networking.NetworkingModels.Coord();
         }
         RightFoot.MergeFrom(other.RightFoot);
     }
 }
Esempio n. 3
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (UserId != 0UL)
            {
                hash ^= UserId.GetHashCode();
            }
            if (bodyLocation_ != null)
            {
                hash ^= BodyLocation.GetHashCode();
            }
            if (bodyRotation_ != null)
            {
                hash ^= BodyRotation.GetHashCode();
            }
            if (head_ != null)
            {
                hash ^= Head.GetHashCode();
            }
            if (neck_ != null)
            {
                hash ^= Neck.GetHashCode();
            }
            if (spine_ != null)
            {
                hash ^= Spine.GetHashCode();
            }
            if (hips_ != null)
            {
                hash ^= Hips.GetHashCode();
            }
            if (leftShoulder_ != null)
            {
                hash ^= LeftShoulder.GetHashCode();
            }
            if (leftArm_ != null)
            {
                hash ^= LeftArm.GetHashCode();
            }
            if (leftHand_ != null)
            {
                hash ^= LeftHand.GetHashCode();
            }
            if (rightShoulder_ != null)
            {
                hash ^= RightShoulder.GetHashCode();
            }
            if (rightArm_ != null)
            {
                hash ^= RightArm.GetHashCode();
            }
            if (rightHand_ != null)
            {
                hash ^= RightHand.GetHashCode();
            }
            if (leftKnee_ != null)
            {
                hash ^= LeftKnee.GetHashCode();
            }
            if (leftFoot_ != null)
            {
                hash ^= LeftFoot.GetHashCode();
            }
            if (rightKnee_ != null)
            {
                hash ^= RightKnee.GetHashCode();
            }
            if (rightFoot_ != null)
            {
                hash ^= RightFoot.GetHashCode();
            }
            return(hash);
        }