org.psychomad.psycholib.j3d.axis
Class Axis
java.lang.Object
javax.media.j3d.SceneGraphObject
javax.media.j3d.Node
javax.media.j3d.Group
javax.media.j3d.BranchGroup
org.psychomad.psycholib.j3d.axis.Axis
public class Axis
- extends javax.media.j3d.BranchGroup
This class allow to create easily a standard 3D axis (oX,oY,oZ).
This Java3D object is mainly used for debug purpose: in order to get
information about space orientation in a rendering scene.
Example:
In order to use it, just instanciate it and put it in your scene as follow:
// Create a standard axis
Axis axis = new Axis();
// Create a main branch group (to be inserted in your scene...)
BranchGroup objRoot = new BranchGroup();
// Create a Transform group so that the axis can move with it (as
// other objects in the scene)
TransformGroup objTrans = new TransformGroup();
objTrans.setCapability(TransformGroup.ALLOW_TRANSFORM_READ);
objTrans.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
objRoot.addChild(objTrans);
// Add axis to the scene
objTrans.addChild(axis);
Snapshot:
An example of axis (make sure to get a little back in order to view completly the axis):
Nested Class Summary |
static class |
Axis.LINE_TYPES
The different type of line that can be use to drawn the axis. |
Fields inherited from class javax.media.j3d.BranchGroup |
ALLOW_DETACH |
Fields inherited from class javax.media.j3d.Group |
ALLOW_CHILDREN_EXTEND, ALLOW_CHILDREN_READ, ALLOW_CHILDREN_WRITE, ALLOW_COLLISION_BOUNDS_READ, ALLOW_COLLISION_BOUNDS_WRITE |
Fields inherited from class javax.media.j3d.Node |
ALLOW_AUTO_COMPUTE_BOUNDS_READ, ALLOW_AUTO_COMPUTE_BOUNDS_WRITE, ALLOW_BOUNDS_READ, ALLOW_BOUNDS_WRITE, ALLOW_COLLIDABLE_READ, ALLOW_COLLIDABLE_WRITE, ALLOW_LOCAL_TO_VWORLD_READ, ALLOW_LOCALE_READ, ALLOW_PARENT_READ, ALLOW_PICKABLE_READ, ALLOW_PICKABLE_WRITE, ENABLE_COLLISION_REPORTING, ENABLE_PICK_REPORTING |
Constructor Summary |
Axis()
Create the 3 axis (oX,oY,oZ) with a length of 6, named axes and plain draw
lines. |
Axis(float length)
Create the 3 axis (oX,oY,oZ) with a specified length, named axes and plain
draw lines. |
Axis(float length,
boolean showLabels,
Axis.LINE_TYPES lineType)
Create the 3 axis (oX,oY,oZ) with specified length. |
Methods inherited from class javax.media.j3d.BranchGroup |
cloneNode, compile, detach, pickAll, pickAll, pickAllSorted, pickAllSorted, pickAny, pickAny, pickClosest, pickClosest |
Methods inherited from class javax.media.j3d.Group |
addChild, getAllChildren, getAlternateCollisionTarget, getChild, getCollisionBounds, indexOfChild, insertChild, moveTo, numChildren, removeAllChildren, removeChild, removeChild, setAlternateCollisionTarget, setChild, setCollisionBounds |
Methods inherited from class javax.media.j3d.Node |
cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, duplicateNode, getBounds, getBoundsAutoCompute, getCollidable, getLocale, getLocalToVworld, getLocalToVworld, getParent, getPickable, setBounds, setBoundsAutoCompute, setCollidable, setPickable |
Methods inherited from class javax.media.j3d.SceneGraphObject |
clearCapability, clearCapabilityIsFrequent, duplicateSceneGraphObject, getCapability, getCapabilityIsFrequent, getName, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setName, setUserData, toString, updateNodeReferences |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Axis
public Axis()
- Create the 3 axis (oX,oY,oZ) with a length of 6, named axes and plain draw
lines.
Axis
public Axis(float length)
- Create the 3 axis (oX,oY,oZ) with a specified length, named axes and plain
draw lines.
- Parameters:
length
- the new length to use for axis
Axis
public Axis(float length,
boolean showLabels,
Axis.LINE_TYPES lineType)
- Create the 3 axis (oX,oY,oZ) with specified length.
- Parameters:
length
- the new length to use for axisshowLabels
- true for displaying the labels, false otherwiselineType
- a line type from #
Copyright 2006 null. All Rights Reserved.