rcrt::Primitive Class Reference

#include <Primitive.h>

Inheritance diagram for rcrt::Primitive:

Inheritance graph
[legend]
Collaboration diagram for rcrt::Primitive:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Primitive (SolidObject *parent=0)
virtual ~Primitive ()
virtual Vec3D getSNormal (float a, float b) const =0
virtual Vec3D getGNormal (float a, float b) const =0
Vec3D getSNormalWorld (float a, float b) const
Vec3D getGNormalWorld (float a, float b) const
virtual Vec3D getTangent (float a, float b) const
virtual Point2D getUV (float a, float b) const =0
Vec3D normalToWorld (const Vec3D &no) const
SolidObjectgetParent () const
virtual Material *const getMaterial () const

Protected Attributes

SolidObjectparent


Detailed Description

The base class of all Triangles/AABBs/Quads/Spheres/etc.

Definition at line 15 of file Primitive.h.


Constructor & Destructor Documentation

rcrt::Primitive::Primitive ( SolidObject parent = 0  ) 

Definition at line 7 of file Primitive.cpp.

rcrt::Primitive::~Primitive (  )  [virtual]

Definition at line 12 of file Primitive.cpp.


Member Function Documentation

virtual Vec3D rcrt::Primitive::getSNormal ( float  a,
float  b 
) const [pure virtual]

Parameters:
a 2D Parameterization of the surface
b 2D Parameterization of the surface
Returns:
The local space shading normal of the parameterized point on the primitive.

Implemented in rcrt::AABB, rcrt::ConvexQuad, rcrt::Sphere, and rcrt::Triangle.

Referenced by rcrt::Intersection::getSNormalL(), and getSNormalWorld().

virtual Vec3D rcrt::Primitive::getGNormal ( float  a,
float  b 
) const [pure virtual]

Parameters:
a 2D Parameterization of the surface
b 2D Parameterization of the surface
Returns:
The local space geometry normal of the parameterized point on the primitive.

Implemented in rcrt::AABB, rcrt::ConvexQuad, rcrt::Sphere, and rcrt::Triangle.

Referenced by rcrt::Intersection::getGNormalL(), and getGNormalWorld().

Vec3D rcrt::Primitive::getSNormalWorld ( float  a,
float  b 
) const

Parameters:
a 2D Parameterization of the surface
b 2D Parameterization of the surface
Returns:
The world space shading normal of the parameterized point on the primitive.

Definition at line 22 of file Primitive.cpp.

References getSNormal(), rcrt::SolidObject::normalToWorld(), and parent.

Referenced by rcrt::Intersection::getSNormalW().

Vec3D rcrt::Primitive::getGNormalWorld ( float  a,
float  b 
) const

Parameters:
a 2D Parameterization of the surface
b 2D Parameterization of the surface
Returns:
The world space geometry normal of the parameterized point on the primitive.

Definition at line 27 of file Primitive.cpp.

References getGNormal(), rcrt::SolidObject::normalToWorld(), and parent.

Referenced by rcrt::Intersection::getGNormalW().

Vec3D rcrt::Primitive::getTangent ( float  a,
float  b 
) const [virtual]

Parameters:
a 2D Parameterization of the surface
b 2D Parameterization of the surface
Returns:
The local space tangent vector of the parameterized point on the primitive.

Reimplemented in rcrt::Triangle.

Definition at line 32 of file Primitive.cpp.

Referenced by rcrt::Material::getShadingNormal().

virtual Point2D rcrt::Primitive::getUV ( float  a,
float  b 
) const [pure virtual]

Parameters:
a 2D Parameterization of the surface
b 2D Parameterization of the surface
Returns:
UV texture coordinates of this point.

Implemented in rcrt::AABB, rcrt::ConvexQuad, rcrt::Sphere, and rcrt::Triangle.

Referenced by rcrt::Intersection::getUV().

Vec3D rcrt::Primitive::normalToWorld ( const Vec3D no  )  const

Parameters:
no A normal vector.
Returns:
the given normal vector transformed to world space.

Definition at line 42 of file Primitive.cpp.

References rcrt::SolidObject::normalToWorld(), and parent.

Referenced by rcrt::Intersection::getGNormalW(), and rcrt::Intersection::getSNormalW().

SolidObject * rcrt::Primitive::getParent (  )  const

Returns:
the parent object of this primitive.

Definition at line 17 of file Primitive.cpp.

References parent.

Referenced by rcrt::SimpleTracer::directLight(), rcrt::PhotonTracer::directLight(), rcrt::SimpleTracer::trace(), rcrt::RayCaster::trace(), and rcrt::PhotonTracer::trace().

Material *const rcrt::Primitive::getMaterial (  )  const [virtual]

Returns:
the material on this primitive.

Definition at line 37 of file Primitive.cpp.

References rcrt::Object::getMaterial(), and parent.

Referenced by rcrt::PhotonMap::getRadiance(), and rcrt::Scene::isOccluded().


Member Data Documentation

SolidObject* rcrt::Primitive::parent [protected]

The object to which this primitive belongs.

Definition at line 21 of file Primitive.h.

Referenced by rcrt::DisplacedTriangle::getDispPoint(), getGNormalWorld(), getMaterial(), getParent(), getSNormalWorld(), rcrt::DisplacedTriangle::intersect(), and normalToWorld().


The documentation for this class was generated from the following files:
Generated on Thu Jan 31 19:33:08 2008 for RenderingCompetitionRayTracer by  doxygen 1.5.3