Shape Class Reference

#include <shape.h>

Inheritance diagram for Shape:
ReferenceCounted Cone Cylinder Disk Heightfield Hyperboloid LoopSubdiv NURBS Paraboloid Sphere Triangle TriangleMesh

List of all members.

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 TransformObjectToWorld
const TransformWorldToObject
const bool ReverseOrientation
const bool TransformSwapsHandedness
const uint32_t shapeId

Static Public Attributes

static uint32_t nextshapeId = 1

Detailed Description

Definition at line 39 of file shape.h.


Constructor & Destructor Documentation

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

Definition at line 34 of file shape.cpp.

Shape::~Shape (  )  [virtual]

Definition at line 30 of file shape.cpp.


Member Function Documentation

float Shape::Area (  )  const [virtual]

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

Definition at line 72 of file shape.cpp.

References Severe().

Referenced by Pdf().

bool Shape::CanIntersect (  )  const [virtual]

Reimplemented in Heightfield, LoopSubdiv, NURBS, and TriangleMesh.

Definition at line 49 of file shape.cpp.

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

Reimplemented in Triangle.

Definition at line 51 of file shape.h.

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

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

Definition at line 59 of file shape.cpp.

References Severe().

Referenced by Pdf().

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]
float Shape::Pdf ( const Point p,
const Vector wi 
) const [virtual]

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]

Definition at line 61 of file shape.h.

References Area().

Referenced by Sphere::Pdf().

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

Reimplemented in Heightfield, LoopSubdiv, NURBS, and TriangleMesh.

Definition at line 54 of file shape.cpp.

References Severe().

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

Reimplemented in Sphere.

Definition at line 64 of file shape.h.

References Sample().

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

Reimplemented in Cylinder, Disk, Sphere, and Triangle.

Definition at line 57 of file shape.h.

References Severe().

Referenced by Sample().

BBox Shape::WorldBound (  )  const [virtual]

Reimplemented in LoopSubdiv, NURBS, TriangleMesh, and Triangle.

Definition at line 44 of file shape.cpp.

References ObjectBound(), and ObjectToWorld.


Member Data Documentation

uint32_t Shape::nextshapeId = 1 [static]

Definition at line 74 of file shape.h.

const uint32_t Shape::shapeId

Definition at line 73 of file shape.h.

Definition at line 72 of file shape.h.

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


The documentation for this class was generated from the following files:
Generated on Sat Aug 28 20:00:15 2010 for pbrt by  doxygen 1.6.3