Contents Support Wiki Source Index APIs by Task APIs by Level Data


G3D::MeshBuilder Class Reference

Allows creation of optimized watertight meshes from unoptimized polygon soups. More...

#include <MeshBuilder.h>

List of all members.

Public Types

enum  { AUTO_WELD = -100 }

Public Member Functions

void addQuad (const Vector3 &a, const Vector3 &b, const Vector3 &c, const Vector3 &d)
void addTriangle (const Triangle &t)
void addTriangle (const Vector3 &a, const Vector3 &b, const Vector3 &c)
void commit (std::string &name, Array< int > &indexArray, Array< Vector3 > &vertexArray)
 MeshBuilder (bool twoSided=false)
void setName (const std::string &n)
void setWeldRadius (double r)


Detailed Description

Allows creation of optimized watertight meshes from unoptimized polygon soups.

See also G3D::MeshAlg for algorithms that operate on the output.


Member Enumeration Documentation

anonymous enum

Set setWeldRadius to AUTO_WELD to weld vertices closer than 1/2 the smallest edge length in a model.

Enumerator:
AUTO_WELD 


Constructor & Destructor Documentation

G3D::MeshBuilder::MeshBuilder ( bool  twoSided = false  )  [inline]


Member Function Documentation

void G3D::MeshBuilder::addQuad ( const Vector3 a,
const Vector3 b,
const Vector3 c,
const Vector3 d 
)

Adds two new triangles to the model.

(Counter clockwise)

void G3D::MeshBuilder::addTriangle ( const Triangle t  ) 

void G3D::MeshBuilder::addTriangle ( const Vector3 a,
const Vector3 b,
const Vector3 c 
)

Adds a new triangle to the model.

(Counter clockwise)

void G3D::MeshBuilder::commit ( std::string &  name,
Array< int > &  indexArray,
Array< Vector3 > &  vertexArray 
)

Writes the model to the arrays, which can then be used with G3D::IFSModel::save and G3D::MeshAlg.

void G3D::MeshBuilder::setName ( const std::string &  n  ) 

void G3D::MeshBuilder::setWeldRadius ( double  r  )  [inline]

Vertices within this distance are considered identical.

Use AUTO_WELD (the default) to have the distance be a function of the model size.


Generated on Wed Nov 26 13:54:58 2008 for G3D by doxygen 1.5.1
Hosted by SourceForge.net Logo