src/rcrt/primitives/DisplacedTriangle.h

Go to the documentation of this file.
00001 #ifndef DISPLACEDTRIANGLE_H_
00002 #define DISPLACEDTRIANGLE_H_
00003 
00004 #include "Triangle.h"
00005 #include "../BIH.hpp"
00006 #include "../SAHKDtree.hpp"
00007 #include "ConvexQuad.h"
00008 #include "../textures/ImageTexture.h"
00009 #include <limits>
00010 #include <vector>
00011 
00012 namespace rcrt
00013 {
00014 
00015 class DisplacedTriangle : public rcrt::Triangle
00016 {
00017 protected:
00018         Point3D da, db, dc;
00019         ConvexQuad *ab, *bc, *ca;
00020         Triangle* upper;
00021         SAHKDtree<Triangle> tree;
00022         std::vector<Triangle*>* triangles;
00023         
00024 public:
00025         DisplacedTriangle(Vertex* av,Vertex* bv,Vertex* cv, SolidObject* parent);
00026         virtual ~DisplacedTriangle();
00027         
00028         Intersection baseIntersect(Ray& ray) const;
00029         Intersection intersect(Ray& ray) const;
00030         Point3D getDispPoint(float beta, float gamma) const;
00031         Vec3D getDispNormal(float beta, float gamma) const;
00032         Point3D getDispPoint(const Point2D& p) const;
00033         Vec3D getDispNormal(const Point2D& p) const;
00034 };
00035 
00036 }
00037 
00038 #endif /*DISPLACEDTRIANGLE_H_*/

Generated on Thu Jan 31 19:26:19 2008 for RenderingCompetitionRayTracer by  doxygen 1.5.3