org.xith3d.physics.simulation
Class Joint

java.lang.Object
  extended by 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.
 
Method Summary
 Body getBody1()
           
 Body getBody2()
           
abstract  java.lang.String getInfo()
           
abstract  java.lang.String getType()
           
abstract  SimulationWorld getWorld()
           
protected  void refresh()
          Refreshes this Joint's anchors, etc. from the implementation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 environment
body2 - The second body constrained by this Joint or null if it's the static environment
Method Detail

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.