![]()
|
An interface that represents joints between shapes. This allows users to
polymorphically refer to joints without dealing with the generic parameters
used by AbstractJoint
.
Essentially, this interface only provides capabilities to retrieve the shapes used by the joint, connect/disconnect them, and retrieve the underlying JBox2D joint objects (for advanced usage). Any more specific capabilities will require downcasting to the concrete joint type.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract
void
|
connect()
Activates the joint.
| ||||||||||
abstract
void
|
disconnect()
Deactivates the joint, releasing the connection between the two shapes.
| ||||||||||
abstract
org.jbox2d.dynamics.joints.Joint
|
getB2Joint()
Gets the underlying JBox2D joint object.
| ||||||||||
abstract
org.jbox2d.dynamics.joints.JointDef
|
getB2JointDef()
Gets the underlying JBox2D joint definition object.
| ||||||||||
abstract
Shape
|
getFirstShape()
Gets the first shape connected by this joint.
| ||||||||||
abstract
Shape
|
getSecondShape()
Gets the second shape connected by this joint.
|
Activates the joint. You must call this method after creating the joint object if you want it to have any effect.
Deactivates the joint, releasing the connection between the two shapes.
Gets the underlying JBox2D joint object. For advanced usage only.
the underlying JBox2D joint object
Gets the underlying JBox2D joint definition object. For advanced usage only.
the underlying JBox2D joint definition object
Gets the first shape connected by this joint.
the first shape connected by this joint
Gets the second shape connected by this joint.
the second shape connected by this joint