Mesh.LoadHierarchy Method

Language:

Loads the first frame hierarchy from a Stream Leave Site.

Definition

Visual Basic Public Shared Function LoadHierarchy( _
    ByVal stream As Stream, _
    ByVal readBytes As Integer, _
    ByVal options As MeshFlags, _
    ByVal device As Device, _
    ByVal allocHierarchy As AllocateHierarchy, _
    ByVal userDataLoader As LoadUserData _
) As AnimationRootFrame
C# public static AnimationRootFrame LoadHierarchy(
    Stream stream,
    int readBytes,
    MeshFlags options,
    Device device,
    AllocateHierarchy allocHierarchy,
    LoadUserData userDataLoader
);
C++ public:
static AnimationRootFrame LoadHierarchy(
    Streamstream,
    int readBytes,
    MeshFlags options,
    Devicedevice,
    AllocateHierarchyallocHierarchy,
    LoadUserDatauserDataLoader
);
JScript public static function LoadHierarchy(
    stream : Stream,
    readBytes : int,
    options : MeshFlags,
    device : Device,
    allocHierarchy : AllocateHierarchy,
    userDataLoader : LoadUserData
) : AnimationRootFrame;

Parameters

stream System.IO.Stream
A Stream Leave Site object that contains the mesh hierarchy to load.
readBytes System.Int32
Size of the param_Stream_stream in bytes.
options Microsoft.DirectX.Direct3D.MeshFlags
One or more flags from the Mesh enumeration that specify creation options for the mesh (excepting the Simplify* and Optimize* flags).
device Microsoft.DirectX.Direct3D.Device
The Deviceto associate with the mesh.
allocHierarchy Microsoft.DirectX.Direct3D.AllocateHierarchy
An AllocateHierarchy object.
userDataLoader Microsoft.DirectX.Direct3D.LoadUserData
Application-provided object that allows loading of user data. For more information, see LoadUserData.

Return Value

Microsoft.DirectX.Direct3D.AnimationRootFrame
An AnimationRootFrame. The AnimationRootFrame.AnimationController property contains an AnimationController that corresponds to an animation, created with default tracks and events, in the DirectX (.x) file.

Remarks

All meshes in the file are collapsed into one output mesh. If the file contains a frame hierarchy, all of the transformations are applied to the mesh.

Exceptions
InvalidCallException The method call is invalid. For example, a method's parameter might contain an invalid value.
OutOfMemoryException Leave Site Microsoft Direct3D could not allocate sufficient memory to complete the call.


Send comments about this topic to Microsoft. © Microsoft Corporation. All rights reserved.

Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center