#include <shape.h>
Public Member Functions | |
Shape (const Transform *o2w, const Transform *w2o, bool ro) | |
virtual | ~Shape () |
virtual BBox | ObjectBound () const =0 |
virtual BBox | WorldBound () const |
virtual bool | CanIntersect () const |
virtual void | Refine (vector< Reference< Shape > > &refined) const |
virtual bool | Intersect (const Ray &ray, float *tHit, float *rayEpsilon, 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 |
const uint32_t | shapeId |
Static Public Attributes | |
static uint32_t | nextshapeId = 1 |
Definition at line 39 of file shape.h.
float Shape::Area | ( | ) | const [virtual] |
bool Shape::CanIntersect | ( | ) | const [virtual] |
Reimplemented in Heightfield, LoopSubdiv, NURBS, and TriangleMesh.
virtual void Shape::GetShadingGeometry | ( | const Transform & | obj2world, | |
const DifferentialGeometry & | dg, | |||
DifferentialGeometry * | dgShading | |||
) | const [inline, virtual] |
bool Shape::Intersect | ( | const Ray & | ray, | |
float * | tHit, | |||
float * | rayEpsilon, | |||
DifferentialGeometry * | dg | |||
) | const [virtual] |
bool Shape::IntersectP | ( | const Ray & | ray | ) | const [virtual] |
Reimplemented in Cone, Cylinder, Disk, Hyperboloid, Paraboloid, Sphere, and Triangle.
Definition at line 66 of file shape.cpp.
References Severe().
virtual BBox Shape::ObjectBound | ( | ) | const [pure virtual] |
Implemented in Cone, Cylinder, Disk, Heightfield, Hyperboloid, LoopSubdiv, NURBS, Paraboloid, Sphere, TriangleMesh, and Triangle.
Referenced by WorldBound().
Reimplemented in Sphere.
Definition at line 78 of file shape.cpp.
References AbsDot(), Area(), Ray::depth, DistanceSquared(), Intersect(), and DifferentialGeometry::nn.
virtual float Shape::Pdf | ( | const Point & | Pshape | ) | const [inline, virtual] |
Reimplemented in Heightfield, LoopSubdiv, NURBS, and TriangleMesh.
Definition at line 54 of file shape.cpp.
References Severe().
BBox Shape::WorldBound | ( | ) | const [virtual] |
Reimplemented in LoopSubdiv, NURBS, TriangleMesh, and Triangle.
Definition at line 44 of file shape.cpp.
References ObjectBound(), and ObjectToWorld.
uint32_t Shape::nextshapeId = 1 [static] |
const Transform* Shape::ObjectToWorld |
Definition at line 71 of file shape.h.
Referenced by Triangle::GetShadingGeometry(), Sphere::Intersect(), Paraboloid::Intersect(), Hyperboloid::Intersect(), Disk::Intersect(), Cylinder::Intersect(), Cone::Intersect(), TriangleMesh::Refine(), NURBS::Refine(), LoopSubdiv::Refine(), Heightfield::Refine(), Sphere::Sample(), Disk::Sample(), Cylinder::Sample(), TriangleMesh::TriangleMesh(), WorldBound(), and LoopSubdiv::WorldBound().
const bool Shape::ReverseOrientation |
Definition at line 72 of file shape.h.
Referenced by Material::Bump(), DifferentialGeometry::DifferentialGeometry(), TriangleMesh::Refine(), NURBS::Refine(), LoopSubdiv::Refine(), Heightfield::Refine(), Triangle::Sample(), Sphere::Sample(), Disk::Sample(), and Cylinder::Sample().
const uint32_t Shape::shapeId |
const bool Shape::TransformSwapsHandedness |
Definition at line 72 of file shape.h.
Referenced by Material::Bump(), and DifferentialGeometry::DifferentialGeometry().
const Transform * Shape::WorldToObject |
Definition at line 71 of file shape.h.
Referenced by Triangle::ObjectBound(), TriangleMesh::ObjectBound(), TriangleMesh::Refine(), NURBS::Refine(), LoopSubdiv::Refine(), and Heightfield::Refine().