C3DMesh::CreateMesh

Top  Previous  Next

Syntax:

 

CreateMesh(C3DScreen pScreen, int  numVertices, int  numIndices, uint  fvf), int

 

Purpose:

Creates a custom mesh object.

 

Parameters:
pScreen - A C3DScreen object

numVertices - Number of vertices to allocate for the vertex buffer.

numIndices - Number of indices to allocate for the index buffer.

fvf - The flexible vertex format of the mesh.

 

Returned value(s):

TRUE if the mesh could be created, FALSE otherwise.

 

Application:

mesh1.CreateMesh(pScreen,numVertices,numIndices,D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_DIFFUSE )

 

Class Hierarchy

C3DObject

-------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

 

See Also:

CreateMeshEx ,FVF Constants