blaze.dynamics.RigidBody

Authors:
Blaze team, see AUTHORS file

Maintainers:
Mason Green (zzzzrrr)

License:
zlib/png license

This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.

Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:

1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.

2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.

3. This notice may not be removed or altered from any source distribution.

class RigidBody ;


Number m ;
Body Mass

Number m_inv ;
Body inverse mass

Number i ;
Moment of inertia

Number i_inv ;
Moment of inertia inverse

Vector2D p ;
Position

Vector2D v ;
Velocity

Vector2D f ;
Force

Vector2D v_bias ;
used internally for penetration/joint correction

Number a ;
angle

Number w ;
angular velocity

Number t ;


Number w_bias ;
used internally for penetration/joint correction

Vector2D rot ;
Unit length

GeometricShape[] memberShapes ;


this(Number m, Number i);


GeometricShape addShape (GeometricShape shape);


void removeShape (GeometricShape shape);


void setMass (double m);


void setMoment (double i);


void setAngle (double a);


void slew (Vector2D pos, double dt);


void updateVelocity (Vector2D masslessForce, Vector2D force, double damping, double dt);


void updatePosition (double dt);


void resetForces ();


void applyImpulse (Vector2D j, Vector2D r);


void applyBiasImpulse (Vector2D j, Vector2D r);


void applyForces (Vector2D force, Vector2D r);


void DampedSpring ();


Page was generated with on Tue Feb 26 16:08:50 2008