public class MouseRotateY extends MouseBehavior
To use this utility, first create a transform group that this rotate behavior will operate on. Then,
The above code will add the rotate behavior to the transform group. The user can rotate any object attached to the objTrans.MouseRotateY behavior = new MouseRotateY(); behavior.setTransformGroup(objTrans); objTrans.addChild(behavior); behavior.setSchedulingBounds(bounds);
INVERT_INPUT, MANUAL_WAKEUP
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 and Description |
---|
MouseRotateY()
Creates a default mouse rotate behavior.
|
MouseRotateY(int flags)
Creates a rotate behavior.
|
MouseRotateY(TransformGroup transformGroup)
Creates a rotate behavior given the transform group.
|
Modifier and Type | Method and Description |
---|---|
double |
getYFactor() |
void |
initialize()
Initializes the behavior.
|
void |
processStimulus(java.util.Iterator<WakeupCriterion> criteria)
All mouse manipulators must implement this.
|
void |
setFactor(double factor) |
addListener, getTransformGroup, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, processMouseEvent, setEnable, setTransformGroup, wakeup
getEnable, getNumSchedulingIntervals, getSchedulingBoundingLeaf, getSchedulingBounds, getSchedulingInterval, postId, setSchedulingBoundingLeaf, setSchedulingBounds, setSchedulingInterval, updateNodeReferences
cloneNode, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, duplicateNode, getBounds, getBoundsAutoCompute, getCollidable, getLocale, getLocalToVworld, getLocalToVworld, getParent, getPickable, setBounds, setBoundsAutoCompute, setCollidable, setPickable
clearCapability, clearCapabilityIsFrequent, getCapability, getCapabilityIsFrequent, getName, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setName, setUserData, toString
public MouseRotateY(TransformGroup transformGroup)
transformGroup
- The transformGroup to operate on.public MouseRotateY()
public MouseRotateY(int flags)
flags
- interesting flags (wakeup conditions).public void initialize()
MouseBehavior
initialize
in class MouseBehavior
public double getYFactor()
public void setFactor(double factor)
public void processStimulus(java.util.Iterator<WakeupCriterion> criteria)
MouseBehavior
processStimulus
in class MouseBehavior
criteria
- an iterator of triggered wakeup criteria for this
behavior