Public Member Functions | Public Attributes | Protected Attributes

Mass Class Reference

class which a contains all methods to work with masses: change their velocity and position, and by this create the motion of a cloth More...

#include <Mass.h>

List of all members.

Public Member Functions

 Mass (ngl::Vector _position, float _mass, float m_radius, ngl::Colour m_colour, ngl::TransformStack *_transform, Cloth *_cloth)
 Mass (ngl::Vector _pos, ngl::Vector _vel)
 Mass ()
 default ctor
ngl::Vector getNormal () const
void addNormal (const ngl::Vector &normal)
void setNormal (const ngl::Vector &normal)
void SetSizeOfMasses (int _radius)
 set the size of masses [in] _sizeOfMasses the value to set
void setTimeStep (float _timeStep)
 set the TIME_STEPSIZE [in] _timeStep the value to set
void setStiffenessVector (ngl::Vector _stiffenessVector)
 set the stiffeness vector [in] _stiffenessVector the value to set
void setOldPosition (ngl::Vector _oldPosition)
 set the old position [in] _oldPosition the value to set
void setOldVelocity (ngl::Vector _oldVelocity)
 set the old velocity [in] _oldVelocity the value to set
bool isFixed ()
 checks if the mass is fixed
float getTimeStep ()
 get the TIME_STEPSIZE
void setDamping (float _damping)
 set the damping effect [in] _damping the value to set
float getDamping ()
 get the damping of springs
ngl::Vector getStiffenessVector ()
 get the stiffenessVector of mass
void SetColour (ngl::Colour _colour)
 set the colour of masses [in] _colour the value to set
void setForce (ngl::Vector _force)
 set the force acting on the mass [in] _force the value to set
void setExternaForces (ngl::Vector _externalForces)
 set the external forces acting on the mass, such as gravity, user forces, etc. [in] _externalForces the value to set
void addExternaForce (ngl::Vector _externalForce)
 add the external force acting on the mass, such as gravity, user forces, etc. [in] _externalForce the value to set
void setVelocity (ngl::Vector _velocity)
 set the velocity of the mass [in] _velocity the value to set
ngl::Vector getForce ()
 get the force acting on the mass
ngl::Vector getPosition ()
 get the position of masses
ngl::Vector getVelocity ()
 get the velocity of masses
ngl::Vector getOldPosition ()
 get the oldPosition of masses
ngl::Vector getOldVelocity ()
 get the oldVelocity of masses
float getMass ()
 get the mass of masses
void setPosition (ngl::Vector _position)
 set the position of masses [in] _position the value to set
void setMass (float _mass)
 set the mass of masses [in] _mass the value to set
void calculateAcceleration (ngl::Vector force)
void update ()
 update the parameters of the mass
void updateMass ()
 update the parameters of the mass
void draw ()
 method to render the particle
void offsetPosition (const ngl::Vector velocity)
void makeFixed ()
 make the mass unmovable
void makeFree ()
 free the mass
void addForce (ngl::Vector force)
 add force to the existing force acting on the mass
ngl::Vector getNormal ()

Public Attributes

ngl::Vector normal
 Vertex normal for this ball.
bool isEuler
unsigned int vertexIndex
 number of the mass in the verteces array
std::vector< HashTableDatam_neighbours
 The neighbours of this mass.
ngl::Vector BBMin
ngl::Vector BBMax
ngl::Vector m_correctedVelocities
 The corrected velocities that will be averaged to provide a collision safe velocity.
unsigned int m_velNumber
 The number of new velocities proposed to a safe position.

Protected Attributes

ngl::TransformStack * m_transform
 a pointer to the global transform stack

Detailed Description

class which a contains all methods to work with masses: change their velocity and position, and by this create the motion of a cloth


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