Inherits Intersectable.
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::Patch * | meshPatches |
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... |