PhysicsDistanceJoint Class Reference

Represent a simple joint that maintains a constant distance between two objects. More...

#include <Physics/PhysicsJoint.h>

Inherits PhysicsJoint.

List of all members.

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.

Detailed Description

Represent a simple joint that maintains a constant distance between two objects.


Member Function Documentation

b2Joint * PhysicsDistanceJoint::CreateBox2DJoint (  )  [protected, virtual]

Creates the actual Box2D physics joint.

Parameters:
[in] world the physics world to create the joint in.
Returns:
a pointer to the created joint or NULL if the joint could not be created.

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.

Parameters:
[in] p the anchor point.
void PhysicsDistanceJoint::SetAnchorPoint2 ( const Point2f p  ) 

Sets the position (local to the second object) to anchor the joint.

Parameters:
[in] p the anchor point.
void PhysicsDistanceJoint::SetLength ( float  len  ) 

Sets the length for the joint to maintain between the two objects.

Parameters:
[in] len the length.

The documentation for this class was generated from the following files:
Generated on Mon Apr 5 19:08:06 2010 for BrickOut |ReDuX| by  doxygen 1.6.3