Share via


Mesh.SaveHierarchyToFile(String,XFileFormat,Frame,AnimationController,SaveUserData) Method (Microsoft.DirectX.Direct3D)

Creates a DirectX (.x) file and saves the mesh hierarchy and corresponding animations in it.

Definition

Visual Basic Public Shared Sub SaveHierarchyToFile( _
    ByVal filename As String, _
    ByVal format As XFileFormat, _
    ByVal frameRoot As Frame, _
    ByVal animationMixer As AnimationController, _
    ByVal saveUserData As SaveUserData _
)
C# public static void SaveHierarchyToFile(
    string filename,
    XFileFormat format,
    Frame frameRoot,
    AnimationController animationMixer,
    SaveUserData saveUserData
);
C++ public:
static void SaveHierarchyToFile(
    StringLeave Sitefilename,
    XFileFormat format,
    FrameframeRoot,
    AnimationControlleranimationMixer,
    SaveUserDatasaveUserData
);
JScript public static function SaveHierarchyToFile(
    filename : String,
    format : XFileFormat,
    frameRoot : Frame,
    animationMixer : AnimationController,
    saveUserData : SaveUserData
);

Parameters

filename System.String
String that specifies the file name.
format Microsoft.DirectX.Direct3D.XFileFormat
An XFileFormat that indicates the format to use when saving the .x file. See Remarks.
frameRoot Microsoft.DirectX.Direct3D.Frame
Root node of the hierarchy to save. For more information, see Frame.
animationMixer Microsoft.DirectX.Direct3D.AnimationController
An AnimationController whose animation sets will be stored.
saveUserData Microsoft.DirectX.Direct3D.SaveUserData
Application-provided object that allows saving of user data. For more information, see SaveUserData.

Remarks

The default value for the file format is Binary. The Compressed file format can be combined (using a logical or) with either the Text or Binary flag to reduce the file size. If a file is specified with both Binary and text Text flags, it is saved as a text file.

Exceptions

InvalidCallException

The method call is invalid. For example, a method's parameter might contain an invalid value.

See Also