- Cal3D 0.11 API Reference -

CalSpringSystem Class Reference

The spring system class. More...

#include <springsystem.h>

List of all members.

Public Member Functions

 CalSpringSystem (CalModel *pModel)
 Constructs 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.
void update (float deltaTime)
 Updates all the spring systems in the attached meshes.
CalVector & getGravityVector ()
 Returns the gravity vector.
void setGravityVector (const CalVector &vGravity)
 Sets the gravity vector.
CalVector & getForceVector ()
 Returns the force vector.
void setForceVector (const CalVector &vForce)
 Sets the force vector.
void setCollisionDetection (bool collision)
 Enable or disable the collision system.


Detailed Description

The spring system class.

Constructor & Destructor Documentation

CalSpringSystem::CalSpringSystem ( CalModel *  pModel  ) 

Constructs the spring system instance.

This function is the default constructor 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.

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.

CalVector & CalSpringSystem::getGravityVector (  ) 

Returns the gravity vector.

This function returns the gravity vector of the spring system instance.

Returns:
the gravity vector as vector.

void CalSpringSystem::setGravityVector ( const CalVector &  vGravity  ) 

Sets the gravity vector.

This function sets the gravity vector of the spring system instance.

Parameters:
vGravity the gravity vector as vector.

CalVector & CalSpringSystem::getForceVector (  ) 

Returns the force vector.

This function returns the force vector of the spring system instance.

Returns:
the force vector as vector.

void CalSpringSystem::setForceVector ( const CalVector &  vForce  ) 

Sets the force vector.

This function sets the force vector of the spring system instance.

Parameters:
vForce the force vector as vector.

void CalSpringSystem::setCollisionDetection ( bool  collision  ) 

Enable or disable the collision system.

Parameters:
collision true to enable the collision system else false


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

Generated at Thu Feb 21 22:53:49 2008 by The Cal3D Team with Doxygen 1.5.5