Plane.h

Go to the documentation of this file.
00001 /**<!-------------------------------------------------------------------->
00002    @class  Plane
00003    @author Travis Fischer (fisch0920@gmail.com)
00004    @author Matthew Jacobs (jacobs.mh@gmail.com)
00005    @date   Fall 2008
00006    
00007    @brief
00008       Representation of a unit plane in the y=0 plane from (-.5,0,-.5) 
00009    to (.5,0,.5)
00010    <!-------------------------------------------------------------------->**/
00011 
00012 #ifndef PLANE_H_
00013 #define PLANE_H_
00014 
00015 #include <shapes/Implicit.h>
00016 
00017 class Plane : public Implicit {
00018    public:
00019       
00020       ///@name Initialization routines
00021       //@{-----------------------------------------------------------------
00022       
00023       /**
00024        * @brief
00025        *    Precomputes world-space surface area
00026        */
00027       virtual void init();
00028       
00029       
00030       //@}-----------------------------------------------------------------
00031       ///@name Intersection routines
00032       //@{-----------------------------------------------------------------
00033       
00034       virtual real_t getIntersection(const Ray &ray, SurfacePoint &pt);
00035       
00036       virtual bool intersects(const Ray &ray, 
00037                               real_t tMax = INFINITY);
00038       
00039       
00040       //@}-----------------------------------------------------------------
00041       ///@name Core functionality
00042       //@{-----------------------------------------------------------------
00043       
00044       virtual void preview();
00045       
00046       
00047       //@}-----------------------------------------------------------------
00048       ///@name Sampling functionality
00049       //@{-----------------------------------------------------------------
00050       
00051       /**
00052        * @returns the point on the surface of this shape corresponding to the 
00053        *    given UV coordinates
00054        */
00055       virtual Point3 getPosition(const UV &uv); 
00056       
00057       
00058       //@}-----------------------------------------------------------------
00059       
00060    protected:
00061       virtual void _getUV(SurfacePoint &pt) const;
00062       virtual void _getGeometricNormal(SurfacePoint &pt) const;
00063       
00064       /**
00065        * @returns the total surface area of this shape in world-space
00066        */
00067       virtual real_t _getSurfaceArea();
00068 };
00069 
00070 #endif // PLANE_H_
00071 

Generated on 28 Feb 2009 for Milton by doxygen 1.5.6