#include <rigidbody.h>
Inheritance diagram for RigidBody:

Public Member Functions | |
| RigidBody (Vector2d position=Vector2d(0), double angle=0, Vector2d velocity=Vector2d(0), double angularVelocity=0, double mass=1, double inertia=1) | |
| const Vector2d & | position () const |
| void | setPosition (const Vector2d &position) |
| double | angle () const |
| void | setAngle (double angle) |
| const Vector2d & | velocity () const |
| void | setVelocity (const Vector2d &velocity) |
| double | angularVelocity () const |
| void | setAngularVelocity (double angularVelocity) |
| const Vector2d & | force () const |
| void | setForce (const Vector2d &force) |
| double | torque () const |
| void | setTorque (double torque) |
| void | applyForce (Vector2d force, Vector2d position) |
| void | applyTorque (double torque) |
| double | mass () const |
| void | setMass (double mass) |
| double | inertia () const |
| void | setInertia (double inertia) |
| Vector2d | pointLocalToWorld (const Vector2d &p) |
| Vector2d | pointWorldToLocal (const Vector2d &p) |
| int | variablesCount () |
| void | resetDerivatives () |
| void | getDerivatives (double *array) |
| void | getVariables (double *array) |
| void | setVariables (const double *array) |
| virtual void | worldItemRemoved (Item *item) |
| virtual void | setWorld (World *world) |
| World * | world () const |
| const QString & | name () const |
| void | setName (const QString &name) |
| RigidBody | ( | Vector2d | position = Vector2d(0), |
|
| double | angle = 0, |
|||
| Vector2d | velocity = Vector2d(0), |
|||
| double | angularVelocity = 0, |
|||
| double | mass = 1, |
|||
| double | inertia = 1 | |||
| ) |
Constructs RigidBody
| const Vector2d& position | ( | ) | const [inline] |
Get position of the center of mass of the body
| void setPosition | ( | const Vector2d & | position | ) | [inline] |
Set position of the center of mass of the body
| double angle | ( | ) | const [inline] |
Get angle of the body
| void setAngle | ( | double | angle | ) | [inline] |
Set angle of the body
| const Vector2d& velocity | ( | ) | const [inline] |
Get velocity of the center of mass of the body
| void setVelocity | ( | const Vector2d & | velocity | ) | [inline] |
Set velocity of the particle
| double angularVelocity | ( | ) | const [inline] |
Get angular velocity of the body
| void setAngularVelocity | ( | double | angularVelocity | ) | [inline] |
Set angular velocity of the body
| const Vector2d& force | ( | ) | const [inline] |
Get force that acts upon the body
| void setForce | ( | const Vector2d & | force | ) | [inline] |
Set force that acts upon the body
| double torque | ( | ) | const [inline] |
Get torque that acts upon the body
| void setTorque | ( | double | torque | ) | [inline] |
Set torque that acts upon the body
Apply force to the body at given position (in World coordinates)
| void applyTorque | ( | double | torque | ) |
Apply torque to the body
| double mass | ( | ) | const [inline] |
Get mass of the body
| void setMass | ( | double | mass | ) | [inline] |
Set mass of the body
| double inertia | ( | ) | const [inline] |
Get inertia "tensor" of the body
| void setInertia | ( | double | inertia | ) | [inline] |
Set inertia "tensor" of the body
Translate local coordinates on body to world coordinates
Translate world coordinates to local coordinates on body
| int variablesCount | ( | ) | [inline, virtual] |
Get count of dynamic variables
Implements Body.
| void resetDerivatives | ( | ) | [virtual] |
Resets derivatives of dynamic variables to zero
Implements Body.
| void getDerivatives | ( | double * | array | ) | [virtual] |
Copies derivatives of dynamic variables to array
Implements Body.
| void getVariables | ( | double * | array | ) | [virtual] |
Copies dynamic variables to array
Implements Body.
| void setVariables | ( | const double * | array | ) | [virtual] |
Set dynamic variables using values in array
Implements Body.
| virtual void worldItemRemoved | ( | Item * | item | ) | [inline, virtual, inherited] |
| virtual void setWorld | ( | World * | world | ) | [inline, virtual, inherited] |
| World* world | ( | ) | const [inline, inherited] |
| const QString& name | ( | ) | const [inline, inherited] |
Returns name of the object
| void setName | ( | const QString & | name | ) | [inline, inherited] |
Set name of the object
1.5.1