29 #include "../../idlib/precompiled.h"
32 #include "../Game_local.h"
97 idVec3 pos1, pos2, velocity1, velocity2, force, dampingForce;
125 dampingForce = (
damping * ( ((velocity2 - velocity1) * force) / (force * force) ) ) * force;
virtual const idVec3 & GetOrigin(int id=0) const =0
virtual void Evaluate(int time)
virtual void GetImpactInfo(const int id, const idVec3 &point, impactInfo_t *info) const =0
virtual void AddForce(const int id, const idVec3 &point, const idVec3 &force)=0
idVec3 vec3_origin(0.0f, 0.0f, 0.0f)
virtual const idMat3 & GetAxis(int id=0) const =0
virtual void RemovePhysics(const idPhysics *phys)
virtual ~idForce_Spring(void)
#define CLASS_DECLARATION(nameofsuperclass, nameofclass)
GLsizei const GLcharARB const GLint * length
void SetPosition(idPhysics *physics1, int id1, const idVec3 &p1, idPhysics *physics2, int id2, const idVec3 &p2)
void InitSpring(float Kstretch, float Kcompress, float damping, float restLength)