This class is used by a cloth class to update its behaviour. There are three integration methods implemented at the moment Forward Euler, Verlet and Runge-Kutta of 4th order.
More...
#include <Integrator.h>
List of all members.
Public Member Functions |
Mass | evaluate (Mass *_initial) |
| method to evaluate the state given initial value and time step
|
Mass | evaluate (Mass *_initial, float _dt, Mass &_d) |
| method to evaluate the state given initial value and time step
|
void | eulerForwardIntegration (float _dt, std::vector< Mass * > _originalMasses, std::vector< Spring * > _springs) |
| Euler Forward method to evaluate the state given initial value and time step.
|
void | RK_4Integration (float _dt, std::vector< Mass * > _masses, std::vector< Spring * > _springs) |
| 4th order Runge_Kutta method to evaluate the state given initial value and time step
|
void | verletIntegration (float _dt, std::vector< Mass * > _originalMasses, std::vector< Spring * > _springs) |
| Verlet Itegration method to evaluate the state given initial value and time step.
|
ngl::Vector | motionFunction (Mass *_state) |
| this is going to calculate the spring function
|
void | calculateForces (std::vector< Mass * > _masses, std::vector< Spring * > _springs) |
Detailed Description
This class is used by a cloth class to update its behaviour. There are three integration methods implemented at the moment Forward Euler, Verlet and Runge-Kutta of 4th order.
Member Function Documentation
void Integrator::eulerForwardIntegration |
( |
float |
_dt, |
|
|
std::vector< Mass * > |
_originalMasses, |
|
|
std::vector< Spring * > |
_springs | |
|
) |
| | |
Euler Forward method to evaluate the state given initial value and time step.
- Parameters:
-
[in] | _dt | the delta time step for integration |
Mass Integrator::evaluate |
( |
Mass * |
_initial, |
|
|
float |
_dt, |
|
|
Mass & |
_d | |
|
) |
| | |
method to evaluate the state given initial value and time step
- Parameters:
-
[in] | _initial | the initial state |
[in] | _t | the current time step value |
[in] | _dt | the delta time step for integration |
[in] | _d | the derivative for the integration step |
Mass Integrator::evaluate |
( |
Mass * |
_initial |
) |
|
method to evaluate the state given initial value and time step
- Parameters:
-
[in] | _initial | the initial state |
[in] | _t | the current time step value |
ngl::Vector Integrator::motionFunction |
( |
Mass * |
_state |
) |
|
this is going to calculate the spring function
- Parameters:
-
[in] | _state | the state of the spring values to calculate |
- Returns:
- a vector of the force calculated via the integrator
void Integrator::RK_4Integration |
( |
float |
_dt, |
|
|
std::vector< Mass * > |
_masses, |
|
|
std::vector< Spring * > |
_springs | |
|
) |
| | |
4th order Runge_Kutta method to evaluate the state given initial value and time step
- Parameters:
-
[in] | _dt | the delta time step for integration |
void Integrator::verletIntegration |
( |
float |
_dt, |
|
|
std::vector< Mass * > |
_originalMasses, |
|
|
std::vector< Spring * > |
_springs | |
|
) |
| | |
Verlet Itegration method to evaluate the state given initial value and time step.
- Parameters:
-
[in] | _dt | the delta time step for integration |
The documentation for this class was generated from the following files: