Share via


Mesh.LoadHierarchy(Stream,Int32,MeshFlags,Device,AllocateHierarchy,LoadUserData) Method (Microsoft.DirectX.Direct3D)

Loads the first frame hierarchy from a StreamLeave Site.

Definition

Visual Basic Public Shared Function LoadHierarchy( _
    ByVal stream As StreamLeave Site, _
    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(
    StreamLeave Site stream,
    int readBytes,
    MeshFlags options,
    Device device,
    AllocateHierarchy allocHierarchy,
    LoadUserData userDataLoader
);
C++ public:
static AnimationRootFrame LoadHierarchy(
    StreamLeave Sitestream,
    int readBytes,
    MeshFlags options,
    Devicedevice,
    AllocateHierarchyallocHierarchy,
    LoadUserDatauserDataLoader
);
JScript public static function LoadHierarchy(
    stream : StreamLeave Site,
    readBytes : int,
    options : MeshFlags,
    device : Device,
    allocHierarchy : AllocateHierarchy,
    userDataLoader : LoadUserData
) : AnimationRootFrame;

Parameters

stream System.IO.Stream
A StreamLeave 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.

OutOfMemoryExceptionLeave Site

Microsoft Direct3D could not allocate sufficient memory to complete the call.