rcrt::AffineObject Class Reference

#include <AffineObject.h>

Inheritance diagram for rcrt::AffineObject:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 AffineObject (std::string name)
virtual ~AffineObject ()
void setPrimitives (std::vector< Primitive * > *prList)
virtual void setWorldMatrix (const Matrix4D &mat)
virtual Intersection intersect (Ray &r) const
virtual const AABBgetBoundingBox () const
virtual const Point3DgetCentroid () const

Private Member Functions

void updateWorldBox ()

Private Attributes

SAHKDtree< PrimitivelocalTree
AABB worldBox


Detailed Description

An object that has only affine motion, or none at all.

Uses a local space KDtree built with the SAH for maximum efficiency.

Definition at line 19 of file AffineObject.h.


Constructor & Destructor Documentation

rcrt::AffineObject::AffineObject ( std::string  name  ) 

Definition at line 8 of file AffineObject.cpp.

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

Definition at line 12 of file AffineObject.cpp.


Member Function Documentation

void rcrt::AffineObject::updateWorldBox (  )  [private]

Definition at line 16 of file AffineObject.cpp.

References localTree, worldBox, and rcrt::SolidObject::worldMatrix.

Referenced by setPrimitives(), and setWorldMatrix().

void rcrt::AffineObject::setPrimitives ( std::vector< Primitive * > *  prList  )  [virtual]

Parameters:
prList a vector of primitives.

Implements rcrt::SolidObject.

Definition at line 21 of file AffineObject.cpp.

References localTree, rcrt::Object::name, and updateWorldBox().

Referenced by testDispl1().

void rcrt::AffineObject::setWorldMatrix ( const Matrix4D mat  )  [virtual]

Reimplemented from rcrt::SolidObject.

Definition at line 28 of file AffineObject.cpp.

References rcrt::Matrix4D::inverse(), rcrt::SolidObject::invWorldMatrix, updateWorldBox(), and rcrt::SolidObject::worldMatrix.

Referenced by testDispl1().

Intersection rcrt::AffineObject::intersect ( Ray r  )  const [virtual]

Parameters:
The ray that will be tested against.
Returns:
An Intersection that contains the closest intersection that can be determined.

Implements rcrt::Traceable.

Definition at line 35 of file AffineObject.cpp.

References rcrt::Ray::atDistance(), rcrt::Intersection::backSide(), rcrt::Ray::dir(), rcrt::Intersection::getGNormalL(), rcrt::Intersection::getParams(), rcrt::Intersection::getPosition(), rcrt::Intersection::getPrimitive(), rcrt::Intersection::getSNormalL(), rcrt::AABB::intersect(), rcrt::SolidObject::invWorldMatrix, rcrt::Intersection::isValid(), localTree, rcrt::Ray::org(), rcrt::Ray::setMinDist(), rcrt::Ray::tris, worldBox, rcrt::SolidObject::worldMatrix, rcrt::Point2D::x(), and rcrt::Point2D::y().

const AABB & rcrt::AffineObject::getBoundingBox (  )  const [virtual]

Returns:
The minimum Axis-Aligned Bounding Box of this Traceable.

Implements rcrt::Traceable.

Definition at line 57 of file AffineObject.cpp.

References worldBox.

const Point3D & rcrt::AffineObject::getCentroid (  )  const [virtual]

Returns:
Some kind of central point of this object. This may just be an approximation (e.g. the central point of the AABB).

Implements rcrt::Traceable.

Definition at line 62 of file AffineObject.cpp.

References rcrt::AABB::getCentroid(), and worldBox.


Member Data Documentation

SAHKDtree<Primitive> rcrt::AffineObject::localTree [private]

Definition at line 22 of file AffineObject.h.

Referenced by intersect(), setPrimitives(), and updateWorldBox().

AABB rcrt::AffineObject::worldBox [private]

Definition at line 23 of file AffineObject.h.

Referenced by getBoundingBox(), getCentroid(), intersect(), and updateWorldBox().


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