MarSTDv2004: CGeomCompiler Class Reference

MarSTDv2004

CGeomCompiler Class Reference

List of all members.

Detailed Description

Use this class to compile meshes into CCompiledMesh structures. The compiling process does the following things:
  • Remove duplicate vertices by merging them.
  • Create polygons that index into the CCompiledMesh's vertex array and index into the edge array. Full shared edge, shared vertex, etc information is available through the CCompiledEdge, CCompiledVertex structures. The compiler also calculate average normals at vertices for smooth shading / lighting or texture coordinate generation (eg sphere mapping). See the other CCompiled* classes for more information.
    // Example:
    
    CCompiledMesh scene;
    
    void create_scene()
    {
    
            CMesh mesh;
            
            CGeomBuilder::I().sphere(mesh, 10, 20);
            
            CGeomBuilder::I().cone(mesh, 20);
            
            CGeomCompiler::I().compile(mesh, scene);
    
    }
    

Definition at line 172 of file CGeomCompiler.h.

Public Member Functions

void compile (CMesh &mesh, CCompiledMesh &out)
void compile (CMesh &mesh, CCompiledMesh &base, CCompiledMesh &index)
void removeDuplicateIndices (CCompiledMesh &mesh)

Static Public Member Functions

static CGeomCompilerI ()

Member Function Documentation

static CGeomCompiler& CGeomCompiler::I  )  [static]
 

Use this function to get a reference to the geometry compiler singleton object.

Definition at line 188 of file CGeomCompiler.h.

void CGeomCompiler::compile CMesh mesh,
CCompiledMesh out
 

Compile the mesh into an CCompiledMesh object. The compiler will merge identical vertices, create shared edges, etc, etc...


The documentation for this class was generated from the following file:
Generated on Tue Feb 8 21:59:38 2005 for MarSTDv2004 by  doxygen 1.4.1