#include <rigidbody.h>
Inheritance diagram for Polygon:
Public Member Functions | |
const std::vector< Vector2d > & | vertexes () const |
std::vector< Vector2d > & | vertexes () |
void | setVertexes (const std::vector< Vector2d > &vertexes) |
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) |
const std::vector<Vector2d>& vertexes | ( | ) | const [inline] |
Get vertex list (constant)
std::vector<Vector2d>& vertexes | ( | ) | [inline] |
Get vertex list (editable)
void setVertexes | ( | const std::vector< Vector2d > & | vertexes | ) | [inline] |
Set vertex list
const Vector2d& position | ( | ) | const [inline, inherited] |
Get position of the center of mass of the body
void setPosition | ( | const Vector2d & | position | ) | [inline, inherited] |
Set position of the center of mass of the body
double angle | ( | ) | const [inline, inherited] |
Get angle of the body
void setAngle | ( | double | angle | ) | [inline, inherited] |
Set angle of the body
const Vector2d& velocity | ( | ) | const [inline, inherited] |
Get velocity of the center of mass of the body
void setVelocity | ( | const Vector2d & | velocity | ) | [inline, inherited] |
Set velocity of the particle
double angularVelocity | ( | ) | const [inline, inherited] |
Get angular velocity of the body
void setAngularVelocity | ( | double | angularVelocity | ) | [inline, inherited] |
Set angular velocity of the body
const Vector2d& force | ( | ) | const [inline, inherited] |
Get force that acts upon the body
void setForce | ( | const Vector2d & | force | ) | [inline, inherited] |
Set force that acts upon the body
double torque | ( | ) | const [inline, inherited] |
Get torque that acts upon the body
void setTorque | ( | double | torque | ) | [inline, inherited] |
Set torque that acts upon the body
Apply force to the body at given position (in World coordinates)
void applyTorque | ( | double | torque | ) | [inherited] |
Apply torque to the body
double mass | ( | ) | const [inline, inherited] |
Get mass of the body
void setMass | ( | double | mass | ) | [inline, inherited] |
Set mass of the body
double inertia | ( | ) | const [inline, inherited] |
Get inertia "tensor" of the body
void setInertia | ( | double | inertia | ) | [inline, inherited] |
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, inherited] |
Get count of dynamic variables
Implements Body.
void resetDerivatives | ( | ) | [virtual, inherited] |
Resets derivatives of dynamic variables to zero
Implements Body.
void getDerivatives | ( | double * | array | ) | [virtual, inherited] |
Copies derivatives of dynamic variables to array
Implements Body.
void getVariables | ( | double * | array | ) | [virtual, inherited] |
Copies dynamic variables to array
Implements Body.
void setVariables | ( | const double * | array | ) | [virtual, inherited] |
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