#include <Primitive.h>
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 |
SolidObject * | getParent () const |
virtual Material *const | getMaterial () const |
Protected Attributes | |
SolidObject * | parent |
Definition at line 15 of file Primitive.h.
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.
virtual Vec3D rcrt::Primitive::getSNormal | ( | float | a, | |
float | b | |||
) | const [pure virtual] |
a | 2D Parameterization of the surface | |
b | 2D Parameterization of the surface |
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] |
a | 2D Parameterization of the surface | |
b | 2D Parameterization of the surface |
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 |
a | 2D Parameterization of the surface | |
b | 2D Parameterization of the surface |
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 |
a | 2D Parameterization of the surface | |
b | 2D Parameterization of the surface |
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] |
a | 2D Parameterization of the surface | |
b | 2D Parameterization of the surface |
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] |
a | 2D Parameterization of the surface | |
b | 2D Parameterization of the surface |
Implemented in rcrt::AABB, rcrt::ConvexQuad, rcrt::Sphere, and rcrt::Triangle.
Referenced by rcrt::Intersection::getUV().
no | A normal vector. |
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 |
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] |
Definition at line 37 of file Primitive.cpp.
References rcrt::Object::getMaterial(), and parent.
Referenced by rcrt::PhotonMap::getRadiance(), and rcrt::Scene::isOccluded().
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().