#include <shape.h>
Public Member Functions | |
Shape (const Transform &o2w, bool ro) | |
virtual | ~Shape () |
virtual BBox | ObjectBound () const =0 |
virtual BBox | WorldBound () const |
virtual bool | CanIntersect () const |
virtual void | Refine (vector< boost::shared_ptr< Shape > > &refined) const |
virtual bool | Intersect (const Ray &ray, float *tHit, DifferentialGeometry *dg) const |
virtual bool | IntersectP (const Ray &ray) const |
virtual void | GetShadingGeometry (const Transform &obj2world, const DifferentialGeometry &dg, DifferentialGeometry *dgShading) const |
virtual float | Area () const |
virtual Point | Sample (float u1, float u2, Normal *Ns) const |
virtual float | Pdf (const Point &Pshape) const |
virtual Point | Sample (const Point &P, float u1, float u2, Normal *Ns) const |
virtual float | Pdf (const Point &p, const Vector &wi) const |
Public Attributes | |
const Transform | ObjectToWorld |
const Transform | WorldToObject |
const bool | reverseOrientation |
const bool | transformSwapsHandedness |
Definition at line 61 of file shape.h.
virtual float lux::Shape::Area | ( | ) | const [inline, virtual] |
Reimplemented in lux::ShapeSet, lux::BaryTriangle, lux::Cone, lux::Cylinder, lux::Disk, lux::Hyperboloid, lux::LensComponent, lux::Paraboloid, lux::Sphere, and lux::WaldTriangle.
Definition at line 90 of file shape.h.
References LUX_BUG, LUX_SEVERE, and luxError.
Referenced by Pdf().
virtual bool lux::Shape::CanIntersect | ( | ) | const [inline, virtual] |
Reimplemented in lux::ShapeSet, lux::BaryTriangleMesh, lux::Heightfield, lux::LoopSubdiv, lux::NURBS, lux::PlyMesh, and lux::WaldTriangleMesh.
virtual void lux::Shape::GetShadingGeometry | ( | const Transform & | obj2world, | |
const DifferentialGeometry & | dg, | |||
DifferentialGeometry * | dgShading | |||
) | const [inline, virtual] |
Reimplemented in lux::BaryTriangle, and lux::WaldTriangle.
virtual bool lux::Shape::Intersect | ( | const Ray & | ray, | |
float * | tHit, | |||
DifferentialGeometry * | dg | |||
) | const [inline, virtual] |
Reimplemented in lux::ShapeSet, lux::BaryTriangle, lux::Cone, lux::Cylinder, lux::Disk, lux::Hyperboloid, lux::LensComponent, lux::Paraboloid, lux::Sphere, and lux::WaldTriangle.
Definition at line 76 of file shape.h.
References LUX_BUG, LUX_SEVERE, and luxError.
Referenced by Pdf().
virtual bool lux::Shape::IntersectP | ( | const Ray & | ray | ) | const [inline, virtual] |
Reimplemented in lux::BaryTriangle, lux::Cone, lux::Cylinder, lux::Disk, lux::Hyperboloid, lux::LensComponent, lux::Paraboloid, lux::Sphere, and lux::WaldTriangle.
Definition at line 81 of file shape.h.
References LUX_BUG, LUX_SEVERE, and luxError.
virtual BBox lux::Shape::ObjectBound | ( | ) | const [pure virtual] |
Implemented in lux::ShapeSet, lux::BaryTriangleMesh, lux::BaryTriangle, lux::Cone, lux::Cylinder, lux::Disk, lux::Heightfield, lux::Hyperboloid, lux::LensComponent, lux::LoopSubdiv, lux::NURBS, lux::Paraboloid, lux::PlyMesh, lux::Sphere, lux::WaldTriangleMesh, and lux::WaldTriangle.
Referenced by WorldBound().
Reimplemented in lux::Sphere.
Definition at line 105 of file shape.h.
References lux::AbsDot(), Area(), lux::DistanceSquared(), INFINITY, Intersect(), and lux::DifferentialGeometry::nn.
virtual float lux::Shape::Pdf | ( | const Point & | Pshape | ) | const [inline, virtual] |
virtual void lux::Shape::Refine | ( | vector< boost::shared_ptr< Shape > > & | refined | ) | const [inline, virtual] |
Definition at line 72 of file shape.h.
References LUX_BUG, LUX_SEVERE, and luxError.
Reimplemented in lux::ShapeSet, lux::BaryTriangle, lux::Cylinder, lux::Disk, lux::LensComponent, lux::Sphere, and lux::WaldTriangle.
Definition at line 94 of file shape.h.
References LUX_BUG, LUX_SEVERE, and luxError.
Referenced by Sample().
virtual BBox lux::Shape::WorldBound | ( | ) | const [inline, virtual] |
Reimplemented in lux::BaryTriangleMesh, lux::BaryTriangle, lux::LoopSubdiv, lux::NURBS, lux::PlyMesh, lux::WaldTriangleMesh, and lux::WaldTriangle.
Definition at line 67 of file shape.h.
References ObjectBound(), and ObjectToWorld.
Referenced by lux::ShapeSet::ShapeSet().
Definition at line 118 of file shape.h.
Referenced by lux::LoopSubdiv::ApplyDisplacementMap(), lux::BaryTriangleMesh::BaryTriangleMesh(), lux::WaldTriangle::GetShadingGeometry(), lux::BaryTriangle::GetShadingGeometry(), lux::Sphere::Intersect(), lux::Paraboloid::Intersect(), lux::LensComponent::Intersect(), lux::Hyperboloid::Intersect(), lux::Disk::Intersect(), lux::Cylinder::Intersect(), lux::Cone::Intersect(), lux::BaryTriangle::Intersect(), lux::Sphere::Pdf(), lux::PlyMesh::PlyMesh(), lux::WaldTriangleMesh::Refine(), lux::PlyMesh::Refine(), lux::NURBS::Refine(), lux::LoopSubdiv::Refine(), lux::Heightfield::Refine(), lux::BaryTriangleMesh::Refine(), lux::Sphere::Sample(), lux::LensComponent::Sample(), lux::Disk::Sample(), lux::Cylinder::Sample(), lux::WaldTriangle::WaldTriangle(), lux::WaldTriangleMesh::WaldTriangleMesh(), WorldBound(), lux::NURBS::WorldBound(), and lux::LoopSubdiv::WorldBound().
const bool lux::Shape::reverseOrientation |
Definition at line 119 of file shape.h.
Referenced by lux::Material::Bump(), lux::DifferentialGeometry::DifferentialGeometry(), lux::WaldTriangleMesh::Refine(), lux::PlyMesh::Refine(), lux::NURBS::Refine(), lux::LoopSubdiv::Refine(), lux::Heightfield::Refine(), lux::BaryTriangleMesh::Refine(), lux::Sphere::Sample(), lux::Disk::Sample(), lux::Cylinder::Sample(), lux::BaryTriangle::Sample(), and lux::WaldTriangle::WaldTriangle().
const bool lux::Shape::transformSwapsHandedness |
Definition at line 119 of file shape.h.
Referenced by lux::Material::Bump(), lux::DifferentialGeometry::DifferentialGeometry(), and lux::WaldTriangle::WaldTriangle().
Definition at line 118 of file shape.h.
Referenced by lux::Sphere::Intersect(), lux::Paraboloid::Intersect(), lux::LensComponent::Intersect(), lux::Hyperboloid::Intersect(), lux::Disk::Intersect(), lux::Cylinder::Intersect(), lux::Cone::Intersect(), lux::Sphere::IntersectP(), lux::Paraboloid::IntersectP(), lux::LensComponent::IntersectP(), lux::Hyperboloid::IntersectP(), lux::Disk::IntersectP(), lux::Cylinder::IntersectP(), lux::Cone::IntersectP(), lux::WaldTriangle::ObjectBound(), lux::WaldTriangleMesh::ObjectBound(), lux::PlyMesh::ObjectBound(), lux::BaryTriangle::ObjectBound(), and lux::BaryTriangleMesh::ObjectBound().