Axiom.Animating.Skeleton.GetRootBone C# (CSharp) Метод

GetRootBone() публичный Метод

Gets the root bone at the specified index.
public GetRootBone ( int index ) : Bone
index int Index of the root bone to return.
Результат Bone
		public virtual Bone GetRootBone( int index )
		{
			if ( index < rootBones.Count )
			{
				return rootBones[ index ];
			}

			return null;
		}

Usage Example

Пример #1
0
        /// <summary>
        ///		Overriden to copy/clone the bones of the master skeleton.
        /// </summary>
        protected override void LoadImpl()
        {
            nextAutoHandle         = skeleton.nextAutoHandle;
            nextTagPointAutoHandle = 0;

            this.blendMode = skeleton.BlendMode;

            // copy bones starting at the roots
            for (int i = 0; i < skeleton.RootBoneCount; i++)
            {
                Bone rootBone = skeleton.GetRootBone(i);
                CloneBoneAndChildren(rootBone, null);
                rootBone.Update(true, false);
            }

            SetBindingPose();

            // Clone the attachment points
            for (int i = 0; i < skeleton.AttachmentPoints.Count; i++)
            {
                AttachmentPoint ap         = skeleton.AttachmentPoints[i];
                Bone            parentBone = this.GetBone(ap.ParentBone);
                this.CreateAttachmentPoint(ap.Name, parentBone.Handle, ap.Orientation, ap.Position);
            }
        }