Share via


SkinMesh.FromX(XFileData,MeshFlags,Device,ExtendedMaterial,EffectInstance) Method (Microsoft.DirectX.Direct3D)

Loads skin information and mesh data from a Microsoft Direct3D .x file data object.

Definition

Visual Basic Public Shared Function FromX( _
    ByVal xofObjMesh As XFileData, _
    ByVal options As MeshFlags, _
    ByVal device As Device, _
    ByRef materials As ExtendedMaterial, _
    ByRef effects As EffectInstance _
) As SkinMesh
C# public static SkinMesh FromX(
    XFileData xofObjMesh,
    MeshFlags options,
    Device device,
    out ExtendedMaterial materials,
    out EffectInstance effects
);
C++ public:
static SkinMesh FromX(
    XFileDataxofObjMesh,
    MeshFlags options,
    Devicedevice,
    [Out] ExtendedMaterialmaterials,
    [Out] EffectInstanceeffects
);
JScript public static function FromX(
    xofObjMesh : XFileData,
    options : MeshFlags,
    device : Device,
    materials : ExtendedMaterial,
    effects : EffectInstance
) : SkinMesh;

Parameters

xofObjMesh Microsoft.DirectX.Direct3D.XFileData
An XFileData object that represents the Microsoft DirectX file data object to load.
options Microsoft.DirectX.Direct3D.MeshFlags
A MeshFlags enumeration that specifies creation options for the mesh.
device Microsoft.DirectX.Direct3D.Device
A Device object associated with the mesh.
materials Microsoft.DirectX.Direct3D.ExtendedMaterial[]
Array of ExtendedMaterial objects loaded from the .x file data object.
effects Microsoft.DirectX.Direct3D.EffectInstance[]
An array of EffectInstance structures, where each structure contains a set of EffectDefault structures. Each EffectDefault represents an attribute group in the returned mesh. The data in these structures represent a particular instance of state information used to initialize an effect. For more information, see EffectInstance.

Return Value

Microsoft.DirectX.Direct3D.SkinMesh
A SkinMesh structure that contains the skin and mesh data from the .x file object.

Remarks

Exceptions

InvalidCallException

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

InvalidDataException

The data is invalid.

OutOfMemoryExceptionLeave Site

Direct3D could not allocate sufficient memory to complete the call.