Mesh.LoadHierarchy(Stream,MeshFlags,Device,AllocateHierarchy,LoadUserData) Method (Microsoft.DirectX.Direct3D)
Loads the first frame hierarchy from a Stream.
Definition
Visual Basic Public Shared Function LoadHierarchy( _
ByVal stream As Stream, _
ByVal options As MeshFlags, _
ByVal device As Device, _
ByVal allocHierarchy As AllocateHierarchy, _
ByVal userDataLoader As LoadUserData _
) As AnimationRootFrameC# public static AnimationRootFrame LoadHierarchy(
Stream stream,
MeshFlags options,
Device device,
AllocateHierarchy allocHierarchy,
LoadUserData userDataLoader
);C++ public:
static AnimationRootFrame LoadHierarchy(
Stream^ stream,
MeshFlags options,
Device^ device,
AllocateHierarchy^ allocHierarchy,
LoadUserData^ userDataLoader
);JScript public static function LoadHierarchy(
stream : Stream,
options : MeshFlags,
device : Device,
allocHierarchy : AllocateHierarchy,
userDataLoader : LoadUserData
) : AnimationRootFrame;
Parameters
stream System.IO.Stream
A Stream object that contains the mesh hierarchy to load.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
The method call is invalid. For example, a method's parameter might contain an invalid value.
Microsoft Direct3D could not allocate sufficient memory to complete the call.