#include <SolidObject.h>
Public Member Functions | |
SolidObject (std::string name) | |
virtual | ~SolidObject () |
virtual void | setPrimitives (std::vector< Primitive * > *prList)=0 |
virtual void | setWorldMatrix (const Matrix4D &mat) |
const Matrix4D & | getWorldMatrix () const |
const Matrix4D & | getInvWorldMatrix () 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 |
ImageTexture * | displMap |
float | maxDispl |
int | displDens |
Definition at line 18 of file SolidObject.h.
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.
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 |
const Matrix4D & rcrt::SolidObject::getInvWorldMatrix | ( | ) | const |
vec | a local space Vec3D |
Definition at line 34 of file SolidObject.cpp.
References worldMatrix.
vec | a world space Vec3D |
Definition at line 39 of file SolidObject.cpp.
References invWorldMatrix.
vec | a local space Point3D |
Definition at line 44 of file SolidObject.cpp.
References worldMatrix.
vec | a world space Point3D |
Definition at line 49 of file SolidObject.cpp.
References invWorldMatrix.
no | A normal vector in local 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().
no | A normal vector in world space. |
Definition at line 59 of file SolidObject.cpp.
References rcrt::Matrix4D::transpose(), and worldMatrix.
void rcrt::SolidObject::setDisplMap | ( | ImageTexture * | it | ) |
it | A displacement map. |
Definition at line 64 of file SolidObject.cpp.
References displMap.
Referenced by testDispl1().
void rcrt::SolidObject::setMaxDispl | ( | float | m | ) |
m | The maximal displacement. |
Definition at line 68 of file SolidObject.cpp.
References maxDispl.
Referenced by testDispl1().
void rcrt::SolidObject::setDisplDens | ( | int | i | ) |
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().
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] |
float rcrt::SolidObject::maxDispl [protected] |
int rcrt::SolidObject::displDens [protected] |