SimpleNGL 1.0
Public Member Functions | Public Attributes
Cloth Class Reference

class defining all the behaviours and state of cloth includes integration methods for simplicity More...

#include <Cloth.h>

List of all members.

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

Detailed Description

class defining all the behaviours and state of cloth includes integration methods for simplicity

Note:
This is not the optimum design but keeps things neat for this demo

Constructor & Destructor Documentation

Cloth::Cloth ( int  _width,
int  _height,
const float &  _spacing 
)

ctor taking main layout variables

Parameters:
[in]_widththe cloths width
[in]_heightthe cloths height
[in]_spacingthe gaps between point
Cloth::~Cloth ( )

dtpr


Member Function Documentation

void Cloth::changeGravity ( const float &  _value)

alter the gravity force

Parameters:
[in]_valuethe new force
void Cloth::changeWind ( const float &  _x,
const float &  _y,
const float &  _z 
)

change the wind force

Parameters:
[in]_xthe x component
[in]_ythe y component
[in]_zthe 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

Parameters:
[in]_vthe integration method enum value
void Cloth::setupParticles ( )

the setup particles method for resetting

void Cloth::update ( const float &  _time)

update the cloth sim

Parameters:
[in]_timethe time step

Member Data Documentation

the bend spring damping value

the bend spring stiffness value

ngl::Vector Cloth::m_gravity

the cloth gravity, this should belong to external force class

the shear spring damping value

the shear spring stiffness value

ngl::Vector Cloth::m_squall

the cloth squall force, this should belong to external force class

the struct spring damping value

the struct spring stiffness value

ngl::Vector Cloth::m_wind

the cloth wind, this should belong to external force class


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Enumerations Enumerator