rcrt::DynamicObject Class Reference

#include <DynamicObject.h>

Inheritance diagram for rcrt::DynamicObject:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 DynamicObject (std::string name)
virtual ~DynamicObject ()
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 Attributes

BIH< PrimitivelocalTree


Detailed Description

An object that has motion other than affine or none.

Dynamic objects are stored and loaded in world space coordinates to avoid matrix multiplications.

Uses a BIH that can be recomputed very fast, instead of a SAH based KDTree.

Definition at line 18 of file DynamicObject.h.


Constructor & Destructor Documentation

rcrt::DynamicObject::DynamicObject ( std::string  name  ) 

Definition at line 8 of file DynamicObject.cpp.

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

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

Definition at line 14 of file DynamicObject.cpp.


Member Function Documentation

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

Implements rcrt::SolidObject.

Definition at line 19 of file DynamicObject.cpp.

References localTree.

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

This does nothing, as we are alway in worldspace.

Reimplemented from rcrt::SolidObject.

Definition at line 24 of file DynamicObject.cpp.

Intersection rcrt::DynamicObject::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 29 of file DynamicObject.cpp.

References rcrt::Intersection::isValid(), and localTree.

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

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

Implements rcrt::Traceable.

Definition at line 39 of file DynamicObject.cpp.

References localTree.

const Point3D & rcrt::DynamicObject::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 44 of file DynamicObject.cpp.

References localTree.


Member Data Documentation

BIH<Primitive> rcrt::DynamicObject::localTree [private]

Definition at line 21 of file DynamicObject.h.

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


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