rcrt::SolidObject Class Reference

#include <SolidObject.h>

Inheritance diagram for rcrt::SolidObject:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 SolidObject (std::string name)
virtual ~SolidObject ()
virtual void setPrimitives (std::vector< Primitive * > *prList)=0
virtual void setWorldMatrix (const Matrix4D &mat)
const Matrix4DgetWorldMatrix () const
const Matrix4DgetInvWorldMatrix () const
Vec3D toWorld (const Vec3D &vec) const
Vec3D toLocal (const Vec3D &vec) const
Point3D toWorld (const Point3D &vec) const
Point3D toLocal (const Point3D &vec) const
Vec3D normalToWorld (const Vec3D &no) const
Vec3D normalToLocal (const Vec3D &no) const
void setDisplMap (ImageTexture *it)
void setMaxDispl (float m)
void setDisplDens (int i)
const ImageTexture *const getDisplMap () const
const float & getMaxDispl () const
const int & getDisplDens () const

Protected Attributes

Matrix4D worldMatrix
Matrix4D invWorldMatrix
ImageTexturedisplMap
float maxDispl
int displDens


Detailed Description

A solid object has primitives and may be displaced by a texture.

Definition at line 18 of file SolidObject.h.


Constructor & Destructor Documentation

rcrt::SolidObject::SolidObject ( std::string  name  ) 

Definition at line 8 of file SolidObject.cpp.

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

Definition at line 13 of file SolidObject.cpp.


Member Function Documentation

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

Implemented in rcrt::AffineObject, and rcrt::DynamicObject.

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

Reimplemented in rcrt::AffineObject, and rcrt::DynamicObject.

Definition at line 18 of file SolidObject.cpp.

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

const Matrix4D & rcrt::SolidObject::getWorldMatrix (  )  const

Definition at line 24 of file SolidObject.cpp.

References worldMatrix.

const Matrix4D & rcrt::SolidObject::getInvWorldMatrix (  )  const

Definition at line 29 of file SolidObject.cpp.

References invWorldMatrix.

Vec3D rcrt::SolidObject::toWorld ( const Vec3D vec  )  const

Parameters:
vec a local space Vec3D
Returns:
the vector transformed to world space.

Definition at line 34 of file SolidObject.cpp.

References worldMatrix.

Vec3D rcrt::SolidObject::toLocal ( const Vec3D vec  )  const

Parameters:
vec a world space Vec3D
Returns:
the vector transformed to local space.

Definition at line 39 of file SolidObject.cpp.

References invWorldMatrix.

Point3D rcrt::SolidObject::toWorld ( const Point3D vec  )  const

Parameters:
vec a local space Point3D
Returns:
the point transformed to world space.

Definition at line 44 of file SolidObject.cpp.

References worldMatrix.

Point3D rcrt::SolidObject::toLocal ( const Point3D vec  )  const

Parameters:
vec a world space Point3D
Returns:
the point transformed to local space.

Definition at line 49 of file SolidObject.cpp.

References invWorldMatrix.

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

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

Definition at line 54 of file SolidObject.cpp.

References invWorldMatrix, and rcrt::Matrix4D::transpose().

Referenced by rcrt::Primitive::getGNormalWorld(), rcrt::Primitive::getSNormalWorld(), and rcrt::Primitive::normalToWorld().

Vec3D rcrt::SolidObject::normalToLocal ( const Vec3D no  )  const

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

Definition at line 59 of file SolidObject.cpp.

References rcrt::Matrix4D::transpose(), and worldMatrix.

void rcrt::SolidObject::setDisplMap ( ImageTexture it  ) 

Parameters:
it A displacement map.

Definition at line 64 of file SolidObject.cpp.

References displMap.

Referenced by testDispl1().

void rcrt::SolidObject::setMaxDispl ( float  m  ) 

Parameters:
m The maximal displacement.

Definition at line 68 of file SolidObject.cpp.

References maxDispl.

Referenced by testDispl1().

void rcrt::SolidObject::setDisplDens ( int  i  ) 

Parameters:
i The number of subdivisions. (E.g. along each edge of a Triangle)

Definition at line 72 of file SolidObject.cpp.

References displDens.

Referenced by testDispl1().

const ImageTexture *const rcrt::SolidObject::getDisplMap (  )  const

Definition at line 77 of file SolidObject.cpp.

References displMap.

Referenced by rcrt::DisplacedTriangle::getDispPoint().

const float & rcrt::SolidObject::getMaxDispl (  )  const

Definition at line 82 of file SolidObject.cpp.

References maxDispl.

Referenced by rcrt::DisplacedTriangle::DisplacedTriangle(), and rcrt::DisplacedTriangle::getDispPoint().

const int & rcrt::SolidObject::getDisplDens (  )  const

Definition at line 87 of file SolidObject.cpp.

References displDens.

Referenced by rcrt::DisplacedTriangle::DisplacedTriangle(), and rcrt::DisplacedTriangle::intersect().


Member Data Documentation

Matrix4D rcrt::SolidObject::worldMatrix [protected]

Definition at line 21 of file SolidObject.h.

Referenced by rcrt::DynamicObject::DynamicObject(), getWorldMatrix(), rcrt::AffineObject::intersect(), normalToLocal(), setWorldMatrix(), rcrt::AffineObject::setWorldMatrix(), toWorld(), and rcrt::AffineObject::updateWorldBox().

Matrix4D rcrt::SolidObject::invWorldMatrix [protected]

Definition at line 22 of file SolidObject.h.

Referenced by rcrt::DynamicObject::DynamicObject(), getInvWorldMatrix(), rcrt::AffineObject::intersect(), normalToWorld(), setWorldMatrix(), rcrt::AffineObject::setWorldMatrix(), and toLocal().

ImageTexture* rcrt::SolidObject::displMap [protected]

Definition at line 23 of file SolidObject.h.

Referenced by getDisplMap(), and setDisplMap().

float rcrt::SolidObject::maxDispl [protected]

Definition at line 24 of file SolidObject.h.

Referenced by getMaxDispl(), and setMaxDispl().

int rcrt::SolidObject::displDens [protected]

Definition at line 25 of file SolidObject.h.

Referenced by getDisplDens(), and setDisplDens().


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