#include <CVectBase.h>
Public Member Functions | |
| CVectBase () | |
| The CVectBase default constructor. | |
| CVectBase (const CVector3f &viewerpos, const CVector3f &boxpos, float radius, bool update=true) | |
| The CVectBase constructor by parameters. | |
| const CVector3f & | getB1 () const |
| This function returns the first vector of the base. | |
| const CVector3f & | getB2 () const |
| This function returns the second vector of the base. | |
| const CVector3f & | getB3 () const |
| This function returns the third vector of the base. | |
| float | getRadius () const |
| This function returns the radius of the bounding sphere. | |
| void | setViewerPos (const CVector3f &viewerpos, bool update=true) |
| This function sets the position of the viewer. | |
| void | setBoxPos (const CVector3f &boxpos, bool update=true) |
| This function sets the position of the center of the box. | |
| void | setRadius (float radius) |
| This function sets the radius of the bounding sphere of the surface. | |
| void | Update (void) |
| This function recalculate the three vectors of the base. | |
Private Attributes | |
| CVector3f | m_B1 |
| CVector3f | m_B2 |
| CVector3f | m_B3 |
| float | m_Radius |
| CVector3f | m_ViewerPos |
| CVector3f | m_BoxPos |
It contains 3 vectors. One goes from the eye of the viewer to the center of the bounding box of the surface; another one is in the horizontal direction of the plane that represents the picture and throught which all the rays go; the last one is in the vertical direction of the plane that represents the picture and throught which all the rays go. The radius of the bounding sphere is the radius of the smallest sphere that can hold the bounding box.
Definition at line 29 of file CVectBase.h.
| const CVector3f& CVectBase::getB1 | ( | ) | const [inline] |
This function returns the first vector of the base.
Definition at line 48 of file CVectBase.h.
References m_B1.
Referenced by CRenderObj::GetDirection(), and CRenderObj::GetStartingPoint().
| const CVector3f& CVectBase::getB2 | ( | ) | const [inline] |
This function returns the second vector of the base.
Definition at line 53 of file CVectBase.h.
References m_B2.
Referenced by CRenderObj::GetDirection(), and CRenderObj::GetStartingPoint().
| const CVector3f& CVectBase::getB3 | ( | ) | const [inline] |
This function returns the third vector of the base.
Definition at line 58 of file CVectBase.h.
References m_B3.
Referenced by CRenderObj::GetDirection(), and CRenderObj::GetStartingPoint().
| float CVectBase::getRadius | ( | ) | const [inline] |
This function returns the radius of the bounding sphere.
Definition at line 63 of file CVectBase.h.
References m_Radius.
Referenced by CRenderObj::GetDirection(), and CRenderObj::GetStartingPoint().
| void CVectBase::setViewerPos | ( | const CVector3f & | viewerpos, | |
| bool | update = true | |||
| ) | [inline] |
This function sets the position of the viewer.
Definition at line 68 of file CVectBase.h.
References m_ViewerPos, and Update().
Referenced by CRenderObj::Update().
| void CVectBase::setBoxPos | ( | const CVector3f & | boxpos, | |
| bool | update = true | |||
| ) | [inline] |
This function sets the position of the center of the box.
Definition at line 78 of file CVectBase.h.
References m_BoxPos, and Update().
Referenced by CRenderObj::Update().
| void CVectBase::setRadius | ( | float | radius | ) | [inline] |
This function sets the radius of the bounding sphere of the surface.
Definition at line 89 of file CVectBase.h.
References m_Radius.
Referenced by CRenderObj::Update().
CVector3f CVectBase::m_B1 [private] |
Direction of the looking vector.
Definition at line 97 of file CVectBase.h.
CVector3f CVectBase::m_B2 [private] |
Horizontal picture vector.
Definition at line 98 of file CVectBase.h.
CVector3f CVectBase::m_B3 [private] |
Vertical picture vector.
Definition at line 99 of file CVectBase.h.
float CVectBase::m_Radius [private] |
Radius of the bounding sphere of the surface.
Definition at line 100 of file CVectBase.h.
Referenced by CVectBase(), getRadius(), and setRadius().
CVector3f CVectBase::m_ViewerPos [private] |
Position of the viewer.
Definition at line 102 of file CVectBase.h.
Referenced by setViewerPos(), and Update().
CVector3f CVectBase::m_BoxPos [private] |
Position of the center of the box.
Definition at line 103 of file CVectBase.h.
Referenced by setBoxPos(), and Update().
1.5.4