PointShape.h
Go to the documentation of this file.00001 /**<!--------------------------------------------------------------------> 00002 @class PointShape 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 single point in 3-space (used to represent point 00009 lights and pinhole cameras) 00010 <!-------------------------------------------------------------------->**/ 00011 00012 #ifndef POINT_SHAPE_H_ 00013 #define POINT_SHAPE_H_ 00014 00015 #include <shapes/Implicit.h> 00016 00017 class PointShape : public Transformable { 00018 public: 00019 ///@name Intersection routines 00020 //@{----------------------------------------------------------------- 00021 00022 /// always returns an invalid intersection 00023 virtual real_t getIntersection(const Ray &ray, SurfacePoint &pt); 00024 00025 /// @returns false 00026 virtual bool intersects(const Ray &ray, 00027 real_t tMax = INFINITY); 00028 00029 00030 //@}----------------------------------------------------------------- 00031 ///@name Core functionality 00032 //@{----------------------------------------------------------------- 00033 00034 virtual void init(); 00035 00036 virtual void preview(); 00037 00038 virtual bool hasNormal() const; 00039 00040 00041 //@}----------------------------------------------------------------- 00042 ///@name Sampling functionality 00043 //@{----------------------------------------------------------------- 00044 00045 /** 00046 * @returns the total surface area of this shape 00047 */ 00048 virtual real_t getSurfaceArea() { 00049 return 0; 00050 } 00051 00052 00053 //@}----------------------------------------------------------------- 00054 00055 protected: 00056 virtual void _getUV(SurfacePoint &pt) const; 00057 virtual void _getGeometricNormal(SurfacePoint &pt) const; 00058 }; 00059 00060 #endif // POINT_SHAPE_H_ 00061
Generated on 28 Feb 2009 for Milton by
1.5.6