TriangleMesh Class Reference

ray-tracable representaion of a mesh TriangleMesh encapsulates a kd-tree containing triangles. It can be constructed using the vertex and index buffers of a mesh. Ray-intersection and random surface sampling are supported. More...

Inherits Intersectable.

List of all members.

Public Member Functions

float getSurfaceArea ()
 return total surface area
void sampleSurface (Radion &radion)
 return random surface radion
bool intersect (const Ray &ray, float &depth, float rayMin, float rayMax)
 pure virtual function, must be implemented to carry out the intersection test
 TriangleMesh (Material *material, unsigned short *indexBuffer, unsigned int nFaces, D3DVERTEX *vertexBuffer, unsigned int nVertices)
 constructor to build a TriangleMesh from mesh buffers. Vertex format has to be per struct D3DVERTEX.

Private Member Functions

void buildAreaTree ()
 build area tree from root
double buildAreaTree (unsigned int u)
 build area tree from given node (recursively)
void sampleSurface (unsigned int u, double rnd, Radion &radion)
 return random surface radion from area subtree under node u (recursive)

Private Attributes

TriangleMesh::PatchmeshPatches
 A triangle with ray-intersection. mesh triangles array.
unsigned int nMeshPatches
 number of mesh triangles
unsigned int nAreaTreeNodes
 number of nodes in area tree (for selection ~ area)
double surfaceArea
 total surface
double * areaTree
 area tree nodes array

Classes

class  Patch
 A triangle with ray-intersection. More...


Detailed Description

ray-tracable representaion of a mesh TriangleMesh encapsulates a kd-tree containing triangles. It can be constructed using the vertex and index buffers of a mesh. Ray-intersection and random surface sampling are supported.


The documentation for this class was generated from the following files:
Generated on Thu Apr 27 17:17:42 2006 for Path Map Module by  doxygen 1.4.6-NO