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 51 of file shape.h.


Constructor & Destructor Documentation

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

Definition at line 27 of file shape.cpp.

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

Definition at line 55 of file shape.h.


Member Function Documentation

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

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

Reimplemented in LoopSubdiv, NURBS, TriangleMesh, and Triangle.

Definition at line 57 of file shape.h.

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

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

Definition at line 60 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 62 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 65 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 71 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 76 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 81 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 85 of file shape.h.

References Severe().

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

Definition at line 89 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 92 of file shape.h.

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

Reimplemented in Sphere.

Definition at line 96 of file shape.h.

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


Member Data Documentation

Definition at line 110 of file shape.h.

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


The documentation for this class was generated from the following files:

Generated on Mon Jul 20 17:31:56 2009 for pbrt by  doxygen 1.5.6