org.xith3d.utility.physics.pseudo.joints
Class HingeJoint
java.lang.Object
org.xith3d.scenegraph.SceneGraphObject
org.xith3d.scenegraph.Node
org.xith3d.scenegraph.GroupNode
org.xith3d.scenegraph.Group
org.xith3d.utility.physics.pseudo.joints.Joint
org.xith3d.utility.physics.pseudo.joints.HingeJoint
- All Implemented Interfaces:
- org.jagatoo.datatypes.NamableObject, org.jagatoo.datatypes.NamedObject, org.openmali.spatial.SpatialNode
public class HingeJoint
- extends Joint
A HingeJoint permits you to constraints some objects to
|
Constructor Summary |
HingeJoint(org.openmali.vecmath2.Vector3f rotationAxis,
org.openmali.vecmath2.Vector3f translationAxis,
float length)
Creates a new HingeJoint |
HingeJoint(org.openmali.vecmath2.Vector3f rotationAxis,
org.openmali.vecmath2.Vector3f translationAxis,
float length,
float angle)
Creates a new HingeJoint |
| Methods inherited from class org.xith3d.scenegraph.GroupNode |
absorbDetails, addChild, addChild, checkChild, dump, dump, ensureCapacity, expandBounds, findAll, findAll, findFirst, findFirst, freeOpenGLResources, getChild, getChildren, getChildren, getClipper, getPickHost, getScissorRect, getTotalNumChildren, getTotalNumShapes, indexOf, isPickHost, mergeInheritedClipper, mergeInheritedNodes, mergeInheritedScissorRect, numChildren, removeAllChildren, removeChild, removeChild, setBoundsDirty, setBoundsDirtyUpward, setChild, setClipper, setLive, setPickHost, setPickHost, setScissorRect, setShowBounds, sharedCopy, sharedCopy, traverse, unmergeInheritedFog, unmergeInheritedLight, unmergeInheritedNodes, updateBounds, updateBoundsCheap |
| Methods inherited from class org.xith3d.scenegraph.Node |
cloneNode, detach, duplicateNode, freeOpenGLResources, getBounds, getBoundsAutoCompute, getBoundsType, getBoundsTypeHint, getDefaultPickable, getIndentString, getInheritedNodeAttributes, getModListener, getOrderedChild, getOrderedState, getParent, getRoot, getShadowAttachment, getShowBounds, getTransformGroup, getTreeCell, getWorldBounds, getWorldTransform, getWorldTransform, isBillboard, isIgnoreBounds, isOccluder, isPickable, isRenderable, isUpdatableNode, popGlobalIgnoreBounds, printBounds, pushGlobalIgnoreBounds, setBounds, setBoundsAutoCompute, setBoundsTypeHint, setDefaultPickable, setGlobalIgnoreBounds, setIgnoreBounds, setIsOccluder, setModListener, setOrderedChild, setParent, setPickable, setPickableRecursive, setPickableRecursive, setRenderable, setShadowAttachment, setShowBounds, setTransformGroup, setTreeCell, updateOrderedChild, updateTransformGroup, updateWorldTransform |
| Methods inherited from class org.xith3d.scenegraph.SceneGraphObject |
getName, getUserData, getUserData, getUserDataMap, isLive, setName, setUserData, setUserData, setUserDataRecursive, setUserDataRecursive, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
HingeJoint
public HingeJoint(org.openmali.vecmath2.Vector3f rotationAxis,
org.openmali.vecmath2.Vector3f translationAxis,
float length)
- Creates a new HingeJoint
- Parameters:
rotationAxis - Axis about which the attached object will rotatetranslationAxis - Axis about which the object is tied to the jointlength - Length of the joint (where/how far should the next joint
begin?)
HingeJoint
public HingeJoint(org.openmali.vecmath2.Vector3f rotationAxis,
org.openmali.vecmath2.Vector3f translationAxis,
float length,
float angle)
- Creates a new HingeJoint
- Parameters:
rotationAxis - Axis about which the attached object will rotatetranslationAxis - Axis about which the object is tied to the jointlength - Length of the joint (where/how far should the next joint
begin?)angle - Initial angle of the HingeJoint
getStartGroup
public Group getStartGroup()
- Returns:
- the display group, to which you can add some Shapes for your
joint to be visible.
getEndGroup
public Group getEndGroup()
- Returns:
- the display group, to which you can add some Shapes for your
joint to be visible.
addChild
public void addChild(Joint j)
- Add a child joint to this one
- Specified by:
addChild in class Joint
- Parameters:
j - The new joint to be added
removeChild
public void removeChild(Joint j)
- Remove a child joint from this one
- Specified by:
removeChild in class Joint
- Parameters:
j - The joint to be removed from
getRotationAxis
public org.openmali.vecmath2.Vector3f getRotationAxis()
setRotationAxis
public void setRotationAxis(org.openmali.vecmath2.Vector3f rotationAxis)
getTranslationAxis
public org.openmali.vecmath2.Vector3f getTranslationAxis()
setTranslationAxis
public void setTranslationAxis(org.openmali.vecmath2.Vector3f translationAxis)
getAngle
public float getAngle()
setAngle
public void setAngle(float angle)
getLength
public float getLength()
setLength
public void setLength(float length)
addAngle
public void addAngle(float angle)
subAngle
public void subAngle(float angle)
addLength
public void addLength(float length)
subLength
public void subLength(float length)
traverse
public boolean traverse(DetailedTraversalCallback callback)
- Description copied from class:
Group
- Traverses the scenegraph from this node on.
If this Node is a Group it will recusively run through each child.
- Overrides:
traverse in class Group
- Parameters:
callback - the listener is notified of any traversed Node on the way
- Returns:
- if false, the whole traversal will stop
- See Also:
Node.traverse(org.xith3d.scenegraph.traversal.DetailedTraversalCallback)