PrtEngine.ConcatenateMeshes Method

Language:

Concatenates a group of meshes into one common mesh. This method can optionally apply a matrix transformation to each input mesh and its texture coordinates.

Definition

Visual Basic Public Shared Function ConcatenateMeshes( _
    ByVal meshes() As Mesh, _
    ByVal options As MeshFlags, _
    ByVal geometryTransforms() As Matrix, _
    ByVal textureTransforms() As Matrix, _
    ByVal declaration() As VertexElement, _
    ByVal device As Device _
) As Mesh
C# public static Mesh ConcatenateMeshes(
    Mesh[] meshes,
    MeshFlags options,
    Matrix[] geometryTransforms,
    Matrix[] textureTransforms,
    VertexElement[] declaration,
    Device device
);
C++ public:
static MeshConcatenateMeshes(
    array<Mesh^>^ meshes,
    MeshFlags options,
    array<Matrix>^ geometryTransforms,
    array<Matrix>^ textureTransforms,
    array<VertexElement>^ declaration,
    Devicedevice
);
JScript public static function ConcatenateMeshes(
    meshes : Mesh[],
    options : MeshFlags,
    geometryTransforms : Matrix[],
    textureTransforms : Matrix[],
    declaration : VertexElement[],
    device : Device
) : Mesh;

Parameters

meshes Microsoft.DirectX.Direct3D.Mesh[]
An array of Mesh objects to concatenate. These meshes can store precomputed radiance transfer (PRT) vectors.
options Microsoft.DirectX.Direct3D.MeshFlags
Combination of one or more flags from the MeshFlags enumeration, specifying creation options for the output mesh. Equivalent to the options parameter of the Mesh constructor.
geometryTransforms Microsoft.DirectX.Matrix[]
A geometry transformation Matrix array to apply to each submesh.
textureTransforms Microsoft.DirectX.Matrix[]
A texture transformation Matrix array to apply to the (u, v) coordinates of each submesh.
declaration Microsoft.DirectX.Direct3D.VertexElement[]
An array of VertexElement objects representing the vertex declaration to use for merging mesh data.
device Microsoft.DirectX.Direct3D.Device
A Device that is used to create the new mesh.

Return Value

Microsoft.DirectX.Direct3D.Mesh
An Mesh object that represents the concatenated meshes.

Remarks

If no vertex declaration is given as part of the options parameter in the Mesh constructor, the method will generate a union of all of the vertex declarations of the submeshes, promoting channels and types if necessary.

The method will create an attribute table from attribute tables of the input meshes. To ensure creation of an attribute table, call ProgressiveMesh.Optimize with flags set to MeshFlags.OptimizeCompact and MeshFlags.OptimizeAttributeSort.

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