- Main Page
- Classes
- Files
- Directories

- Class List
- Class Hierarchy
- Class Members

# cShapeSphere Class Reference

cShapeSphere describes a simple spherical potential field More...

`#include <CShapeSphere.h>`

Inheritance diagram for cShapeSphere:

List of all members.

## Public Member Functions
| cShapeSphere (const double &a_radius)
| Constructor of cShapeSphere.
virtual | ~cShapeSphere ()
| Destructor of cSphere.
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 | setRadius (double a_radius)
| Set radius of sphere.
double | getRadius ()
| Get radius of sphere.
## Public Attributes
cMaterial | m_material
| Material properties.
cTexture2D * | m_texture
| Texture property.
## Protected Attributes
double | m_radius
| radius of sphere

## Detailed Description

cShapeSphere describes a simple spherical potential field

## Constructor & Destructor Documentation

cShapeSphere::cShapeSphere | ( | const double & | a_radius | ) |

Constructor of cShapeSphere.

Constructor of cShapeSphere.

Parameters:

  | a_radius | Radius of sphere

## Member Function Documentation

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

Update bounding box of current object.

Update bounding box of current object.

Reimplemented from cGenericObject.

void cShapeSphere::scaleObject | ( | const cVector3d & | a_scaleFactors | ) | `[virtual]`

Object scaling.

Scale object of defined scale factor

Parameters:

  | a_scaleFactors | Scale factor

Reimplemented from cGenericObject.

cVector3d cShapeSphere::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/CShapeSphere.h
- chai3d/src/scenegraph/CShapeSphere.cpp