GClasses
|
Represents a triangle mesh in a ray-tracing scene.
#include <GRayTrace.h>
Public Member Functions | |
GRayTraceTriMesh (GRayTraceMaterial *pMaterial, size_t nPoints, size_t nTriangles, size_t nNormals, size_t nTextureCoords) | |
GRayTraceTriMesh (GDomNode *pNode, GRayTraceScene *pScene) | |
~GRayTraceTriMesh () | |
void | activateCulling () |
void | adjustBoundingBox (size_t nIndex, G3DVector *pMin, G3DVector *pMax) |
void | center (G3DVector *pOutPoint, size_t nIndex) |
void | computePhongNormals () |
Automatically compute phong normals at the vertices to make the object appear smooth. More... | |
bool | isCulled () |
GRayTraceMaterial * | material () |
void | normalVector (GRayTraceRay *pRay, size_t nIndex) |
G3DReal | rayDistanceToTriangle (size_t nTriangle, G3DVector *pRayOrigin, G3DVector *pRayDirection) |
GDomNode * | serialize (GDom *pDoc, const GRayTraceScene *pScene) const |
void | setNormal (size_t nIndex, G3DVector *pNormal) |
void | setPoint (size_t nIndex, const G3DVector *pPoint) |
void | setTextureCoord (size_t nIndex, G3DReal x, G3DReal y) |
void | setTriangle (size_t nIndex, size_t v1, size_t v2, size_t v3) |
void | triangle (size_t index, size_t *v1, size_t *v2, size_t *v3) |
size_t | triangleCount () |
G3DVector * | vertex (size_t nIndex, size_t nVertex) |
Static Public Member Functions | |
static GRayTraceTriMesh * | makeCylinder (GRayTraceMaterial *pMaterial, G3DVector *pCenter1, G3DVector *pCenter2, G3DReal radius, size_t nSides, bool bEndCaps) |
static GRayTraceTriMesh * | makeQuadSurface (GRayTraceMaterial *pMaterial, G3DVector *p1, G3DVector *p2, G3DVector *p3, G3DVector *p4) |
The vertices must go around the surface. Don't cut across corners. More... | |
static GRayTraceTriMesh * | makeSingleTriangle (GRayTraceMaterial *pMaterial, G3DVector *p1, G3DVector *p2, G3DVector *p3) |
Protected Member Functions | |
bool | isPointWithinPlanarPolygon (G3DVector *pPoint, G3DVector **ppVertices, size_t nVertices) |
Protected Attributes | |
bool | m_bCulling |
size_t | m_nPoints |
size_t | m_nTriangles |
GRayTraceMaterial * | m_pMaterial |
G3DVector * | m_pNormals |
G3DVector * | m_pPoints |
G3DReal * | m_pTextureCoords |
size_t * | m_pTriangles |
GClasses::GRayTraceTriMesh::GRayTraceTriMesh | ( | GRayTraceMaterial * | pMaterial, |
size_t | nPoints, | ||
size_t | nTriangles, | ||
size_t | nNormals, | ||
size_t | nTextureCoords | ||
) |
GClasses::GRayTraceTriMesh::GRayTraceTriMesh | ( | GDomNode * | pNode, |
GRayTraceScene * | pScene | ||
) |
GClasses::GRayTraceTriMesh::~GRayTraceTriMesh | ( | ) |
|
inline |
void GClasses::GRayTraceTriMesh::adjustBoundingBox | ( | size_t | nIndex, |
G3DVector * | pMin, | ||
G3DVector * | pMax | ||
) |
void GClasses::GRayTraceTriMesh::center | ( | G3DVector * | pOutPoint, |
size_t | nIndex | ||
) |
void GClasses::GRayTraceTriMesh::computePhongNormals | ( | ) |
Automatically compute phong normals at the vertices to make the object appear smooth.
|
inline |
|
protected |
|
static |
|
static |
The vertices must go around the surface. Don't cut across corners.
|
static |
|
inline |
void GClasses::GRayTraceTriMesh::normalVector | ( | GRayTraceRay * | pRay, |
size_t | nIndex | ||
) |
G3DReal GClasses::GRayTraceTriMesh::rayDistanceToTriangle | ( | size_t | nTriangle, |
G3DVector * | pRayOrigin, | ||
G3DVector * | pRayDirection | ||
) |
GDomNode* GClasses::GRayTraceTriMesh::serialize | ( | GDom * | pDoc, |
const GRayTraceScene * | pScene | ||
) | const |
void GClasses::GRayTraceTriMesh::setNormal | ( | size_t | nIndex, |
G3DVector * | pNormal | ||
) |
void GClasses::GRayTraceTriMesh::setPoint | ( | size_t | nIndex, |
const G3DVector * | pPoint | ||
) |
void GClasses::GRayTraceTriMesh::setTriangle | ( | size_t | nIndex, |
size_t | v1, | ||
size_t | v2, | ||
size_t | v3 | ||
) |
void GClasses::GRayTraceTriMesh::triangle | ( | size_t | index, |
size_t * | v1, | ||
size_t * | v2, | ||
size_t * | v3 | ||
) |
|
inline |
G3DVector* GClasses::GRayTraceTriMesh::vertex | ( | size_t | nIndex, |
size_t | nVertex | ||
) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |