- Cal3D 0.9 API Reference -

Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

# CalSpringSystem Class Reference

The spring system class. More...

`#include <springsystem.h>`

List of all members.

## Public Member Functions

| CalSpringSystem ()
| Constructs the spring system instance.
virtual | ~CalSpringSystem ()
| Destructs the spring system instance.
void | calculateForces (CalSubmesh *pSubmesh, float deltaTime)
| Calculates the forces on each unbound vertex.
void | calculateVertices (CalSubmesh *pSubmesh, float deltaTime)
| Calculates the vertices influenced by the spring system instance.
bool | create (CalModel *pModel)
| Creates the spring system instance.
void | destroy ()
| Destroys the spring system instance.
void | update (float deltaTime)
| Updates all the spring systems in the attached meshes.

## Public Attributes

CalModel * | m_pModel

## Detailed Description

The spring system class.

## Constructor & Destructor Documentation

CalSpringSystem::CalSpringSystem | ( |  | ) |

| Constructs the spring system instance. This function is the default constructor of the spring system instance.

CalSpringSystem::~CalSpringSystem | ( |  | ) | `[virtual]`

| Destructs the spring system instance. This function is the destructor of the spring system instance.

## Member Function Documentation

void CalSpringSystem::calculateForces | ( | CalSubmesh * | pSubmesh,
|  | float | deltaTime
| ) |

| Calculates the forces on each unbound vertex. This function calculates the forces on each unbound vertex of a specific submesh.

Parameters:

  pSubmesh | A pointer to the submesh from which the forces should be calculated.
  deltaTime | The elapsed time in seconds since the last calculation.

void CalSpringSystem::calculateVertices | ( | CalSubmesh * | pSubmesh,
|  | float | deltaTime
| ) |

| Calculates the vertices influenced by the spring system instance. This function calculates the vertices influenced by the spring system instance.

Parameters:

  pSubmesh | A pointer to the submesh from which the vertices should be calculated.
  deltaTime | The elapsed time in seconds since the last calculation.

bool CalSpringSystem::create | ( | CalModel * | pModel | ) |

| Creates the spring system instance. This function creates the spring system instance.

Parameters:

  pModel | A pointer to the model that should be managed with this spring system instance.

Returns:
  One of the following values:
  - true if successful
  - false if an error happend

void CalSpringSystem::destroy | ( |  | ) |

| Destroys the spring system instance. This function destroys all data stored in the spring system instance and frees all allocated memory.

void CalSpringSystem::update | ( | float | deltaTime | ) |

| Updates all the spring systems in the attached meshes. This functon updates all the spring systems in the attached meshes.

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

- springsystem.h
- springsystem.cpp

Generated at Wed Apr 7 16:57:18 2004 by The Cal3D Team with 1.3.6 © 1997-2001 Dimitri van Heesch