net.java.dev.joode.joint
Class JointHinge
java.lang.Object
net.java.dev.joode.WorldObject
net.java.dev.joode.joint.Joint
net.java.dev.joode.joint.JointHinge
- All Implemented Interfaces:
- java.io.Serializable, SimState
public class JointHinge
- extends Joint
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
anchor1
public final Vector3 anchor1
- anchor measured relative to body 1
anchor2
public final Vector3 anchor2
- anchor measured relative to body 2 or absolute world coords if body 2 is null
axis1
public final Vector3 axis1
axis2
public final Vector3 axis2
limot
public JointLimitMotor limot
JointHinge
public JointHinge(World world)
getInfo1
public void getInfo1(Joint.Info1 info)
- Specified by:
getInfo1 in class Joint
getInfo2
public void getInfo2(Joint.Info2 info)
- Specified by:
getInfo2 in class Joint
setAnchor
public final void setAnchor(float x,
float y,
float z)
setAxis
public final void setAxis(float x,
float y,
float z)
getHingeAngle
public float getHingeAngle()
- Gets the hinge angle. The angle is measured between the two
bodies, or between the body and the static environment. Zero
corresponds to the angle at the time
setAnchor(float, float, float)
or setAxis(float, float, float) was last called.
- Returns:
- the hinge angle, in radians
getHingeAngle
public static float getHingeAngle(Body body1,
Body body2,
Vector3 axis,
Quaternion q_initial)
getHingeAngleFromRelativeQuat
public static float getHingeAngleFromRelativeQuat(Quaternion qrel,
Vector3 axis)
cloneState
public JointHinge cloneState(ClonedReferences util)
- Description copied from interface:
SimState
deep clones the state object, any references to other SimState objects
should be cloned and assigned to the clone via the ClonedReferences util object.
The util object ensures that multiple clones of the same object are not
performed during a clone operation.
- Parameters:
util - instanciate a new one if top level cloning