Game Development Reference
In-Depth Information
pmesh->SetNumVertices(40);
Note that the number of vertices of the mesh, after the adjustment,
may differ by one from the number desired. If Vertices is less
than GetMinVertices() , it is clamped to GetMinVertices() .
Similarly, if Vertices is greater than GetMaxVertices() ,itis
clamped to GetMaxVertices() .
HRESULT TrimByFaces(
DWORD NewFacesMin,
DWORD NewFacesMax,
DWORD *rgiFaceRemap, // Face remap info.
DWORD *rgiVertRemap // Vertex remap info.
);
This method allows us to set a new face count minimum and maxi-
mum, as specified by the arguments NewFacesMin and
NewFacesMax , respectively. Note that the new minimum and max-
imum must be in the present face minimum and maximum interval;
that is, it must be in [ GetMinFaces() , GetMaxFaces() ]. The
function also returns face and vertex remap information. See sec-
tion 10.4 for a description of remap information.
HRESULT TrimByVertices(
DWORD NewVerticesMin,
DWORD NewVerticesMax,
DWORD *rgiFaceRemap, // Face remap info.
DWORD *rgiVertRemap // Vertex remap info.
);
This method allows us to set a new vertex count minimum and
maximum as specified by the arguments NewVerticesMin and
NewVerticesMax , respectively. Note that the new minimum and
maximum must be in the present vertex minimum and maximum
interval; that is, it must be in [ GetMinVertices() , GetMax-
Vertices() ]. The function also returns face and vertex remap
information. See section 10.4 for a description of remap
information.
Note: Of particular interest are the methods SetNumFaces and
SetNumVertices , for these methods are the ones that allow us to
adjust the LOD of the mesh.
Search WWH ::




Custom Search