src/rcrt/primitives/ConvexQuad.h

Go to the documentation of this file.
00001 #ifndef CONVEXQUAD_H_
00002 #define CONVEXQUAD_H_
00003 
00004 #include "Primitive.h"
00005 #include "../Intersection.h"
00006 #include "../Ray.h"
00007 #include "AABB.h"
00008 
00009 
00010 namespace rcrt
00011 {
00017 class ConvexQuad : public Primitive
00018 {
00019 private:
00020         Point3D va, vb, vc, vd, center;
00021         Vec3D normal;
00022         AABB box;
00023         
00024         bool isInside(Intersection& is) const;
00025         
00026 public:
00027         ConvexQuad(SolidObject* parent, const Point3D& pa, const Point3D& pb, const Point3D& pc,const Point3D& pd);
00028         virtual ~ConvexQuad();
00029         
00030         virtual Intersection intersect(Ray& r) const;
00031         virtual const AABB& getBoundingBox() const;
00032         virtual const Point3D& getCentroid() const;
00033         
00034         virtual Vec3D getSNormal(float a, float b) const;
00035         virtual Vec3D getGNormal(float a, float b) const;
00036         virtual Point2D getUV(float a, float b) const;
00037         
00038 };
00039 
00040 }
00041 
00042 #endif /*CONVEXQUAD_H_*/

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