org.xith3d.physics.simulation
Class Joint
java.lang.Object
org.xith3d.physics.simulation.Joint
- Direct Known Subclasses:
- BallJoint, FixedJoint, Hinge2Joint, HingeJoint, SliderJoint
public abstract class Joint
- extends java.lang.Object
A Joint is a constraint which is applied between Bodies.
|
Constructor Summary |
Joint(Body body1,
Body body2)
Creates a new Joint. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Joint
public Joint(Body body1,
Body body2)
- Creates a new Joint.
- Parameters:
body1 - The first body constrained by this Joint or null if it's the static environmentbody2 - The second body constrained by this Joint or null if it's the static environment
getType
public abstract java.lang.String getType()
- Returns:
- the name of the Joint, that is, the one which is used to refer to
it in CollisionEngine. All camel-case, please ! (e.g. : "Sphere")
getInfo
public abstract java.lang.String getInfo()
- Returns:
- a small description of how is this joint, its exact
shape, a brief human-readable description of what can be adjusted
getWorld
public abstract SimulationWorld getWorld()
- Returns:
- the
SimulationWorld, this Joint belongs to.
getBody1
public final Body getBody1()
- Returns:
- the body1
getBody2
public final Body getBody2()
- Returns:
- the body2
refresh
protected void refresh()
- Refreshes this
Joint's anchors, etc. from the implementation.