Triangle Class Reference

#include <trianglemesh.h>

Inheritance diagram for Triangle:
Shape ReferenceCounted

List of all members.

Public Member Functions

 Triangle (const Transform *o2w, const Transform *w2o, bool ro, TriangleMesh *m, int n)
BBox ObjectBound () const
BBox WorldBound () const
bool Intersect (const Ray &ray, float *tHit, float *rayEpsilon, DifferentialGeometry *dg) const
bool IntersectP (const Ray &ray) const
void GetUVs (float uv[3][2]) const
float Area () const
virtual void GetShadingGeometry (const Transform &obj2world, const DifferentialGeometry &dg, DifferentialGeometry *dgShading) const
Point Sample (float u1, float u2, Normal *Ns) const

Private Attributes

Reference< TriangleMeshmesh
int * v

Detailed Description

Definition at line 63 of file trianglemesh.h.


Constructor & Destructor Documentation

Triangle::Triangle ( const Transform o2w,
const Transform w2o,
bool  ro,
TriangleMesh m,
int  n 
) [inline]

Definition at line 66 of file trianglemesh.h.

References mesh, and v.


Member Function Documentation

float Triangle::Area (  )  const [virtual]

Reimplemented from Shape.

Definition at line 276 of file trianglemesh.cpp.

References Cross(), Vector::Length(), mesh, and v.

void Triangle::GetShadingGeometry ( const Transform obj2world,
const DifferentialGeometry dg,
DifferentialGeometry dgShading 
) const [virtual]
void Triangle::GetUVs ( float  uv[3][2]  )  const [inline]

Definition at line 78 of file trianglemesh.h.

References mesh, and v.

Referenced by GetShadingGeometry(), Intersect(), and IntersectP().

bool Triangle::Intersect ( const Ray ray,
float *  tHit,
float *  rayEpsilon,
DifferentialGeometry dg 
) const [virtual]

Reimplemented from Shape.

Definition at line 119 of file trianglemesh.cpp.

References CoordinateSystem(), Cross(), Ray::d, Ray::depth, Dot(), GetUVs(), Ray::maxt, mesh, Normalize(), Ray::o, and v.

bool Triangle::IntersectP ( const Ray ray  )  const [virtual]

Reimplemented from Shape.

Definition at line 203 of file trianglemesh.cpp.

References CoordinateSystem(), Cross(), Ray::d, Ray::depth, Dot(), GetUVs(), Ray::maxt, mesh, Normalize(), Ray::o, and v.

BBox Triangle::ObjectBound (  )  const [virtual]

Implements Shape.

Definition at line 100 of file trianglemesh.cpp.

References mesh, Union(), v, and Shape::WorldToObject.

Point Triangle::Sample ( float  u1,
float  u2,
Normal Ns 
) const [virtual]

Reimplemented from Shape.

Definition at line 436 of file trianglemesh.cpp.

References Cross(), mesh, Normalize(), Shape::ReverseOrientation, UniformSampleTriangle(), and v.

BBox Triangle::WorldBound (  )  const [virtual]

Reimplemented from Shape.

Definition at line 110 of file trianglemesh.cpp.

References mesh, Union(), and v.


Member Data Documentation

int* Triangle::v [private]

The documentation for this class was generated from the following files:
Generated on Sat Aug 28 20:00:15 2010 for pbrt by  doxygen 1.6.3