#include <barytrianglemesh.h>
Public Member Functions | |
BaryTriangleMesh (const Transform &o2w, bool ro, int ntris, int nverts, const int *vptr, const Point *P, const Normal *N, const Vector *S, const float *uv) | |
~BaryTriangleMesh () | |
BBox | ObjectBound () const |
BBox | WorldBound () const |
bool | CanIntersect () const |
void | Refine (vector< boost::shared_ptr< Shape > > &refined) const |
Static Public Member Functions | |
static Shape * | CreateShape (const Transform &o2w, bool reverseOrientation, const ParamSet ¶ms) |
Protected Attributes | |
int | ntris |
int | nverts |
int * | vertexIndex |
Point * | p |
Normal * | n |
Vector * | s |
float * | uvs |
vector< boost::shared_ptr < Shape > > | triPtrs |
Friends | |
class | BaryTriangle |
class | VertexTexture |
Definition at line 31 of file barytrianglemesh.h.
BaryTriangleMesh::BaryTriangleMesh | ( | const Transform & | o2w, | |
bool | ro, | |||
int | ntris, | |||
int | nverts, | |||
const int * | vptr, | |||
const Point * | P, | |||
const Normal * | N, | |||
const Vector * | S, | |||
const float * | uv | |||
) |
Definition at line 31 of file barytrianglemesh.cpp.
References memcpy(), n, ntris, nverts, lux::Shape::ObjectToWorld, p, s, uvs, and vertexIndex.
Referenced by CreateShape().
BaryTriangleMesh::~BaryTriangleMesh | ( | ) |
Definition at line 60 of file barytrianglemesh.cpp.
References n, p, s, uvs, and vertexIndex.
bool lux::BaryTriangleMesh::CanIntersect | ( | ) | const [inline, virtual] |
Reimplemented from lux::Shape.
Definition at line 41 of file barytrianglemesh.h.
Shape * BaryTriangleMesh::CreateShape | ( | const Transform & | o2w, | |
bool | reverseOrientation, | |||
const ParamSet & | params | |||
) | [static] |
Definition at line 256 of file barytrianglemesh.cpp.
References BaryTriangleMesh(), lux::Cross(), lux::ParamSet::FindFloat(), lux::ParamSet::FindInt(), lux::ParamSet::FindNormal(), lux::ParamSet::FindPoint(), lux::ParamSet::FindVector(), lux::Vector::Length(), LUX_CONSISTENCY, LUX_ERROR, luxError, N, and uvs.
Referenced by lux::MakeShape().
BBox BaryTriangleMesh::ObjectBound | ( | ) | const [virtual] |
Implements lux::Shape.
Definition at line 67 of file barytrianglemesh.cpp.
References nverts, p, lux::Union(), and lux::Shape::WorldToObject.
void BaryTriangleMesh::Refine | ( | vector< boost::shared_ptr< Shape > > & | refined | ) | const |
Definition at line 81 of file barytrianglemesh.cpp.
References BaryTriangle, ntris, lux::Shape::ObjectToWorld, and lux::Shape::reverseOrientation.
BBox BaryTriangleMesh::WorldBound | ( | ) | const [virtual] |
Reimplemented from lux::Shape.
Definition at line 73 of file barytrianglemesh.cpp.
References nverts, p, and lux::Union().
friend class BaryTriangle [friend] |
Definition at line 43 of file barytrianglemesh.h.
Referenced by Refine().
friend class VertexTexture [friend] |
Definition at line 44 of file barytrianglemesh.h.
Normal* lux::BaryTriangleMesh::n [protected] |
Definition at line 52 of file barytrianglemesh.h.
Referenced by BaryTriangleMesh(), lux::BaryTriangle::GetShadingGeometry(), lux::BaryTriangle::Intersect(), and ~BaryTriangleMesh().
int lux::BaryTriangleMesh::ntris [protected] |
Definition at line 49 of file barytrianglemesh.h.
Referenced by BaryTriangleMesh(), and Refine().
int lux::BaryTriangleMesh::nverts [protected] |
Definition at line 49 of file barytrianglemesh.h.
Referenced by BaryTriangleMesh(), ObjectBound(), and WorldBound().
Point* lux::BaryTriangleMesh::p [protected] |
Definition at line 51 of file barytrianglemesh.h.
Referenced by lux::BaryTriangle::Area(), BaryTriangleMesh(), lux::BaryTriangle::GetUVs(), lux::BaryTriangle::Intersect(), lux::BaryTriangle::IntersectP(), lux::BaryTriangle::ObjectBound(), ObjectBound(), lux::BaryTriangle::Sample(), lux::BaryTriangle::WorldBound(), WorldBound(), and ~BaryTriangleMesh().
Vector* lux::BaryTriangleMesh::s [protected] |
Definition at line 53 of file barytrianglemesh.h.
Referenced by BaryTriangleMesh(), lux::BaryTriangle::GetShadingGeometry(), and ~BaryTriangleMesh().
vector<boost::shared_ptr<Shape> > lux::BaryTriangleMesh::triPtrs [protected] |
Definition at line 55 of file barytrianglemesh.h.
float* lux::BaryTriangleMesh::uvs [protected] |
Definition at line 54 of file barytrianglemesh.h.
Referenced by BaryTriangleMesh(), CreateShape(), lux::BaryTriangle::GetUVs(), and ~BaryTriangleMesh().
int* lux::BaryTriangleMesh::vertexIndex [protected] |
Definition at line 50 of file barytrianglemesh.h.
Referenced by lux::BaryTriangle::BaryTriangle(), BaryTriangleMesh(), and ~BaryTriangleMesh().