- Main Page
- Classes
- Files
- Directories

- Class List
- Class Hierarchy
- Class Members

# cShapeTorus Class Reference

cShapeTorus describes a simple torus potential field More...

`#include <CShapeTorus.h>`

Inheritance diagram for cShapeTorus:

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 cVector3d | computeLocalForce (const cVector3d &a_localPosition)
| Compute interaction force for current object in local frame.
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.
## Public Attributes
cMaterial | m_material
| Material properties.
cTexture2D * | m_texture
| Texture property.
## Protected Attributes
double | m_innerRadius
| Inside radius of torus.
double | m_outerRadius
| Outside radius of torus.

## 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::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::updateBoundaryBox | ( |  | ) | `[virtual]`

Update bounding box of current object.

Update bounding box of current object.

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.

cVector3d cShapeTorus::computeLocalForce | ( | const cVector3d & | a_localPosition | ) | `[virtual]`

Compute interaction force for current object in local frame.

Compute forces between tool and sphere shape

Parameters:

  | a_localPosition | position of tool in world coordinates

Returns:
  return reaction force if tool is located inside sphere

Reimplemented from cGenericPotentialField.

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

- chai3d/src/scenegraph/CShapeTorus.h
- chai3d/src/scenegraph/CShapeTorus.cpp