# cShapeTorus Class Reference
[Scenegraph]

cShapeTorus describes a simple torus potential field. More...

`#include <CShapeTorus.h>`

Inheritance diagram for cShapeTorus:

[legend]

List of all members.

## 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.

## Detailed Description

cShapeTorus describes a simple torus potential field.

## Constructor & Destructor Documentation

cShapeTorus::cShapeTorus | ( | const double & | a_insideRadius,
|  | const double & | a_outsideRadius |
| ) |  |  |

Constructor of cShapeTorus.

Constructor of cShapeTorus.

Parameters:

  | a_insideRadius | Inside radius of torus
  | a_outsideRadius | Outside radius of torus

## Member Function Documentation

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

Parameters:

  | 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

Parameters:

  | 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

Parameters:

  | a_scaleFactors | x,y,z scale factors

Reimplemented from cGenericObject.

The documentation for this class was generated from the following files:

- D:/CHAI3D/build-2-0-0/2.0.0/win32/src/scenegraph/CShapeTorus.h
- D:/CHAI3D/build-2-0-0/2.0.0/win32/src/scenegraph/CShapeTorus.cpp

CHAI3D 2.0.0 documentation
Please address any questions to support@chai3d.org
(C) 2003-2009 - CHAI 3D
All Rights Reserved.