C3DMesh::CreateMeshEx |
Top Previous Next |
Syntax:
CreateMeshEx(C3DScreen pScreen, uint primitiveType, int numVertices, int numIndices, int numPrimitives, uint fvf), int
Purpose: Creates a custom mesh object.
Parameters: primitiveType - One of six primitive types offered by Direct3D. numVertices - Number of vertices to allocate for the vertex buffer numIndices - Number of Indices to allocate for the index buffer numPrimitives - Number of primitives to render fvf - the flexible vertex format of the mesh
Returned value(s): TRUE if the mesh could be created, FALSE otherwise.
Application: mesh1.CreateMeshEx(D3DPT_LINELIST, numVertices, numIndices, numIndices/2, D3DFVF_XYZ | D3DFVF_DIFFUSE)
Class Hierarchy -------C3DMesh
Additional Info: The object is created as initially hidden. After setting the vertex and index buffers use SetVisible to allow the object to be rendered and RecalcBoundingBox to calculate the dimensions of the internal bounding box used for visibility determination
The six primitive constants allowed are: D3DPT_POINTLIST D3DPT_LINELIST D3DPT_LINESTRIP D3DPT_TRIANGLELIST D3DPT_TRIANGLESTRIP D3DPT_TRIANGLEFAN
See Also:
|