#include <springsys.h>
Public Member Functions |
|
SSParticle () | |
~SSParticle () | |
SSParticle & | operator= (const SSParticle &from) |
SSParticle | Copy (const SSParticle from) |
float | GetMass () |
void | SetMass (float m) |
float | GetDrag () |
void | SetDrag (float d) |
Point3 | GetPos () |
void | SetPos (Point3 p) |
Point3 | GetVel () |
void | SetVel (Point3 v) |
Point3 | GetForce () |
void | SetForce (Point3 f) |
Tab< SSSpring > * | GetSprings () |
SSSpring * | GetSpring (int i) |
void | SetSpring (int i, SSSpring spring) |
void | SetSprings (Tab< SSSpring > sTab) |
SpringSysExport BOOL | AddSpring (SSConstraintPoint *bone, Point3 length, float tension=2.0f, float dampening=1.0f) |
void | DeleteSpring (int index) |
Friends |
|
class | SpringSys |
SSParticle | ( | ) | [inline] |
~SSParticle | ( | ) | [inline] |
{}
SSParticle& operator= | ( | const SSParticle & | from | ) | [inline] |
SSParticle Copy | ( | const SSParticle | from | ) | [inline] |
float GetMass | ( | ) | [inline] |
void SetMass | ( | float | m | ) | [inline] |
{mass = m;}
float GetDrag | ( | ) | [inline] |
void SetDrag | ( | float | d | ) | [inline] |
{drag = d;}
Point3 GetPos | ( | ) | [inline] |
void SetPos | ( | Point3 | p | ) | [inline] |
{pos = p;}
Point3 GetVel | ( | ) | [inline] |
void SetVel | ( | Point3 | v | ) | [inline] |
{vel = v;}
Point3 GetForce | ( | ) | [inline] |
void SetForce | ( | Point3 | f | ) | [inline] |
{force = f;}
{ return &springs;}
SSSpring* GetSpring | ( | int | i | ) | [inline] |
{if (i>=0 && i<springs.Count()) return &(springs[i]); else return NULL; }
void SetSpring | ( | int | i, |
SSSpring | spring | ||
) | [inline] |
SpringSysExport BOOL AddSpring | ( | SSConstraintPoint * | bone, |
Point3 | length, | ||
float | tension = 2.0f , |
||
float | dampening =
1.0f |
||
) |
void DeleteSpring | ( | int | index | ) | [inline] |
{ if ( index == 0 ) return; for (int i=0;i<springs.Count();i++) { if ( (springs[i].GetPointConstraint()->GetIndex()) == index) springs.Delete(i--, 1); else if (springs[i].GetPointConstraint()->GetIndex() > index) springs[i].GetPointConstraint()->SetIndex(springs[i].GetPointConstraint()->GetIndex()-1); } }
friend class SpringSys [friend] |