#include <DisplacedTriangle.h>
Public Member Functions | |
DisplacedTriangle (Vertex *av, Vertex *bv, Vertex *cv, SolidObject *parent) | |
virtual | ~DisplacedTriangle () |
Intersection | baseIntersect (Ray &ray) const |
Intersection | intersect (Ray &ray) const |
Point3D | getDispPoint (float beta, float gamma) const |
Vec3D | getDispNormal (float beta, float gamma) const |
Point3D | getDispPoint (const Point2D &p) const |
Vec3D | getDispNormal (const Point2D &p) const |
Protected Attributes | |
Point3D | da |
Point3D | db |
Point3D | dc |
ConvexQuad * | ab |
ConvexQuad * | bc |
ConvexQuad * | ca |
Triangle * | upper |
SAHKDtree< Triangle > | tree |
std::vector < Triangle * > * | triangles |
Definition at line 15 of file DisplacedTriangle.h.
rcrt::DisplacedTriangle::DisplacedTriangle | ( | Vertex * | av, | |
Vertex * | bv, | |||
Vertex * | cv, | |||
SolidObject * | parent | |||
) |
Definition at line 8 of file DisplacedTriangle.cpp.
References rcrt::Triangle::a, ab, rcrt::Triangle::b, bc, rcrt::Triangle::box, rcrt::Triangle::c, ca, da, db, dc, rcrt::AABB::extend(), rcrt::Triangle::faceNormal, rcrt::SolidObject::getDisplDens(), getDispPoint(), rcrt::SolidObject::getMaxDispl(), rcrt::Vertex::normal(), rcrt::Vertex::pos(), tree, rcrt::Triangle::Triangle(), triangles, and upper.
rcrt::DisplacedTriangle::~DisplacedTriangle | ( | ) | [virtual] |
Intersection rcrt::DisplacedTriangle::baseIntersect | ( | Ray & | ray | ) | const |
Definition at line 83 of file DisplacedTriangle.cpp.
References rcrt::Triangle::a, rcrt::Ray::atDistance(), rcrt::Triangle::b, rcrt::Triangle::c, rcrt::Vec3D::crossP(), rcrt::Ray::dir(), rcrt::Triangle::faceNormal, rcrt::Ray::maxDist(), rcrt::Ray::org(), rcrt::Vertex::pos(), and rcrt::Ray::tris.
Referenced by intersect().
Intersection rcrt::DisplacedTriangle::intersect | ( | Ray & | r | ) | const [virtual] |
The | ray that will be tested against. |
Reimplemented from rcrt::Triangle.
Definition at line 119 of file DisplacedTriangle.cpp.
References rcrt::Triangle::a, ab, rcrt::Triangle::b, baseIntersect(), bc, rcrt::Triangle::box, rcrt::Triangle::c, ca, rcrt::Vec3D::crossP(), da, db, dc, rcrt::Ray::dir(), rcrt::Triangle::faceNormal, rcrt::SolidObject::getDisplDens(), getDispNormal(), getDispPoint(), rcrt::Intersection::getDistance(), rcrt::Intersection::getParams(), rcrt::Triangle::getPoint(), rcrt::Intersection::getPosition(), rcrt::Intersection::getPrimitive(), rcrt::ConvexQuad::intersect(), rcrt::Triangle::intersect(), rcrt::AABB::intersect(), rcrt::Intersection::isValid(), rcrt::Ray::org(), rcrt::Primitive::parent, rcrt::Vertex::pos(), rcrt::Intersection::setGNormalL(), rcrt::Intersection::setPrimitive(), rcrt::Intersection::setSNormalL(), rcrt::Triangle::Triangle(), triangles, and upper.
Point3D rcrt::DisplacedTriangle::getDispPoint | ( | float | beta, | |
float | gamma | |||
) | const |
Definition at line 783 of file DisplacedTriangle.cpp.
References rcrt::ImageTexture::getColor(), rcrt::SolidObject::getDisplMap(), rcrt::RGBAColor::getLuminance(), rcrt::SolidObject::getMaxDispl(), rcrt::Triangle::getPoint(), rcrt::Triangle::getUV(), rcrt::Primitive::parent, and upper.
Referenced by DisplacedTriangle(), getDispPoint(), and intersect().
Vec3D rcrt::DisplacedTriangle::getDispNormal | ( | float | beta, | |
float | gamma | |||
) | const |
Definition at line 789 of file DisplacedTriangle.cpp.
References rcrt::Triangle::getPoint(), and upper.
Referenced by getDispNormal(), and intersect().
Point3D rcrt::DisplacedTriangle::da [protected] |
Definition at line 18 of file DisplacedTriangle.h.
Referenced by DisplacedTriangle(), and intersect().
Point3D rcrt::DisplacedTriangle::db [protected] |
Definition at line 18 of file DisplacedTriangle.h.
Referenced by DisplacedTriangle(), and intersect().
Point3D rcrt::DisplacedTriangle::dc [protected] |
Definition at line 18 of file DisplacedTriangle.h.
Referenced by DisplacedTriangle(), and intersect().
ConvexQuad* rcrt::DisplacedTriangle::ab [protected] |
Definition at line 19 of file DisplacedTriangle.h.
Referenced by DisplacedTriangle(), intersect(), and ~DisplacedTriangle().
ConvexQuad * rcrt::DisplacedTriangle::bc [protected] |
Definition at line 19 of file DisplacedTriangle.h.
Referenced by DisplacedTriangle(), intersect(), and ~DisplacedTriangle().
ConvexQuad * rcrt::DisplacedTriangle::ca [protected] |
Definition at line 19 of file DisplacedTriangle.h.
Referenced by DisplacedTriangle(), intersect(), and ~DisplacedTriangle().
Triangle* rcrt::DisplacedTriangle::upper [protected] |
Definition at line 20 of file DisplacedTriangle.h.
Referenced by DisplacedTriangle(), getDispNormal(), getDispPoint(), intersect(), and ~DisplacedTriangle().
SAHKDtree<Triangle> rcrt::DisplacedTriangle::tree [protected] |
std::vector<Triangle*>* rcrt::DisplacedTriangle::triangles [protected] |
Definition at line 22 of file DisplacedTriangle.h.
Referenced by DisplacedTriangle(), and intersect().