#include <RigidBody.h>
| bl7::rigidbodies2::RigidBody::RigidBody | ( | void | ) | [inline] |
Default constructor.
| bl7::rigidbodies2::RigidBody::~RigidBody | ( | void | ) | [inline] |
Destructor.
| bl7::rigidbodies2::RigidBody::RigidBody | ( | const RigidBody & | rhs | ) | [inline] |
Copy constructor.
| void bl7::rigidbodies2::RigidBody::add_force | ( | const ml7::Vector2 & | f | ) | [inline] |
Adds a given force to this rigid body to be applied during next integration.
| void bl7::rigidbodies2::RigidBody::add_force_to_point | ( | const ml7::Vector2 & | f, | |
| const ml7::Vector2 & | point | |||
| ) |
Adds a given force to the given point on the rigid body. The force is given in world coordinates, but the application point is given in body space.
| void bl7::rigidbodies2::RigidBody::add_torque | ( | const float | tau | ) | [inline] |
Adds a given torque to this rigid body to be applied during next integration.
| void bl7::rigidbodies2::RigidBody::can_sleep | ( | const bool | b | ) | [inline] |
Sets the flag specifying whether the rigid body can fall asleep.
| bool bl7::rigidbodies2::RigidBody::can_sleep | ( | ) | const [inline] |
Returns the flag specifying whether this rigid body can fall asleep.
| void bl7::rigidbodies2::RigidBody::flip_category_group_flag | ( | unsigned | i | ) | [inline] |
Flips the i-th bit (0 to 31) of the category groups flags.
| void bl7::rigidbodies2::RigidBody::flip_collision_group_flag | ( | unsigned | i | ) | [inline] |
Flips the i-th bit (0 to 31) of the collision groups flags.
| float bl7::rigidbodies2::RigidBody::get_angular_acceleration | ( | ) | const [inline] |
Returns the angular acceleration of this rigid body.
| void bl7::rigidbodies2::RigidBody::get_angular_acceleration | ( | float * | alpha | ) | const [inline] |
Stores the angular acceleration of this paricle in the given float.
| float bl7::rigidbodies2::RigidBody::get_angular_damping | ( | ) | const [inline] |
Returns the angular damping of this rigid body.
| void bl7::rigidbodies2::RigidBody::get_angular_damping | ( | float * | d | ) | const [inline] |
Stores the angular damping of this paricle in the given float.
| unsigned long bl7::rigidbodies2::RigidBody::get_category_group_flag | ( | unsigned | i | ) | const [inline] |
Returns the i-th bit (0 to 31) of the category groups flags.
| unsigned long bl7::rigidbodies2::RigidBody::get_category_groups_flags | ( | ) | const [inline] |
Returns the category groups flags (default: all bits set).
| unsigned long bl7::rigidbodies2::RigidBody::get_collision_group_flag | ( | unsigned | i | ) | const [inline] |
Returns the i-th bit (0 to 31) of the collision groups flags.
| unsigned long bl7::rigidbodies2::RigidBody::get_collision_groups_flags | ( | ) | const [inline] |
Returns the collision groups flags (default: all bits set).
| CollisionSpace& bl7::rigidbodies2::RigidBody::get_collision_space | ( | ) | [inline] |
Returns the collision space specifying the underlying geometry.
| const CollisionSpace& bl7::rigidbodies2::RigidBody::get_collision_space | ( | ) | const [inline] |
Returns the collision space specifying the underlying geometry.
| void bl7::rigidbodies2::RigidBody::get_density | ( | float * | rho | ) | const [inline] |
Stores the density (mass per unit volume) of this rigid body in the given float.
| float bl7::rigidbodies2::RigidBody::get_density | ( | ) | const [inline] |
Returns the density (mass per unit volume) of this rigid body.
| ml7::Vector2 bl7::rigidbodies2::RigidBody::get_force | ( | ) | const [inline] |
Returns the linear force of this rigid body.
| void bl7::rigidbodies2::RigidBody::get_force | ( | ml7::Vector2 * | f | ) | const [inline] |
Stores the linear force of this paricle in the given vector.
| void bl7::rigidbodies2::RigidBody::get_friction | ( | float * | fs, | |
| float * | fk | |||
| ) | const [inline] |
Stores the lateral static and kinetic friction in the given floats.
| unsigned bl7::rigidbodies2::RigidBody::get_id | ( | ) | const [inline] |
Returns the individual order ID of this rigid body.
| float bl7::rigidbodies2::RigidBody::get_inertia | ( | ) | const [inline] |
Returns the moment of inertia of this rigid body.
| void bl7::rigidbodies2::RigidBody::get_inertia | ( | float * | moi | ) | const [inline] |
Stores the moment of inertia of this paricle in the given float.
| float bl7::rigidbodies2::RigidBody::get_inverse_inertia | ( | ) | const [inline] |
Returns the inverse moment of inertia of this rigid body.
| void bl7::rigidbodies2::RigidBody::get_inverse_inertia | ( | float * | imoi | ) | const [inline] |
Stores the inverse moment of inertia of this paricle in the given float.
| float bl7::rigidbodies2::RigidBody::get_inverse_mass | ( | ) | const [inline] |
Returns the inverse mass of this rigid body.
| void bl7::rigidbodies2::RigidBody::get_inverse_mass | ( | float * | im | ) | const [inline] |
Stores the inverse mass of this paricle in the given float.
| float bl7::rigidbodies2::RigidBody::get_kinetic_friction | ( | ) | const [inline] |
Returns the lateral kinetic friction (-1: use default value).
| float bl7::rigidbodies2::RigidBody::get_last_angular_acceleration | ( | ) | const [inline] |
Returns the angular acceleration of the last frame.
| const ml7::Vector2& bl7::rigidbodies2::RigidBody::get_last_linear_acceleration | ( | ) | const [inline] |
Returns the linear acceleration of the last frame.
| void bl7::rigidbodies2::RigidBody::get_linear_acceleration | ( | ml7::Vector2 * | a | ) | const [inline] |
Stores the linear acceleration of this paricle in the given vector.
| ml7::Vector2 bl7::rigidbodies2::RigidBody::get_linear_acceleration | ( | ) | const [inline] |
Returns the linear acceleration of this rigid body.
| float bl7::rigidbodies2::RigidBody::get_linear_damping | ( | ) | const [inline] |
Returns the linear damping of this rigid body.
| void bl7::rigidbodies2::RigidBody::get_linear_damping | ( | float * | d | ) | const [inline] |
Stores the linear damping of this paricle in the given float.
| float bl7::rigidbodies2::RigidBody::get_mass | ( | ) | const [inline] |
Returns the mass of this rigid body.
| void bl7::rigidbodies2::RigidBody::get_mass | ( | float * | m | ) | const [inline] |
Stores the mass of this paricle in the given float.
| float bl7::rigidbodies2::RigidBody::get_orientation | ( | ) | const [inline] |
Returns the angular orientation of this rigid body.
| void bl7::rigidbodies2::RigidBody::get_orientation | ( | float * | phi | ) | const [inline] |
Stores the angular orientation of this rigid body in the given float.
| ml7::Vector2 bl7::rigidbodies2::RigidBody::get_point_in_body_space | ( | const ml7::Vector2 & | point_in_world | ) |
Transforms a given point in world space to body coordinates.
| ml7::Vector2 bl7::rigidbodies2::RigidBody::get_point_in_world_space | ( | const ml7::Vector2 & | point_on_body | ) |
Transforms a given point in body space to world coordinates.
| ml7::Vector2 bl7::rigidbodies2::RigidBody::get_position | ( | ) | const [inline] |
Returns the linear position of this rigid body.
| void bl7::rigidbodies2::RigidBody::get_position | ( | ml7::Vector2 * | p | ) | const [inline] |
Stores the linear position of this rigid body in the given float.
| float bl7::rigidbodies2::RigidBody::get_restitution | ( | ) | const [inline] |
Returns the coefficient of restitution.
| void bl7::rigidbodies2::RigidBody::get_rotation | ( | float * | omega | ) | const [inline] |
Stores the angular velocity of this paricle in the given float.
| float bl7::rigidbodies2::RigidBody::get_rotation | ( | ) | const [inline] |
Returns the angular velocity of this rigid body.
| float bl7::rigidbodies2::RigidBody::get_static_friction | ( | ) | const [inline] |
Returns the lateral static friction (-1: use default value).
| float bl7::rigidbodies2::RigidBody::get_tiredness | ( | ) | const [inline] |
Returns the tiredness of this rigid body.
| float bl7::rigidbodies2::RigidBody::get_torque | ( | ) | const [inline] |
Returns the angular torque of this rigid body.
| void bl7::rigidbodies2::RigidBody::get_torque | ( | float * | tau | ) | const [inline] |
Stores the angular torque of this paricle in the given float.
| const ml7::Matrix2x3& bl7::rigidbodies2::RigidBody::get_transform_matrix | ( | ) | const [inline] |
Returns the transform matrix derived from position and orientation.
| const ml7::Matrix2x3& bl7::rigidbodies2::RigidBody::get_transform_matrix_inverted | ( | ) | const [inline] |
Returns the inverted transform matrix derived from position and orientation.
| void* bl7::rigidbodies2::RigidBody::get_user_data | ( | ) | const [inline] |
Returns the pointer to any user data structure (or NULL).
| ml7::Vector2 bl7::rigidbodies2::RigidBody::get_velocity | ( | ) | const [inline] |
Returns the linear velocity of this rigid body.
| void bl7::rigidbodies2::RigidBody::get_velocity | ( | ml7::Vector2 * | v | ) | const [inline] |
Stores the linear velocity of this paricle in the given vector.
| bool bl7::rigidbodies2::RigidBody::has_finite_inertia | ( | ) | const [inline] |
Determines whether this rigid body has finite moment of inertia (inverse moment of inertia > 0).
| bool bl7::rigidbodies2::RigidBody::has_finite_mass | ( | ) | const [inline] |
Determines whether this rigid body has finite mass (inverse mass > 0).
| bool bl7::rigidbodies2::RigidBody::is_active | ( | ) | const [inline] |
Returns the flag specifying whether this rigid body is active or asleep.
Copy assignment operator.
| void bl7::rigidbodies2::RigidBody::reset_force | ( | ) | [inline] |
Resets the accumulated force of this rigid body to zero.
| void bl7::rigidbodies2::RigidBody::reset_torque | ( | ) | [inline] |
Resets the accumulated torque of this rigid body to zero.
| void bl7::rigidbodies2::RigidBody::set_active | ( | const bool | b = true |
) | [inline] |
Sets the flag specifying whether the rigid body is active or asleep.
| void bl7::rigidbodies2::RigidBody::set_angular_acceleration | ( | const float | alpha | ) | [inline] |
Sets the angular acceleration of this rigid body.
| void bl7::rigidbodies2::RigidBody::set_angular_damping | ( | const float | d | ) | [inline] |
Sets the angular damping of this rigid body.
| void bl7::rigidbodies2::RigidBody::set_category_group_flag | ( | unsigned | i | ) | [inline] |
Sets the i-th bit (0 to 31) of the category groups flags.
| void bl7::rigidbodies2::RigidBody::set_category_groups_flags | ( | const unsigned long | flags | ) | [inline] |
Sets the category groups flags (default: all bits set).
| void bl7::rigidbodies2::RigidBody::set_collision_group_flag | ( | unsigned | i | ) | [inline] |
Sets the i-th bit (0 to 31) of the collision groups flags.
| void bl7::rigidbodies2::RigidBody::set_collision_groups_flags | ( | const unsigned long | flags | ) | [inline] |
Sets the collision groups flags (default: all bits set).
| void bl7::rigidbodies2::RigidBody::set_density | ( | const float | rho | ) | [inline] |
Sets the density (mass per unit volume) of this rigid body.
| void bl7::rigidbodies2::RigidBody::set_friction | ( | const float | fs, | |
| const float | fk | |||
| ) | [inline] |
Sets the lateral static and kinetic friction.
| void bl7::rigidbodies2::RigidBody::set_friction | ( | const float | f_ | ) | [inline] |
Sets the lateral static and kinetic friction.
| void bl7::rigidbodies2::RigidBody::set_inertia | ( | const float | moi | ) | [inline] |
Sets the moment of inertia of this rigid body.
| void bl7::rigidbodies2::RigidBody::set_inverse_inertia | ( | const float | imoi | ) | [inline] |
Sets the inverse moment of inertia of this rigid body.
| void bl7::rigidbodies2::RigidBody::set_inverse_mass | ( | const float | im | ) | [inline] |
Sets the inverse mass of this rigid body.
| void bl7::rigidbodies2::RigidBody::set_kinetic_friction | ( | const float | fk | ) | [inline] |
Sets the lateral kinetic friction.
| void bl7::rigidbodies2::RigidBody::set_linear_acceleration | ( | const ml7::Vector2 & | a | ) | [inline] |
Sets the linear acceleration of this rigid body.
| void bl7::rigidbodies2::RigidBody::set_linear_damping | ( | const float | d | ) | [inline] |
Sets the linear damping of this rigid body.
| void bl7::rigidbodies2::RigidBody::set_mass | ( | const float | m | ) | [inline] |
Sets the mass of this rigid body.
| void bl7::rigidbodies2::RigidBody::set_orientation | ( | const float | phi | ) | [inline] |
Sets the angular orientation of this rigid body.
| void bl7::rigidbodies2::RigidBody::set_position | ( | const ml7::Vector2 & | p | ) | [inline] |
Sets the linear position of this rigid body.
| void bl7::rigidbodies2::RigidBody::set_restitution | ( | const float | e | ) | [inline] |
Sets the coefficient of restitution.
| void bl7::rigidbodies2::RigidBody::set_rotation | ( | const float | omega | ) | [inline] |
Sets the angular velocity of this rigid body.
| void bl7::rigidbodies2::RigidBody::set_static_friction | ( | const float | fs | ) | [inline] |
Sets the lateral static friction.
| void bl7::rigidbodies2::RigidBody::set_tiredness | ( | const float | tiredness | ) | [inline] |
Sets the tiredness of this rigid body.
| void bl7::rigidbodies2::RigidBody::set_user_data | ( | void * | user_data | ) | [inline] |
Sets the pointer to any user data structure (or NULL).
| void bl7::rigidbodies2::RigidBody::set_velocity | ( | const ml7::Vector2 & | v | ) | [inline] |
Sets the linear velocity of this rigid body.
| void bl7::rigidbodies2::RigidBody::unset_category_group_flag | ( | unsigned | i | ) | [inline] |
Unsets the i-th bit (0 to 31) of the category groups flags.
| void bl7::rigidbodies2::RigidBody::unset_collision_group_flag | ( | unsigned | i | ) | [inline] |
Unsets the i-th bit (0 to 31) of the collision groups flags.
The angular acceleration of this rigid body.
The amount of damping applied to angular motion of this rigid body. It is required to remove energy added through numerical instability during integration.
The density (mass per unit volume) of this rigid body.
The linear force (accumulated) to be applied at the next integration only.
The inverse of the moment of inertia of this rigid body. It is more useful than holding the actual moment of inertia because zero makes no sense (completely unstable in numerical simulation) and infinite (unrotatable) now is easily represented by 0. Moreover most of the computations use the inverse moment of intertia and not the actual moment of inertia so the needless division slips.
The inverse of the mass of this rigid body. It is more useful than holding the actual mass because zero mass makes no sense (completely unstable in numerical simulation) and infinite mass (immovable) now is easily represented by 0. Moreover most of the computations use the inverse mass and not the actual mass so the needless division slips.
The lateral kinetic friction (-1: use default value).
The linear acceleration of this rigid body. Can be set due to gravity (or the like).
The amount of damping applied to linear motion of this rigid body. It is required to remove energy added through numerical instability during integration.
The angular orientation of this rigid body in world space.
The linear position of this rigid body in world space.
The coefficient of restitution (-1: use default value).
The angular velocity of this rigid body in world space.
The lateral static friction (-1: use default value).
The angular torque (accumulated) to be applied at the next integration only.
The linear velocity of this rigid body in world space.
1.7.1