#include <CShapeTorus.h>
Public Member Functions | |
cShapeTorus (const double &a_insideRadius, const double &a_outsideRadius) | |
Constructor of cShapeTorus. | |
virtual | ~cShapeTorus () |
Destructor of cShapeTorus. | |
virtual void | render (const int a_renderMode=0) |
Render object in OpenGL. | |
virtual void | updateBoundaryBox () |
Update bounding box of current object. | |
virtual void | scaleObject (const cVector3d &a_scaleFactors) |
object scaling. | |
virtual void | computeLocalInteraction (const cVector3d &a_toolPos, const cVector3d &a_toolVel, const unsigned int a_IDN) |
Update the geometric relationship between the tool and the current object. | |
void | setSize (const double &a_innerRadius, const double &a_outerRadius) |
Set inside and outside radius of torus. | |
double | getInnerRadius () |
Get inside radius of torus. | |
double | getOuterRadius () |
Get inside radius of torus. | |
Protected Attributes | |
double | m_innerRadius |
Inside radius of torus. | |
double | m_outerRadius |
Outside radius of torus. | |
unsigned int | m_resolution |
Resolution of the GLU graphical model. |
cShapeTorus::cShapeTorus | ( | const double & | a_insideRadius, | |
const double & | a_outsideRadius | |||
) |
Constructor of cShapeTorus.
Constructor of cShapeTorus.
a_insideRadius | Inside radius of torus | |
a_outsideRadius | Outside radius of torus |
void cShapeTorus::computeLocalInteraction | ( | const cVector3d & | a_toolPos, | |
const cVector3d & | a_toolVel, | |||
const unsigned int | a_IDN | |||
) | [virtual] |
Update the geometric relationship between the tool and the current object.
From the position of the tool, search for the nearest point located at the surface of the current object. Decide if the point is located inside or outside of the object
a_toolPos | Position of the tool. | |
a_toolVel | Velocity of the tool. | |
a_IDN | Identification number of the force algorithm. |
Reimplemented from cGenericObject.
void cShapeTorus::render | ( | const int | a_renderMode = 0 |
) | [virtual] |
Render object in OpenGL.
Render sphere in OpenGL
a_renderMode | See cGenericObject::render() |
Reimplemented from cGenericObject.
void cShapeTorus::scaleObject | ( | const cVector3d & | a_scaleFactors | ) | [virtual] |
object scaling.
Scale the torus with a uniform scale factor
a_scaleFactors | x,y,z scale factors |
Reimplemented from cGenericObject.