#include <Cable.h>
Public Member Functions | |
| virtual | ~Cable (void) |
| Cable (RigidBody *body, const ml7::Vector2 &local_point, const ml7::Vector2 &world_point, const float length, const float restitution) | |
| Cable (RigidBody *body1, RigidBody *body2, const ml7::Vector2 &local_point1, const ml7::Vector2 &local_point2, const float length, const float restitution) | |
| float | get_length () const |
| float | get_restitution () const |
| void | set_length (const float length) |
| void | set_restitution (const float restitution) |
Public Attributes | |
| float | _max_length |
| float | _restitution |
A contact generator that generates a contact if the cable connecting two rigid bodies (or one rigid body with the world) is overextended.
| virtual bl7::rigidbodies2::Cable::~Cable | ( | void | ) | [inline, virtual] |
Destructor.
| bl7::rigidbodies2::Cable::Cable | ( | RigidBody * | body, | |
| const ml7::Vector2 & | local_point, | |||
| const ml7::Vector2 & | world_point, | |||
| const float | length, | |||
| const float | restitution | |||
| ) | [inline] |
Explicit constructor with parameters for the rigid body linked to the world, the local connection point as well as the world connection point and the length and the restitution ("bounciness" of the cable).
| bl7::rigidbodies2::Cable::Cable | ( | RigidBody * | body1, | |
| RigidBody * | body2, | |||
| const ml7::Vector2 & | local_point1, | |||
| const ml7::Vector2 & | local_point2, | |||
| const float | length, | |||
| const float | restitution | |||
| ) | [inline] |
Explicit constructor with parameters for the rigid bodies linked together, the local connection points as well as the length and the restitution ("bounciness" of the cable).
| float bl7::rigidbodies2::Cable::get_length | ( | ) | const [inline] |
Returns the maximum length of the cable.
| float bl7::rigidbodies2::Cable::get_restitution | ( | ) | const [inline] |
Returns the restitution (bounciness) of the cable.
| void bl7::rigidbodies2::Cable::set_length | ( | const float | length | ) | [inline] |
Sets the maximum length of the cable.
| void bl7::rigidbodies2::Cable::set_restitution | ( | const float | restitution | ) | [inline] |
Sets the restitution (bounciness) of the cable.
The maximum length of the cable.
The restitution (bounciness) of the cable.
1.7.1