Shape Class Reference

#include <shape.h>

Inheritance diagram for Shape:

ReferenceCounted Cone Cylinder Disk Heightfield Hyperboloid LoopSubdiv NURBS Paraboloid ShapeSet Sphere Triangle TriangleMesh List of all members.

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< Reference< 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

Detailed Description

Definition at line 38 of file shape.h.


Constructor & Destructor Documentation

Shape::Shape ( const Transform o2w,
bool  ro 
)

Definition at line 14 of file shape.cpp.

virtual Shape::~Shape (  )  [inline, virtual]

Definition at line 42 of file shape.h.


Member Function Documentation

virtual BBox Shape::ObjectBound (  )  const [pure virtual]

Implemented in ShapeSet, Cone, Cylinder, Disk, Heightfield, Hyperboloid, LoopSubdiv, NURBS, Paraboloid, Sphere, TriangleMesh, and Triangle.

virtual BBox Shape::WorldBound (  )  const [inline, virtual]

Reimplemented in LoopSubdiv, NURBS, TriangleMesh, and Triangle.

Definition at line 44 of file shape.h.

virtual bool Shape::CanIntersect (  )  const [inline, virtual]

Reimplemented in ShapeSet, Heightfield, LoopSubdiv, NURBS, and TriangleMesh.

Definition at line 47 of file shape.h.

virtual void Shape::Refine ( vector< Reference< Shape > > &  refined  )  const [inline, virtual]

Reimplemented in ShapeSet, Heightfield, LoopSubdiv, NURBS, and TriangleMesh.

Definition at line 49 of file shape.h.

References Severe().

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

Reimplemented in ShapeSet, Cone, Cylinder, Disk, Hyperboloid, Paraboloid, Sphere, and Triangle.

Definition at line 52 of file shape.h.

References Severe().

virtual bool Shape::IntersectP ( const Ray ray  )  const [inline, virtual]

Reimplemented in Cone, Cylinder, Disk, Hyperboloid, Paraboloid, Sphere, and Triangle.

Definition at line 58 of file shape.h.

References Severe().

virtual void Shape::GetShadingGeometry ( const Transform obj2world,
const DifferentialGeometry dg,
DifferentialGeometry dgShading 
) const [inline, virtual]

Reimplemented in Triangle.

Definition at line 63 of file shape.h.

virtual float Shape::Area (  )  const [inline, virtual]

Reimplemented in ShapeSet, Cone, Cylinder, Disk, Hyperboloid, Paraboloid, Sphere, and Triangle.

Definition at line 68 of file shape.h.

References Severe().

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

Reimplemented in ShapeSet, Cylinder, Disk, Sphere, and Triangle.

Definition at line 72 of file shape.h.

References Severe().

virtual float Shape::Pdf ( const Point Pshape  )  const [inline, virtual]

Definition at line 76 of file shape.h.

Referenced by Sphere::Pdf().

virtual Point Shape::Sample ( const Point P,
float  u1,
float  u2,
Normal Ns 
) const [inline, virtual]

Reimplemented in Sphere.

Definition at line 79 of file shape.h.

virtual float Shape::Pdf ( const Point p,
const Vector wi 
) const [inline, virtual]

Reimplemented in Sphere.

Definition at line 83 of file shape.h.

References AbsDot(), DistanceSquared(), INFINITY, and DifferentialGeometry::nn.


Member Data Documentation

const Transform Shape::ObjectToWorld

Definition at line 96 of file shape.h.

Referenced by Triangle::GetShadingGeometry(), Sphere::Intersect(), Paraboloid::Intersect(), Hyperboloid::Intersect(), Disk::Intersect(), Cylinder::Intersect(), Cone::Intersect(), Sphere::Pdf(), TriangleMesh::Refine(), NURBS::Refine(), LoopSubdiv::Refine(), Heightfield::Refine(), Sphere::Sample(), Disk::Sample(), Cylinder::Sample(), TriangleMesh::TriangleMesh(), NURBS::WorldBound(), and LoopSubdiv::WorldBound().

const Transform Shape::WorldToObject

Definition at line 96 of file shape.h.

Referenced by Sphere::Intersect(), Paraboloid::Intersect(), Hyperboloid::Intersect(), Disk::Intersect(), Cylinder::Intersect(), Cone::Intersect(), Sphere::IntersectP(), Paraboloid::IntersectP(), Hyperboloid::IntersectP(), Disk::IntersectP(), Cylinder::IntersectP(), Cone::IntersectP(), Triangle::ObjectBound(), and TriangleMesh::ObjectBound().

const bool Shape::reverseOrientation

Definition at line 97 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 bool Shape::transformSwapsHandedness

Definition at line 97 of file shape.h.

Referenced by Material::Bump(), and DifferentialGeometry::DifferentialGeometry().


The documentation for this class was generated from the following files:
Generated on Wed Sep 26 14:01:27 2007 for pbrt by  doxygen 1.5.1