SimpleNGL 1.0
|
class defining all the behaviours and state of cloth includes integration methods for simplicity More...
#include <Cloth.h>
Public Member Functions | |
Cloth (int _width, int _height, const float &_spacing) | |
ctor taking main layout variables | |
~Cloth () | |
dtpr | |
bool | init () |
initialise the cloth | |
void | draw () |
draw call for cloth | |
void | update (const float &_time) |
update the cloth sim | |
void | changeGravity (const float &_value) |
alter the gravity force | |
void | changeWind (const float &_x, const float &_y, const float &_z) |
change the wind force | |
void | setIntegration (INTEGRATION _v) |
choose the integration method | |
void | setupParticles () |
the setup particles method for resetting | |
Public Attributes | |
float | m_shearStiffness |
the shear spring stiffness value | |
float | m_shearDamping |
the shear spring damping value | |
float | m_structStiffness |
the struct spring stiffness value | |
float | m_structDamping |
the struct spring damping value | |
float | m_bendStiffness |
the bend spring stiffness value | |
float | m_bendDamping |
the bend spring damping value | |
ngl::Vector | m_gravity |
the cloth gravity, this should belong to external force class | |
ngl::Vector | m_wind |
the cloth wind, this should belong to external force class | |
ngl::Vector | m_squall |
the cloth squall force, this should belong to external force class |
class defining all the behaviours and state of cloth includes integration methods for simplicity
Cloth::Cloth | ( | int | _width, |
int | _height, | ||
const float & | _spacing | ||
) |
ctor taking main layout variables
[in] | _width | the cloths width |
[in] | _height | the cloths height |
[in] | _spacing | the gaps between point |
Cloth::~Cloth | ( | ) |
dtpr
void Cloth::changeGravity | ( | const float & | _value | ) |
alter the gravity force
[in] | _value | the new force |
void Cloth::changeWind | ( | const float & | _x, |
const float & | _y, | ||
const float & | _z | ||
) |
change the wind force
[in] | _x | the x component |
[in] | _y | the y component |
[in] | _z | the z component |
void Cloth::draw | ( | ) |
draw call for cloth
bool Cloth::init | ( | ) |
initialise the cloth
void Cloth::setIntegration | ( | INTEGRATION | _v | ) | [inline] |
choose the integration method
[in] | _v | the integration method enum value |
void Cloth::setupParticles | ( | ) |
the setup particles method for resetting
void Cloth::update | ( | const float & | _time | ) |
update the cloth sim
[in] | _time | the time step |
float Cloth::m_bendDamping |
the bend spring damping value
float Cloth::m_bendStiffness |
the bend spring stiffness value
ngl::Vector Cloth::m_gravity |
the cloth gravity, this should belong to external force class
float Cloth::m_shearDamping |
the shear spring damping value
float Cloth::m_shearStiffness |
the shear spring stiffness value
ngl::Vector Cloth::m_squall |
the cloth squall force, this should belong to external force class
float Cloth::m_structDamping |
the struct spring damping value
float Cloth::m_structStiffness |
the struct spring stiffness value
ngl::Vector Cloth::m_wind |
the cloth wind, this should belong to external force class