00001 00014 #ifndef CVECTBASE_H 00015 #define CVECTBASE_H 00016 00029 class CVectBase 00030 { 00031 public: 00035 CVectBase(); 00036 00040 CVectBase(const CVector3f& viewerpos, 00041 const CVector3f& boxpos, 00042 float radius, bool update = true); 00043 00044 00048 inline const CVector3f& getB1() const { return m_B1; } 00049 00053 inline const CVector3f& getB2() const { return m_B2; } 00054 00058 inline const CVector3f& getB3() const { return m_B3; } 00059 00063 inline float getRadius() const { return m_Radius; } 00064 00068 void setViewerPos(const CVector3f& viewerpos, bool update = true) 00069 { 00070 m_ViewerPos = viewerpos; 00071 if (update) 00072 Update(); 00073 } 00074 00078 void setBoxPos(const CVector3f& boxpos, bool update = true) 00079 { 00080 m_BoxPos = boxpos; 00081 if (update) 00082 Update(); 00083 } 00084 00089 void setRadius(float radius) { m_Radius = radius; } 00090 00094 void Update(void); 00095 00096 private: 00097 CVector3f m_B1; 00098 CVector3f m_B2; 00099 CVector3f m_B3; 00100 float m_Radius; 00102 CVector3f m_ViewerPos; 00103 CVector3f m_BoxPos; 00104 }; 00105 00106 #endif 00107
1.5.4