Classes | |
class | clan::Body |
Body class. More... | |
class | clan::BodyDescription |
BodyDescription class. More... | |
class | clan::DistanceJoint |
DistanceJoint class. More... | |
class | clan::DistanceJointDescription |
DistanceJointDescription class. More... | |
class | clan::Fixture |
Fixture class. More... | |
class | clan::FixtureDescription |
FixtureDescription class. More... | |
class | clan::Joint |
Joint class. More... | |
class | clan::MouseJoint |
MouseJoint class. More... | |
class | clan::MouseJointDescription |
MouseJointDescription class. More... | |
class | clan::PrismaticJoint |
PrismaticJoint class. More... | |
class | clan::PrismaticJointDescription |
PrismaticJointDescription class. More... | |
class | clan::QueryResult |
Used by physics query assistant. More... | |
class | clan::RevoluteJoint |
RevoluteJoint class. More... | |
class | clan::RevoluteJointDescription |
RevoluteJointDescription class. More... | |
Enumerations | |
enum | clan::BodyType { clan::body_static = 0, clan::body_kinematic = 1, clan::body_dynamic = 2 } |
Body types. More... | |
enum | clan::JointType { clan::Joint_Distance = 0, clan::Joint_Friction = 1, clan::Joint_Gear = 2, clan::Joint_Mouse = 3, clan::Joint_Prismatic = 4, clan::Joint_Pulley = 5, clan::Joint_Revolute = 6, clan::Joint_Rope = 7, clan::Joint_Weld = 8, clan::Joint_Wheel = 9, clan::Joint_None = 1337 } |
Joint types. More... | |
enum | clan::QueryResultType { clan::query_raycast, clan::query_aabb } |
Query types. More... | |
Functions | |
clan::Fixture::Fixture () | |
Constructs a null instance. More... | |
clan::Fixture::Fixture (PhysicsContext &pc, Body &body, const FixtureDescription &description) | |
Constructs a World. More... | |
clan::Fixture::~Fixture () | |
Construction | |
clan::Body::Body () | |
Constructs a null instance. More... | |
clan::Body::Body (PhysicsContext &pc, const BodyDescription &description) | |
Constructs a Body. More... | |
clan::Body::Body (PhysicsContext &pc, const std::string &resource_id, const XMLResourceDocument &resources) | |
Constructs a Body. More... | |
clan::Body::~Body () | |
Attributes | |
bool | clan::Body::is_null () const |
Returns true if this object is invalid. More... | |
void | clan::Body::throw_if_null () const |
Throw an exception if this object is invalid. More... | |
Vec2f | clan::Body::get_position () const |
Get the position of the body. More... | |
Angle | clan::Body::get_angle () const |
Get the angle of the body. More... | |
Vec2f | clan::Body::get_linear_velocity () const |
Return the linear velocity of the body. More... | |
Angle | clan::Body::get_angular_velocity () const |
Return the angular velocity of the body. More... | |
float | clan::Body::get_gravity_scale () |
Get the gravity scale of the body. More... | |
BodyType | clan::Body::get_type () const |
Get the type of this body. More... | |
bool | clan::Body::has_fixed_rotation () const |
Returns true if the body has fixed rotation. More... | |
float | clan::Body::get_linear_damping () const |
Get the linear damping of the body. More... | |
float | clan::Body::get_angular_damping () const |
the angular damping of the body. More... | |
int | clan::Body::get_id () const |
Return the world's id of the body. More... | |
bool | clan::Body::is_dummy () const |
Returns true if this body is a dummy body. More... | |
bool | clan::Body::is_awake () const |
Returns true if this body is not sleeping. More... | |
bool | clan::Body::is_active () const |
Returns true if this body is active in the simulation. More... | |
bool | clan::Body::is_bullet () const |
Returns true if this body is a bullet. More... | |
PhysicsObject * | clan::Body::get_data () |
Returns the physics object data. More... | |
Operations | |
Body & | clan::Body::operator= (const Body ©) |
Copy operator. More... | |
void | clan::Body::set_position (const Vec2f &pos) |
add a fixture to the body. More... | |
void | clan::Body::set_angle (const Angle &angle) |
set the angle of the body More... | |
void | clan::Body::set_linear_velocity (const Vec2f &velocity) |
set the linear velocity of the body. More... | |
void | clan::Body::set_angular_velocity (const Angle &velocity) |
set the angular velocity of the body. More... | |
void | clan::Body::apply_force (const Vec2f &force, const Vec2f &point) |
Apply a force at a world point. More... | |
void | clan::Body::apply_force_to_center (const Vec2f &force) |
Apply a force to the center of mass. More... | |
void | clan::Body::apply_torque (const float torque) |
Apply a force to the center of mass. More... | |
void | clan::Body::apply_linear_impulse (const Vec2f &impulse, const Vec2f &point) |
Apply an impulse at a point. More... | |
void | clan::Body::apply_angular_impulse (const float impulse) |
Apply an angular impulse. More... | |
void | clan::Body::set_gravity_scale (const float scale) |
Set the gravity scale of the body. More... | |
void | clan::Body::set_type (const BodyType type) |
Set the type of this body. This may alter the mass and velocity. More... | |
void | clan::Body::set_as_bullet (const bool value=true) |
Set this body to be treated like a bullet for continuous collision detection. More... | |
void | clan::Body::set_awake (const bool value=true) |
Set this body to sleep. More... | |
void | clan::Body::set_active (const bool value=true) |
Set this body to be active in the simulation. More... | |
void | clan::Body::set_fixed_rotation (const bool value=true) |
Set this body to use fixed rotation. This causes the mass to be reset. More... | |
void | clan::Body::set_linear_damping (const float damping) |
Set the linear damping of the body. More... | |
void | clan::Body::set_angular_damping (const float damping) |
Set the angular damping of the body. More... | |
void | clan::Body::reset_mass_data () |
This resets the mass properties to the sum of the mass properties of the fixtures. More... | |
void | clan::Body::kill () |
Remove the body from the simulation. The body gets swapped with a dummy body. More... | |
void | clan::Body::set_data (PhysicsObject *data) |
Set the physics object object that is going to process collision events. More... | |
Signals | |
Signal_v1< Body > & | clan::Body::sig_begin_collision () |
Signal emitted when a collision with other body occurs. More... | |
Signal_v1< Body > & | clan::Body::sig_end_collision () |
Signal emitted when a collision with other body ends. More... | |
Signal_v0 & | clan::Body::sig_body_deletion () |
Signal emitted when the body is deleted. More... | |
Construction | |
clan::BodyDescription::BodyDescription () | |
Constructs a null instance. More... | |
clan::BodyDescription::BodyDescription (const PhysicsWorld &pw) | |
Constructs a BodyDescription. More... | |
clan::BodyDescription::BodyDescription (const PhysicsContext &pc) | |
Constructs a BodyDescription. More... | |
clan::BodyDescription::BodyDescription (const PhysicsContext &pc, const std::string &resource_id, const XMLResourceDocument &resources) | |
Constructs a BodyDescription. More... | |
clan::BodyDescription::BodyDescription (const BodyDescription ©) | |
Constructs a BodyDescription. More... | |
virtual | clan::BodyDescription::~BodyDescription () |
Attributes | |
bool | clan::BodyDescription::is_null () const |
Returns true if this object is invalid. More... | |
void | clan::BodyDescription::throw_if_null () const |
Throw an exception if this object is invalid. More... | |
Operations | |
BodyDescription & | clan::BodyDescription::operator= (const BodyDescription ©) |
Copy assignment operator. More... | |
void | clan::BodyDescription::set_type (const BodyType type) |
void | clan::BodyDescription::set_position (const Vec2f &position) |
void | clan::BodyDescription::set_position (const Pointf &position) |
void | clan::BodyDescription::set_position (const int x, const int y) |
void | clan::BodyDescription::set_position (const float x, const float y) |
void | clan::BodyDescription::set_angle (const Angle &angle) |
Set the Physics World angle of the body. More... | |
void | clan::BodyDescription::set_linear_velocity (const Vec2f &velocity) |
Set the linear velocity of the body's origin in Physics World co-ordinates. More... | |
void | clan::BodyDescription::set_angular_velocity (const Angle &velocity) |
Set the angular velocity of the body. More... | |
void | clan::BodyDescription::set_linear_damping (const float damping) |
void | clan::BodyDescription::set_angular_damping (const float damping) |
void | clan::BodyDescription::allow_sleep (const bool value=true) |
void | clan::BodyDescription::set_awake (const bool value=true) |
Should body initially be awake or sleep? More... | |
void | clan::BodyDescription::set_fixed_rotation (const bool value) |
Should this body be prevented from rotating? Useful for characters. More... | |
void | clan::BodyDescription::set_as_bullet (const bool value=true) |
Set the body to act like a bullet. Gives more accuracy for fast moving bodies. More... | |
void | clan::BodyDescription::set_active (const bool value=true) |
Does the body start out active? More... | |
void | clan::BodyDescription::set_gravity_scale (const float scale) |
Scale the gravity applied to this body. More... | |
Construction | |
clan::FixtureDescription::FixtureDescription () | |
Constructs a null instance. More... | |
clan::FixtureDescription::FixtureDescription (const PhysicsWorld &pw) | |
Constructs a Fixture Description. More... | |
clan::FixtureDescription::FixtureDescription (const PhysicsContext &pc) | |
Constructs a Fixture Description. More... | |
clan::FixtureDescription::FixtureDescription (const FixtureDescription ©) | |
Copy operator. More... | |
virtual | clan::FixtureDescription::~FixtureDescription () |
Attributes | |
bool | clan::FixtureDescription::is_null () const |
Returns true if this object is invalid. More... | |
void | clan::FixtureDescription::throw_if_null () const |
Throw an exception if this object is invalid. More... | |
Operations | |
void | clan::FixtureDescription::set_shape (const Shape &shape) |
Set the shape of the Fixture. More... | |
void | clan::FixtureDescription::set_friction (const float friction) |
The friction coefficient, usually in the range [0,1]. More... | |
void | clan::FixtureDescription::set_restitution (const float restitution) |
The restitution (elasticity) usually in the range [0,1]. More... | |
void | clan::FixtureDescription::set_density (const float density) |
The density, usually in kg/m^2. More... | |
void | clan::FixtureDescription::set_as_sensor (const bool value=true) |
void | clan::FixtureDescription::set_filter () |
Contact filtering data. More... | |
FixtureDescription & | clan::FixtureDescription::operator= (const FixtureDescription ©) |
Construction | |
clan::DistanceJoint::DistanceJoint () | |
Constructs a null instance. More... | |
clan::DistanceJoint::DistanceJoint (PhysicsContext &pc, const DistanceJointDescription &description) | |
Constructs a DistanceJoint object. More... | |
virtual | clan::DistanceJoint::~DistanceJoint () |
Attributes | |
bool | clan::DistanceJoint::is_null () const |
Returns true if this object is invalid. More... | |
void | clan::DistanceJoint::throw_if_null () const |
Throw an exception if this object is invalid. More... | |
bool | clan::DistanceJoint::is_active () const |
Short-cut function to determine if either body is inactive. More... | |
Operations | |
DistanceJoint & | clan::DistanceJoint::operator= (const DistanceJoint ©) |
Construction | |
clan::DistanceJointDescription::DistanceJointDescription () | |
Constructs a null instance. More... | |
clan::DistanceJointDescription::DistanceJointDescription (const PhysicsWorld &pw) | |
Constructs a DistanceJointDescription object. More... | |
virtual | clan::DistanceJointDescription::~DistanceJointDescription () |
Attributes | |
bool | clan::DistanceJointDescription::is_null () const |
Returns true if this object is invalid. More... | |
void | clan::DistanceJointDescription::throw_if_null () const |
Throw an exception if this object is invalid. More... | |
bool | clan::DistanceJointDescription::is_active () const |
Short-cut function to determine if either body is inactive. More... | |
Operations | |
DistanceJointDescription & | clan::DistanceJointDescription::operator= (const DistanceJointDescription ©) |
Copy assignment operator. More... | |
void | clan::DistanceJointDescription::set_bodies (const Body &bodyA, const Body &bodyB, const Vec2f &anchorA, const Vec2f &anchorB) |
Sets two bodies to be connected by the joint. More... | |
void | clan::DistanceJointDescription::set_body_a (const Body &body, const Vec2f &anchor) |
Sets first body to be connected by the joint. More... | |
void | clan::DistanceJointDescription::set_body_b (const Body &body, const Vec2f &anchor) |
Sets second body to be connected by the joint. More... | |
void | clan::DistanceJointDescription::set_damping_ratio (const float damping) |
Sets the damping ratio. 0 = no damping, 1 = critical damping. More... | |
void | clan::DistanceJointDescription::set_length (const float length) |
Sets the natural length between the anchor points. More... | |
Implementation | |
std::shared_ptr < DistanceJointDescription_Impl > | clan::DistanceJointDescription::impl |
Construction | |
clan::Joint::Joint () | |
Constructs a null instance. More... | |
virtual | clan::Joint::~Joint () |
Attributes | |
JointType | clan::Joint::get_Joint_type () const |
virtual bool | clan::Joint::is_null () const |
Returns true if this object is invalid. More... | |
virtual void | clan::Joint::throw_if_null () const |
Throw an exception if this object is invalid. More... | |
virtual bool | clan::Joint::is_active () const |
Short-cut function to determine if either body is inactive. More... | |
virtual Vec2f | clan::Joint::get_reaction_force (float dt) |
Get the reaction force on bodyB at the joint anchor in Newtons. More... | |
virtual float | clan::Joint::get_reaction_torque (float dt) |
Get the reaction torque on bodyB in N*m. More... | |
virtual Body * | clan::Joint::get_body_a () |
Return the first body attached to this joint. More... | |
virtual Body * | clan::Joint::get_body_b () |
Return the second body attached to this joint. More... | |
virtual Vec2f | clan::Joint::get_anchor_a () |
Return the anchor point on first body in world coordinates. More... | |
virtual Vec2f | clan::Joint::get_anchor_b () |
Return the second body attached to this joint. More... | |
virtual int | clan::Joint::get_id () const |
Return the world's id of the joint. More... | |
bool | clan::Joint::is_dummy () const |
Returns true if this joint is a dummy joint. More... | |
Operations | |
Joint & | clan::Joint::operator= (const Joint ©) |
Implementation | |
std::shared_ptr< Joint_Impl > | clan::Joint::impl |
Construction | |
clan::MouseJoint::MouseJoint () | |
Constructs a null instance. More... | |
clan::MouseJoint::MouseJoint (PhysicsContext &pc, const MouseJointDescription &description) | |
Constructs a MouseJoint object. More... | |
virtual | clan::MouseJoint::~MouseJoint () |
Attributes | |
bool | clan::MouseJoint::is_null () const |
Returns true if this object is invalid. More... | |
void | clan::MouseJoint::throw_if_null () const |
Throw an exception if this object is invalid. More... | |
bool | clan::MouseJoint::is_active () const |
Short-cut function to determine if either body is inactive. More... | |
Operations | |
MouseJoint & | clan::MouseJoint::operator= (const MouseJoint ©) |
bool | clan::MouseJoint::grab (const Vec2f &target) const |
bool | clan::MouseJoint::grab (const Pointf &target) const |
bool | clan::MouseJoint::grab (const float x, const float y) const |
bool | clan::MouseJoint::grab (const int x, const int y) const |
void | clan::MouseJoint::release () |
Construction | |
clan::MouseJointDescription::MouseJointDescription () | |
Constructs a null instance. More... | |
clan::MouseJointDescription::MouseJointDescription (const PhysicsWorld &pw) | |
Constructs a MouseJointDescription object. More... | |
virtual | clan::MouseJointDescription::~MouseJointDescription () |
Attributes | |
bool | clan::MouseJointDescription::is_null () const |
Returns true if this object is invalid. More... | |
void | clan::MouseJointDescription::throw_if_null () const |
Throw an exception if this object is invalid. More... | |
bool | clan::MouseJointDescription::is_active () const |
Short-cut function to determine if either body is inactive. More... | |
Operations | |
MouseJointDescription & | clan::MouseJointDescription::operator= (const MouseJointDescription ©) |
Copy assignment operator. More... | |
void | clan::MouseJointDescription::set_bodies (const Body &bodyA, const Body &bodyB) |
Sets two bodies to be connected by the joint. More... | |
void | clan::MouseJointDescription::set_body_a (const Body &body) |
Sets first body to be connected by the joint. More... | |
void | clan::MouseJointDescription::set_body_b (const Body &body) |
Sets second body to be connected by the joint. More... | |
void | clan::MouseJointDescription::set_target (const Vec2f &target) |
Sets the target position of the mouse. More... | |
void | clan::MouseJointDescription::set_max_force (const float value) |
Sets the maximum force the mouse joint is allowed to have. More... | |
void | clan::MouseJointDescription::set_damping_ratio (const float damping) |
Sets the damping ratio. 0 = no damping, 1 = critical damping. More... | |
void | clan::MouseJointDescription::set_frequency (const float frequency) |
Sets the response speed in Hz. More... | |
Implementation | |
std::shared_ptr < MouseJointDescription_Impl > | clan::MouseJointDescription::impl |
Construction | |
clan::PrismaticJoint::PrismaticJoint () | |
Constructs a null instance. More... | |
clan::PrismaticJoint::PrismaticJoint (PhysicsContext &pc, const PrismaticJointDescription &description) | |
Constructs a PrismaticJoint object. More... | |
virtual | clan::PrismaticJoint::~PrismaticJoint () |
Attributes | |
bool | clan::PrismaticJoint::is_null () const |
Returns true if this object is invalid. More... | |
void | clan::PrismaticJoint::throw_if_null () const |
Throw an exception if this object is invalid. More... | |
bool | clan::PrismaticJoint::is_active () const |
Short-cut function to determine if either body is inactive. More... | |
Operations | |
PrismaticJoint & | clan::PrismaticJoint::operator= (const PrismaticJoint ©) |
Construction | |
clan::PrismaticJointDescription::PrismaticJointDescription () | |
Constructs a null instance. More... | |
clan::PrismaticJointDescription::PrismaticJointDescription (const PhysicsWorld &pw) | |
Constructs a PrismaticJointDescription object. More... | |
virtual | clan::PrismaticJointDescription::~PrismaticJointDescription () |
Attributes | |
bool | clan::PrismaticJointDescription::is_null () const |
Returns true if this object is invalid. More... | |
void | clan::PrismaticJointDescription::throw_if_null () const |
Throw an exception if this object is invalid. More... | |
bool | clan::PrismaticJointDescription::is_active () const |
Short-cut function to determine if either body is inactive. More... | |
Operations | |
PrismaticJointDescription & | clan::PrismaticJointDescription::operator= (const PrismaticJointDescription ©) |
Copy assignment operator. More... | |
void | clan::PrismaticJointDescription::set_bodies (const Body &bodyA, const Body &bodyB, const Vec2f &anchorA, const Vec2f &anchorB) |
Sets two bodies to be connected by the joint. More... | |
void | clan::PrismaticJointDescription::set_body_a (const Body &body, const Vec2f &anchor) |
Sets first body to be connected by the joint. More... | |
void | clan::PrismaticJointDescription::set_body_b (const Body &body, const Vec2f &anchor) |
Sets second body to be connected by the joint. More... | |
void | clan::PrismaticJointDescription::set_axis_a (const Vec2f &axis) |
Sets the local translation unit axis in bodyA. More... | |
void | clan::PrismaticJointDescription::set_reference_angle (const Angle &angle) |
Sets The constrained angle between the bodies: bodyB_angle - bodyA_angle. More... | |
void | clan::PrismaticJointDescription::enable_limit (const bool value=true) |
Enable/disable the joint limit. More... | |
void | clan::PrismaticJointDescription::set_translation_limits (const float min, const float max) |
Sets the translation limits for the prismatic joint. Usually in meters. More... | |
void | clan::PrismaticJointDescription::set_translation_min (const float value) |
Sets The lower translation limit, usually in meters. More... | |
void | clan::PrismaticJointDescription::set_translation_max (const float value) |
Sets The upper translation limit, usually in meters. More... | |
void | clan::PrismaticJointDescription::set_as_motor (const bool value=true) |
Enable/disable the joint motor. More... | |
void | clan::PrismaticJointDescription::set_max_motor_force (const float value) |
Sets The maximum motor torque, usually in N-m. More... | |
void | clan::PrismaticJointDescription::set_motor_speed (const Angle &angle) |
Sets the desired motor speed. More... | |
Implementation | |
std::shared_ptr < PrismaticJointDescription_Impl > | clan::PrismaticJointDescription::impl |
Construction | |
clan::RevoluteJoint::RevoluteJoint () | |
Constructs a null instance. More... | |
clan::RevoluteJoint::RevoluteJoint (PhysicsContext &pc, const RevoluteJointDescription &description) | |
Constructs a RevoluteJoint object. More... | |
virtual | clan::RevoluteJoint::~RevoluteJoint () |
Attributes | |
bool | clan::RevoluteJoint::is_null () const |
Returns true if this object is invalid. More... | |
void | clan::RevoluteJoint::throw_if_null () const |
Throw an exception if this object is invalid. More... | |
bool | clan::RevoluteJoint::is_active () const |
Short-cut function to determine if either body is inactive. More... | |
Operations | |
RevoluteJoint & | clan::RevoluteJoint::operator= (const RevoluteJoint ©) |
Construction | |
clan::RevoluteJointDescription::RevoluteJointDescription () | |
Constructs a null instance. More... | |
clan::RevoluteJointDescription::RevoluteJointDescription (const PhysicsWorld &pw) | |
Constructs a RevoluteJointDescription object. More... | |
virtual | clan::RevoluteJointDescription::~RevoluteJointDescription () |
Attributes | |
bool | clan::RevoluteJointDescription::is_null () const |
Returns true if this object is invalid. More... | |
void | clan::RevoluteJointDescription::throw_if_null () const |
Throw an exception if this object is invalid. More... | |
bool | clan::RevoluteJointDescription::is_active () const |
Short-cut function to determine if either body is inactive. More... | |
bool | clan::RevoluteJointDescription::is_motor () const |
float | clan::RevoluteJointDescription::get_motor_speed () const |
Angle | clan::RevoluteJointDescription::get_reference_angle () const |
Angle | clan::RevoluteJointDescription::get_lower_angle () const |
Angle | clan::RevoluteJointDescription::get_upper_angle () const |
Operations | |
RevoluteJointDescription & | clan::RevoluteJointDescription::operator= (const RevoluteJointDescription ©) |
Copy assignment operator. More... | |
void | clan::RevoluteJointDescription::set_bodies (const Body &bodyA, const Body &bodyB, const Vec2f &anchor) |
Sets two bodies to be connected by the joint. More... | |
void | clan::RevoluteJointDescription::set_body_a (const Body &body, const Vec2f &anchor) |
Sets first body to be connected by the joint. More... | |
void | clan::RevoluteJointDescription::set_body_b (const Body &body, const Vec2f &anchor) |
Sets second body to be connected by the joint. More... | |
void | clan::RevoluteJointDescription::set_as_motor (const bool value=true) |
Enables the joint motor. More... | |
void | clan::RevoluteJointDescription::set_motor_speed (const Angle speed) |
Apply the desired motor speed. More... | |
void | clan::RevoluteJointDescription::set_reference_angle (const Angle angle) |
The bodyB angle minus bodyA angle in the reference state. More... | |
void | clan::RevoluteJointDescription::set_max_motor_torque (const float value) |
Set the maximum motor torque used to achieve the desired motor speed. Usually in N-m. More... | |
void | clan::RevoluteJointDescription::set_angle_limit (const Angle lower, const Angle upper) |
Set limits for the angle of the joint. More... | |
void | clan::RevoluteJointDescription::set_lower_angle (const Angle angle) |
The lower angle for the joint limit. More... | |
void | clan::RevoluteJointDescription::set_upper_angle (const Angle angle) |
The upper angle for the joint limit. More... | |
Implementation | |
std::shared_ptr < RevoluteJointDescription_Impl > | clan::RevoluteJointDescription::impl |
enum clan::BodyType |
Body types.
Enumerator | |
---|---|
body_static | |
body_kinematic | |
body_dynamic |
enum clan::JointType |
Joint types.
Enumerator | |
---|---|
Joint_Distance | |
Joint_Friction | |
Joint_Gear | |
Joint_Mouse | |
Joint_Prismatic | |
Joint_Pulley | |
Joint_Revolute | |
Joint_Rope | |
Joint_Weld | |
Joint_Wheel | |
Joint_None |
clan::Body::Body | ( | ) |
Constructs a null instance.
clan::Body::Body | ( | PhysicsContext & | pc, |
const BodyDescription & | description | ||
) |
clan::Body::Body | ( | PhysicsContext & | pc, |
const std::string & | resource_id, | ||
const XMLResourceDocument & | resources | ||
) |
clan::BodyDescription::BodyDescription | ( | ) |
Constructs a null instance.
clan::BodyDescription::BodyDescription | ( | const PhysicsWorld & | pw | ) |
Constructs a BodyDescription.
pw | = Physics World |
clan::BodyDescription::BodyDescription | ( | const PhysicsContext & | pc | ) |
Constructs a BodyDescription.
pc | = Physics Context |
clan::BodyDescription::BodyDescription | ( | const PhysicsContext & | pc, |
const std::string & | resource_id, | ||
const XMLResourceDocument & | resources | ||
) |
Constructs a BodyDescription.
pc | = Physics Context |
resource_id | = String Ref |
resources | = Resource Manager |
clan::BodyDescription::BodyDescription | ( | const BodyDescription & | copy | ) |
Constructs a BodyDescription.
copy | = Body Description |
clan::DistanceJoint::DistanceJoint | ( | ) |
Constructs a null instance.
clan::DistanceJoint::DistanceJoint | ( | PhysicsContext & | pc, |
const DistanceJointDescription & | description | ||
) |
Constructs a DistanceJoint object.
description | = a DistanceJoint Description object. |
clan::DistanceJointDescription::DistanceJointDescription | ( | ) |
Constructs a null instance.
clan::DistanceJointDescription::DistanceJointDescription | ( | const PhysicsWorld & | pw | ) |
Constructs a DistanceJointDescription object.
pw | = Physics World. |
clan::Fixture::Fixture | ( | ) |
Constructs a null instance.
clan::Fixture::Fixture | ( | PhysicsContext & | pc, |
Body & | body, | ||
const FixtureDescription & | description | ||
) |
clan::FixtureDescription::FixtureDescription | ( | ) |
Constructs a null instance.
clan::FixtureDescription::FixtureDescription | ( | const PhysicsWorld & | pw | ) |
Constructs a Fixture Description.
pw | = Physics World |
clan::FixtureDescription::FixtureDescription | ( | const PhysicsContext & | pc | ) |
Constructs a Fixture Description.
pc | = Physics Context |
clan::FixtureDescription::FixtureDescription | ( | const FixtureDescription & | copy | ) |
Copy operator.
clan::Joint::Joint | ( | ) |
Constructs a null instance.
clan::MouseJoint::MouseJoint | ( | ) |
Constructs a null instance.
clan::MouseJoint::MouseJoint | ( | PhysicsContext & | pc, |
const MouseJointDescription & | description | ||
) |
Constructs a MouseJoint object.
description | = a MouseJoint Description object. |
clan::MouseJointDescription::MouseJointDescription | ( | ) |
Constructs a null instance.
clan::MouseJointDescription::MouseJointDescription | ( | const PhysicsWorld & | pw | ) |
Constructs a MouseJointDescription object.
pw | = Physics World. |
clan::PrismaticJoint::PrismaticJoint | ( | ) |
Constructs a null instance.
clan::PrismaticJoint::PrismaticJoint | ( | PhysicsContext & | pc, |
const PrismaticJointDescription & | description | ||
) |
Constructs a PrismaticJoint object.
description | = a PrismaticJoint Description object. |
clan::PrismaticJointDescription::PrismaticJointDescription | ( | ) |
Constructs a null instance.
clan::PrismaticJointDescription::PrismaticJointDescription | ( | const PhysicsWorld & | pw | ) |
Constructs a PrismaticJointDescription object.
pw | = Physics World. |
clan::RevoluteJoint::RevoluteJoint | ( | ) |
Constructs a null instance.
clan::RevoluteJoint::RevoluteJoint | ( | PhysicsContext & | pc, |
const RevoluteJointDescription & | description | ||
) |
Constructs a RevoluteJoint object.
description | = a RevoluteJoint Description object. |
clan::RevoluteJointDescription::RevoluteJointDescription | ( | ) |
Constructs a null instance.
clan::RevoluteJointDescription::RevoluteJointDescription | ( | const PhysicsWorld & | pw | ) |
Constructs a RevoluteJointDescription object.
pw | = Physics World. |
clan::Body::~Body | ( | ) |
|
virtual |
|
virtual |
|
virtual |
clan::Fixture::~Fixture | ( | ) |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
void clan::BodyDescription::allow_sleep | ( | const bool | value = true | ) |
void clan::Body::apply_angular_impulse | ( | const float | impulse | ) |
Apply an angular impulse.
impulse | = the angular impulse in units of kg*m*m/s |
Apply a force at a world point.
If the force is not applied at the center of mass, it will generate a torque and affect the angular velocity. This wakes up the body.
force | = the world force vector, usually in Newtons (N). |
point | = the world position of the point of application. |
void clan::Body::apply_force_to_center | ( | const Vec2f & | force | ) |
Apply a force to the center of mass.
This wakes up the body.
Apply an impulse at a point.
This immediately modifies the velocity. It also modifies the angular velocity if the point of application is not at the center of mass. This wakes up the body.
void clan::Body::apply_torque | ( | const float | torque | ) |
Apply a force to the center of mass.
This wakes up the body.
force | = the world force vector, usually in Newtons (N). |
void clan::PrismaticJointDescription::enable_limit | ( | const bool | value = true | ) |
Enable/disable the joint limit.
|
virtual |
Return the anchor point on first body in world coordinates.
|
virtual |
Return the second body attached to this joint.
Angle clan::Body::get_angle | ( | ) | const |
Get the angle of the body.
float clan::Body::get_angular_damping | ( | ) | const |
the angular damping of the body.
Angle clan::Body::get_angular_velocity | ( | ) | const |
Return the angular velocity of the body.
|
virtual |
Return the first body attached to this joint.
|
virtual |
Return the second body attached to this joint.
PhysicsObject* clan::Body::get_data | ( | ) |
Returns the physics object data.
float clan::Body::get_gravity_scale | ( | ) |
Get the gravity scale of the body.
|
virtual |
Return the world's id of the joint.
int clan::Body::get_id | ( | ) | const |
Return the world's id of the body.
JointType clan::Joint::get_Joint_type | ( | ) | const |
float clan::Body::get_linear_damping | ( | ) | const |
Get the linear damping of the body.
Vec2f clan::Body::get_linear_velocity | ( | ) | const |
Return the linear velocity of the body.
Angle clan::RevoluteJointDescription::get_lower_angle | ( | ) | const |
float clan::RevoluteJointDescription::get_motor_speed | ( | ) | const |
Vec2f clan::Body::get_position | ( | ) | const |
Get the position of the body.
|
virtual |
Get the reaction force on bodyB at the joint anchor in Newtons.
|
virtual |
Get the reaction torque on bodyB in N*m.
Angle clan::RevoluteJointDescription::get_reference_angle | ( | ) | const |
BodyType clan::Body::get_type | ( | ) | const |
Get the type of this body.
Angle clan::RevoluteJointDescription::get_upper_angle | ( | ) | const |
bool clan::MouseJoint::grab | ( | const Vec2f & | target | ) | const |
bool clan::MouseJoint::grab | ( | const Pointf & | target | ) | const |
bool clan::MouseJoint::grab | ( | const float | x, |
const float | y | ||
) | const |
bool clan::MouseJoint::grab | ( | const int | x, |
const int | y | ||
) | const |
bool clan::Body::has_fixed_rotation | ( | ) | const |
Returns true if the body has fixed rotation.
bool clan::MouseJointDescription::is_active | ( | ) | const |
Short-cut function to determine if either body is inactive.
|
virtual |
Short-cut function to determine if either body is inactive.
Reimplemented from clan::Joint.
bool clan::PrismaticJointDescription::is_active | ( | ) | const |
Short-cut function to determine if either body is inactive.
|
virtual |
Short-cut function to determine if either body is inactive.
Reimplemented from clan::Joint.
|
virtual |
Short-cut function to determine if either body is inactive.
Reimplemented from clan::Joint.
bool clan::RevoluteJointDescription::is_active | ( | ) | const |
Short-cut function to determine if either body is inactive.
bool clan::DistanceJointDescription::is_active | ( | ) | const |
Short-cut function to determine if either body is inactive.
|
virtual |
Short-cut function to determine if either body is inactive.
Reimplemented from clan::Joint.
|
virtual |
Short-cut function to determine if either body is inactive.
Reimplemented in clan::MouseJoint, clan::DistanceJoint, clan::PrismaticJoint, and clan::RevoluteJoint.
bool clan::Body::is_active | ( | ) | const |
Returns true if this body is active in the simulation.
bool clan::Body::is_awake | ( | ) | const |
Returns true if this body is not sleeping.
bool clan::Body::is_bullet | ( | ) | const |
Returns true if this body is a bullet.
bool clan::Joint::is_dummy | ( | ) | const |
Returns true if this joint is a dummy joint.
bool clan::Body::is_dummy | ( | ) | const |
Returns true if this body is a dummy body.
bool clan::RevoluteJointDescription::is_motor | ( | ) | const |
|
inline |
Returns true if this object is invalid.
|
inlinevirtual |
Returns true if this object is invalid.
Reimplemented from clan::Joint.
|
inlinevirtual |
Returns true if this object is invalid.
Reimplemented from clan::Joint.
|
inline |
Returns true if this object is invalid.
|
inline |
Returns true if this object is invalid.
|
inlinevirtual |
Returns true if this object is invalid.
Reimplemented from clan::Joint.
|
inline |
Returns true if this object is invalid.
|
inline |
Returns true if this object is invalid.
|
inlinevirtual |
Returns true if this object is invalid.
Reimplemented from clan::Joint.
|
inline |
Returns true if this object is invalid.
|
inlinevirtual |
Returns true if this object is invalid.
Reimplemented in clan::MouseJoint, clan::DistanceJoint, clan::PrismaticJoint, and clan::RevoluteJoint.
|
inline |
Returns true if this object is invalid.
void clan::Body::kill | ( | ) |
Remove the body from the simulation. The body gets swapped with a dummy body.
DistanceJoint& clan::DistanceJoint::operator= | ( | const DistanceJoint & | copy | ) |
RevoluteJoint& clan::RevoluteJoint::operator= | ( | const RevoluteJoint & | copy | ) |
PrismaticJoint& clan::PrismaticJoint::operator= | ( | const PrismaticJoint & | copy | ) |
MouseJoint& clan::MouseJoint::operator= | ( | const MouseJoint & | copy | ) |
MouseJointDescription& clan::MouseJointDescription::operator= | ( | const MouseJointDescription & | copy | ) |
Copy assignment operator.
PrismaticJointDescription& clan::PrismaticJointDescription::operator= | ( | const PrismaticJointDescription & | copy | ) |
Copy assignment operator.
DistanceJointDescription& clan::DistanceJointDescription::operator= | ( | const DistanceJointDescription & | copy | ) |
Copy assignment operator.
FixtureDescription& clan::FixtureDescription::operator= | ( | const FixtureDescription & | copy | ) |
RevoluteJointDescription& clan::RevoluteJointDescription::operator= | ( | const RevoluteJointDescription & | copy | ) |
Copy assignment operator.
BodyDescription& clan::BodyDescription::operator= | ( | const BodyDescription & | copy | ) |
Copy assignment operator.
Joint& clan::Joint::operator= | ( | const Joint & | copy | ) |
Body& clan::Body::operator= | ( | const Body & | copy | ) |
Copy operator.
void clan::MouseJoint::release | ( | ) |
void clan::Body::reset_mass_data | ( | ) |
This resets the mass properties to the sum of the mass properties of the fixtures.
Normally it does not need to be called unless you called set_mass_data to override the mass and you later want to reset the mass.
void clan::BodyDescription::set_active | ( | const bool | value = true | ) |
Does the body start out active?
void clan::Body::set_active | ( | const bool | value = true | ) |
Set this body to be active in the simulation.
void clan::BodyDescription::set_angle | ( | const Angle & | angle | ) |
Set the Physics World angle of the body.
void clan::Body::set_angle | ( | const Angle & | angle | ) |
set the angle of the body
Set limits for the angle of the joint.
void clan::BodyDescription::set_angular_damping | ( | const float | damping | ) |
void clan::Body::set_angular_damping | ( | const float | damping | ) |
Set the angular damping of the body.
void clan::BodyDescription::set_angular_velocity | ( | const Angle & | velocity | ) |
Set the angular velocity of the body.
void clan::Body::set_angular_velocity | ( | const Angle & | velocity | ) |
set the angular velocity of the body.
void clan::BodyDescription::set_as_bullet | ( | const bool | value = true | ) |
Set the body to act like a bullet. Gives more accuracy for fast moving bodies.
void clan::Body::set_as_bullet | ( | const bool | value = true | ) |
Set this body to be treated like a bullet for continuous collision detection.
void clan::RevoluteJointDescription::set_as_motor | ( | const bool | value = true | ) |
Enables the joint motor.
void clan::PrismaticJointDescription::set_as_motor | ( | const bool | value = true | ) |
Enable/disable the joint motor.
void clan::FixtureDescription::set_as_sensor | ( | const bool | value = true | ) |
void clan::BodyDescription::set_awake | ( | const bool | value = true | ) |
Should body initially be awake or sleep?
void clan::Body::set_awake | ( | const bool | value = true | ) |
Set this body to sleep.
void clan::PrismaticJointDescription::set_axis_a | ( | const Vec2f & | axis | ) |
Sets the local translation unit axis in bodyA.
axis | = vector representing the translation unit axis. |
Sets two bodies to be connected by the joint.
bodyA | = First body to be connected. |
bodyB | = Second body to be connected. |
void clan::PrismaticJointDescription::set_bodies | ( | const Body & | bodyA, |
const Body & | bodyB, | ||
const Vec2f & | anchorA, | ||
const Vec2f & | anchorB | ||
) |
Sets two bodies to be connected by the joint.
bodyA | = First body to be connected. |
bodyB | = Second body to be connected. |
anchorA | = The local anchor point relative to bodyA's origin. |
anchorB | = The local anchor point relative to bodyB's origin. |
void clan::DistanceJointDescription::set_bodies | ( | const Body & | bodyA, |
const Body & | bodyB, | ||
const Vec2f & | anchorA, | ||
const Vec2f & | anchorB | ||
) |
Sets two bodies to be connected by the joint.
bodyA | = First body to be connected. |
bodyB | = Second body to be connected. |
anchorA | = The local anchor point relative to bodyA's origin. |
anchorB | = The local anchor point relative to bodyB's origin. |
void clan::RevoluteJointDescription::set_bodies | ( | const Body & | bodyA, |
const Body & | bodyB, | ||
const Vec2f & | anchor | ||
) |
Sets two bodies to be connected by the joint.
bodyA | = First body to be connected. |
bodyB | = Second body to be connected. |
anchor | = The anchor point relative to world. |
void clan::MouseJointDescription::set_body_a | ( | const Body & | body | ) |
Sets first body to be connected by the joint.
body | = body to be connected. |
Sets first body to be connected by the joint.
body | = body to be connected. |
anchor | = The local anchor point relative to body's origin. |
Sets first body to be connected by the joint.
body | = body to be connected. |
anchor | = The local anchor point relative to body's origin. |
Sets first body to be connected by the joint.
body | = body to be connected. |
anchor | = The local anchor point relative to body's origin. |
void clan::MouseJointDescription::set_body_b | ( | const Body & | body | ) |
Sets second body to be connected by the joint.
body | = body to be connected. |
Sets second body to be connected by the joint.
body | = body to be connected. |
anchor | = The local anchor point relative to body's origin. |
Sets second body to be connected by the joint.
body | = body to be connected. |
anchor | = The local anchor point relative to body's origin. |
Sets second body to be connected by the joint.
body | = body to be connected. |
anchor | = The local anchor point relative to body's origin. |
void clan::MouseJointDescription::set_damping_ratio | ( | const float | damping | ) |
Sets the damping ratio. 0 = no damping, 1 = critical damping.
void clan::DistanceJointDescription::set_damping_ratio | ( | const float | damping | ) |
Sets the damping ratio. 0 = no damping, 1 = critical damping.
void clan::Body::set_data | ( | PhysicsObject * | data | ) |
Set the physics object object that is going to process collision events.
void clan::FixtureDescription::set_density | ( | const float | density | ) |
The density, usually in kg/m^2.
void clan::FixtureDescription::set_filter | ( | ) |
Contact filtering data.
void clan::BodyDescription::set_fixed_rotation | ( | const bool | value | ) |
Should this body be prevented from rotating? Useful for characters.
void clan::Body::set_fixed_rotation | ( | const bool | value = true | ) |
Set this body to use fixed rotation. This causes the mass to be reset.
void clan::MouseJointDescription::set_frequency | ( | const float | frequency | ) |
Sets the response speed in Hz.
void clan::FixtureDescription::set_friction | ( | const float | friction | ) |
The friction coefficient, usually in the range [0,1].
void clan::BodyDescription::set_gravity_scale | ( | const float | scale | ) |
Scale the gravity applied to this body.
void clan::Body::set_gravity_scale | ( | const float | scale | ) |
Set the gravity scale of the body.
void clan::DistanceJointDescription::set_length | ( | const float | length | ) |
Sets the natural length between the anchor points.
void clan::BodyDescription::set_linear_damping | ( | const float | damping | ) |
void clan::Body::set_linear_damping | ( | const float | damping | ) |
Set the linear damping of the body.
void clan::BodyDescription::set_linear_velocity | ( | const Vec2f & | velocity | ) |
Set the linear velocity of the body's origin in Physics World co-ordinates.
void clan::Body::set_linear_velocity | ( | const Vec2f & | velocity | ) |
set the linear velocity of the body.
void clan::RevoluteJointDescription::set_lower_angle | ( | const Angle | angle | ) |
The lower angle for the joint limit.
void clan::MouseJointDescription::set_max_force | ( | const float | value | ) |
Sets the maximum force the mouse joint is allowed to have.
void clan::PrismaticJointDescription::set_max_motor_force | ( | const float | value | ) |
Sets The maximum motor torque, usually in N-m.
void clan::RevoluteJointDescription::set_max_motor_torque | ( | const float | value | ) |
Set the maximum motor torque used to achieve the desired motor speed. Usually in N-m.
void clan::RevoluteJointDescription::set_motor_speed | ( | const Angle | speed | ) |
Apply the desired motor speed.
void clan::PrismaticJointDescription::set_motor_speed | ( | const Angle & | angle | ) |
Sets the desired motor speed.
void clan::BodyDescription::set_position | ( | const Vec2f & | position | ) |
void clan::BodyDescription::set_position | ( | const Pointf & | position | ) |
void clan::BodyDescription::set_position | ( | const int | x, |
const int | y | ||
) |
void clan::BodyDescription::set_position | ( | const float | x, |
const float | y | ||
) |
void clan::Body::set_position | ( | const Vec2f & | pos | ) |
add a fixture to the body.
set the position of the body.
void clan::PrismaticJointDescription::set_reference_angle | ( | const Angle & | angle | ) |
Sets The constrained angle between the bodies: bodyB_angle - bodyA_angle.
angle | = angle between the bodies. |
void clan::RevoluteJointDescription::set_reference_angle | ( | const Angle | angle | ) |
The bodyB angle minus bodyA angle in the reference state.
void clan::FixtureDescription::set_restitution | ( | const float | restitution | ) |
The restitution (elasticity) usually in the range [0,1].
void clan::MouseJointDescription::set_target | ( | const Vec2f & | target | ) |
Sets the target position of the mouse.
void clan::PrismaticJointDescription::set_translation_limits | ( | const float | min, |
const float | max | ||
) |
Sets the translation limits for the prismatic joint. Usually in meters.
void clan::PrismaticJointDescription::set_translation_max | ( | const float | value | ) |
Sets The upper translation limit, usually in meters.
void clan::PrismaticJointDescription::set_translation_min | ( | const float | value | ) |
Sets The lower translation limit, usually in meters.
void clan::BodyDescription::set_type | ( | const BodyType | type | ) |
void clan::Body::set_type | ( | const BodyType | type | ) |
Set the type of this body. This may alter the mass and velocity.
void clan::RevoluteJointDescription::set_upper_angle | ( | const Angle | angle | ) |
The upper angle for the joint limit.
Signal_v1<Body>& clan::Body::sig_begin_collision | ( | ) |
Signal emitted when a collision with other body occurs.
Signal_v0& clan::Body::sig_body_deletion | ( | ) |
Signal emitted when the body is deleted.
Signal_v1<Body>& clan::Body::sig_end_collision | ( | ) |
Signal emitted when a collision with other body ends.
|
virtual |
Throw an exception if this object is invalid.
Reimplemented from clan::Joint.
void clan::FixtureDescription::throw_if_null | ( | ) | const |
Throw an exception if this object is invalid.
|
virtual |
Throw an exception if this object is invalid.
Reimplemented from clan::Joint.
void clan::MouseJointDescription::throw_if_null | ( | ) | const |
Throw an exception if this object is invalid.
void clan::RevoluteJointDescription::throw_if_null | ( | ) | const |
Throw an exception if this object is invalid.
|
virtual |
Throw an exception if this object is invalid.
Reimplemented from clan::Joint.
void clan::DistanceJointDescription::throw_if_null | ( | ) | const |
Throw an exception if this object is invalid.
void clan::PrismaticJointDescription::throw_if_null | ( | ) | const |
Throw an exception if this object is invalid.
|
virtual |
Throw an exception if this object is invalid.
Reimplemented from clan::Joint.
void clan::Body::throw_if_null | ( | ) | const |
Throw an exception if this object is invalid.
|
virtual |
Throw an exception if this object is invalid.
Reimplemented in clan::MouseJoint, clan::DistanceJoint, clan::PrismaticJoint, and clan::RevoluteJoint.
void clan::BodyDescription::throw_if_null | ( | ) | const |
Throw an exception if this object is invalid.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |