public Bone( float length, BoneType bonetype ) { mLength = length; mStartPoint = Vector3.Zero; mEndPoint = Vector3.Zero; mChildren = new List<Bone>(); mParentBone = null; mCurrentOrientation = Matrix4.Identity; mCalibratedOrientation = Matrix4.Identity; mFinalTransform = Matrix4.Identity; mBoneType = bonetype; generateBoxGeometry(); }
/// <summary> /// Adds a bone as a child to this bone /// </summary> /// <param name="child">The bone to add as a child</param> public void addChild(Bone child) { if( mChildren.Contains( child ) ) throw new Exception( "You can't add that child, it's already contained, sweet child of mine~" ); else { mChildren.Add( child ); child.mParentBone = this; } }