次の方法で共有


ModelMesh.ParentBone Property

Gets the parent bone for this mesh. The parent bone of a mesh contains a transformation matrix that describes how the mesh is located relative to any parent meshes in a model.

Namespace: Microsoft.Xna.Framework.Graphics
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)

Syntax

public ModelBone ParentBone { get; }

Property Value

The parent bone for this mesh.

Remarks

An array of transformation matrices for the meshes of any model can be obtained by calling CopyAbsoluteBoneTransformsTo or CopyBoneTransformsTo. The resulting array contains the transforms that describe how each ModelMesh is located relative to one another in the Model. The transformation matrix that should be applied to each ModelMesh can be obtained using the index of the ParentBone to retrieve a transformation matrix from this collection.

For a demonstration of how to use the transforms for the parent bones of a model mesh to set the position of the mesh parts, please see How to: Render a Model.

See Also

Tasks

How to: Render a Model

Reference

ModelMesh Class
ModelMesh Members
Microsoft.Xna.Framework.Graphics Namespace

Platforms

Xbox 360, Windows XP SP2, Windows Vista