Represent a simple joint that maintains a constant distance between two objects. More...
#include <Physics/PhysicsJoint.h>
Inherits PhysicsJoint.
Public Member Functions | |
| PhysicsDistanceJoint () | |
| Constructor. | |
| virtual | ~PhysicsDistanceJoint () |
| Deconstructor. | |
| void | SetAnchorPoint1 (const Point2f &p) |
| Sets the position (local to the first object) to anchor the joint. | |
| void | SetAnchorPoint2 (const Point2f &p) |
| Sets the position (local to the second object) to anchor the joint. | |
| void | SetLength (float len) |
| Sets the length for the joint to maintain between the two objects. | |
Protected Member Functions | |
| virtual b2Joint * | CreateBox2DJoint () |
| Creates the actual Box2D physics joint. | |
Represent a simple joint that maintains a constant distance between two objects.
| b2Joint * PhysicsDistanceJoint::CreateBox2DJoint | ( | ) | [protected, virtual] |
Creates the actual Box2D physics joint.
| [in] | world | the physics world to create the joint in. |
NOTE: This function should be implemented by each joint class.
Implements PhysicsJoint.
| void PhysicsDistanceJoint::SetAnchorPoint1 | ( | const Point2f & | p | ) |
Sets the position (local to the first object) to anchor the joint.
| [in] | p | the anchor point. |
| void PhysicsDistanceJoint::SetAnchorPoint2 | ( | const Point2f & | p | ) |
Sets the position (local to the second object) to anchor the joint.
| [in] | p | the anchor point. |
| void PhysicsDistanceJoint::SetLength | ( | float | len | ) |
Sets the length for the joint to maintain between the two objects.
| [in] | len | the length. |
1.6.3