Beispiel #1
0
        public static void DrawJointGizmos(KinectSkeleton skeleton, GizmoType type)
        {
            Gizmos.color = KinectEditorUtils.darkGreen;

            foreach (var jointType in KinectHelper.allJointTypes)
            {
                var joint = skeleton[jointType];

                if (joint == null)
                {
                    continue;
                }

                var parentJointType = KinectHelper.parentJointTypes[(int)jointType];
                var parentJoint     = skeleton[parentJointType];

                if (parentJoint == null || joint == parentJoint)
                {
                    continue;
                }

                Gizmos.DrawLine(joint.transform.position, parentJoint.transform.position);
            }

            var head = skeleton[JointType.Head];

            if (head != null)
            {
                Gizmos.DrawWireSphere(head.transform.position, 0.14f);
            }
        }
Beispiel #2
0
        public void OnEnable()
        {
            this.m_Me             = (KinectSkeleton)target;
            this.m_ChangesToApply = false;

            if (this.m_Me.jointCount > 0)
            {
                this.m_OriginalJointMask = this.m_JointMask = GetJointMaskFromHierarchy();
                this.m_ApplyFilter       = this.m_Me.GetJoints().All(x => x.applyFilter);
            }
            else
            {
                this.m_OriginalJointMask = this.m_JointMask = KinectJointMask.None;
                this.m_ApplyFilter       = false;
            }
        }
Beispiel #3
0
 public static void DrawBoundsGizmos(KinectSkeleton skeleton, GizmoType type)
 {
     Gizmos.color = KinectEditorUtils.darkGreen;
     Gizmos.DrawWireCube(skeleton.bounds.center, skeleton.bounds.size);
 }