src/TableBorder.h

Go to the documentation of this file.
00001 #ifndef TABLEBORDER_H
00002 #define TABLEBORDER_H
00003 
00004 
00005 #include <string>
00006 
00007 #include "Object.h"
00008 
00009 
00014 class TableBorder : public Object
00015 {
00016 public:
00024     TableBorder(const std::string & name, float dist, bool xAligned, const Vec3f & norm)
00025         : Object(false),
00026             mDistance(dist),
00027             mXAligned(xAligned),
00028             mNormal(norm.normal())
00029     {
00030         mName = name;
00031         assert(mNormal.fabs() == Vec3f(1, 0, 0) || mNormal.fabs() == Vec3f(0, 0, 1));
00032     }
00033 
00038     virtual Object * createCopy()
00039     {
00040         // do not use it
00041         assert(false);
00042         return NULL;
00043     }
00044 
00047     virtual void setShader(Shader * /*sh*/)
00048     {
00049         // no need to render it atm
00050     }
00051 
00054     float dist() const
00055     {
00056         return mDistance;
00057     }
00058 
00061     bool xAligned() const
00062     {
00063         return mXAligned;
00064     }
00065 
00068     const Vec3f & normal()
00069     {
00070         return mNormal;
00071     }
00072 
00073 protected:
00075     float   mDistance;
00076 
00078     bool    mXAligned;
00079 
00081     Vec3f   mNormal;
00082 
00083 
00088     virtual bool doIntersect(Ray & /*localRay*/) const
00089     {
00090         // no need to render it atm
00091         return false;
00092     }
00093 
00096     virtual void calcBounds()
00097     {
00098         // no need to render it atm
00099     }
00100 
00104     virtual void buildAccelStructure()
00105     {
00106         // no need to render it atm
00107     }
00108 
00109 };
00110 
00111 
00112 #endif
00113 

Generated on Fri Feb 1 00:01:42 2008 for Grayfall by  doxygen 1.5.1