|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.media.j3d.SceneGraphObject
javax.media.j3d.Node
javax.media.j3d.Leaf
javax.media.j3d.Behavior
visad.java3d.MouseBehaviorJ3D
public class MouseBehaviorJ3D
MouseBehaviorJ3D is the VisAD class for mouse behaviors for Java3D
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
MouseBehaviorJ3D()
Default Constructor |
|
MouseBehaviorJ3D(DisplayRendererJ3D r)
Construct a MouseBehavior for the DisplayRenderer specified |
|
MouseBehaviorJ3D(DisplayRendererJ3D r,
Class mhClass)
Construct a MouseBehavior for the DisplayRenderer specified |
|
| Method Summary | |
|---|---|
VisADRay |
cursorRay(double[] cursor)
Return the VisAD ray corresponding to the VisAD cursor coordinates. |
void |
destroy()
|
VisADRay |
findRay(int screen_x,
int screen_y)
Return the VisAD ray corresponding to the component coordinates. |
MouseHelper |
getMouseHelper()
Get the helper class used by this MouseBehavior. |
double[] |
getPlateCoords(double[] position)
Return the screen coordinates corresponding to the VisAD coordinates. |
int[] |
getScreenCoords(double[] position)
Return the screen coordinates corresponding to the VisAD coordinates. |
void |
initialize()
Initialize this behavior. |
void |
instance_unmake_matrix(double[] rot,
double[] scale,
double[] trans,
double[] matrix)
Get the rotation, scale and translation parameters for the specified matrix. |
double[] |
make_matrix(double rotx,
double roty,
double rotz,
double scale,
double transx,
double transy,
double transz)
Make a transformation matrix to perform the given rotation, scale and translation. |
double[] |
make_matrix(double rotx,
double roty,
double rotz,
double scalex,
double scaley,
double scalez,
double transx,
double transy,
double transz)
Make a transformation matrix to perform the given rotation, scale and translation. |
double[] |
make_translate(double transx,
double transy)
Create a translation matrix. |
double[] |
make_translate(double transx,
double transy,
double transz)
Create a translation matrix. |
double[] |
multiply_matrix(double[] a,
double[] b)
Multiply the two matrices together. |
void |
processStimulus(Enumeration criteria)
Process a stimulus meant for this behavior. |
static double[] |
static_make_matrix(double rotx,
double roty,
double rotz,
double scale,
double transx,
double transy,
double transz)
Make a transformation matrix to perform the given rotation, scale and translation. |
static double[] |
static_make_matrix(double rotx,
double roty,
double rotz,
double scalex,
double scaley,
double scalez,
double transx,
double transy,
double transz)
Make a transformation matrix to perform the given rotation, scale and translation. |
static double[] |
static_multiply_matrix(double[] a,
double[] b)
Multiply the two matrices together. |
static void |
unmake_matrix(double[] rot,
double[] scale,
double[] trans,
double[] matrix)
Get the rotation, scale and translation parameters for the specified matrix. |
| Methods inherited from class javax.media.j3d.Behavior |
|---|
getEnable, getNumSchedulingIntervals, getSchedulingBoundingLeaf, getSchedulingBounds, getSchedulingInterval, getView, getWakeupCondition, postId, setEnable, setSchedulingBoundingLeaf, setSchedulingBounds, setSchedulingInterval, updateNodeReferences, wakeupOn |
| Methods inherited from class javax.media.j3d.Node |
|---|
cloneNode, 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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MouseBehaviorJ3D()
public MouseBehaviorJ3D(DisplayRendererJ3D r)
r - DisplayRenderer to use
public MouseBehaviorJ3D(DisplayRendererJ3D r,
Class mhClass)
r - DisplayRenderer to usemhClass - MouseHelper subclass to use| Method Detail |
|---|
public void destroy()
public MouseHelper getMouseHelper()
MouseHelper defines the actions taken based
on MouseEvents.
getMouseHelper in interface MouseBehaviorMouseHelper being used.public void initialize()
initialize in class Behaviorpublic void processStimulus(Enumeration criteria)
processStimulus in class Behaviorcriteria - an enumeration of triggered wakeup criteria
public VisADRay findRay(int screen_x,
int screen_y)
findRay in interface MouseBehaviorscreen_x - x coordinate of the componentscreen_y - y coordinate of the component
VisADRay,
LocalDisplay.getComponent()public VisADRay cursorRay(double[] cursor)
cursorRay in interface MouseBehaviorcursor - array (x,y,z) of cursor location
VisADRay,
DisplayRenderer.getCursor()public int[] getScreenCoords(double[] position)
getScreenCoords in interface MouseBehaviorposition - array of VisAD coordinates
public double[] getPlateCoords(double[] position)
position - array of VisAD coordinates
public double[] make_translate(double transx,
double transy,
double transz)
make_translate in interface MouseBehaviortransx - x translation amounttransy - y translation amounttransz - z translation amount
multiply_matrix(double[] a, double[] b)
public double[] make_translate(double transx,
double transy)
make_translate in interface MouseBehaviortransx - x translation amounttransy - y translation amount
multiply_matrix(double[] a, double[] b)
public double[] multiply_matrix(double[] a,
double[] b)
multiply_matrix in interface MouseBehaviora - first matrixb - second matrix
static_multiply_matrix(double[], double[])
public static double[] static_multiply_matrix(double[] a,
double[] b)
a - first matrixb - second matrix
multiply_matrix(double[] a, double[] b)
public double[] make_matrix(double rotx,
double roty,
double rotz,
double scale,
double transx,
double transy,
double transz)
make_matrix in interface MouseBehaviorrotx - x rotationroty - y rotationrotz - z rotationscale - scaling factortransx - x translationtransy - y translationtransz - z translation
public double[] make_matrix(double rotx,
double roty,
double rotz,
double scalex,
double scaley,
double scalez,
double transx,
double transy,
double transz)
make_matrix in interface MouseBehaviorrotx - x rotationroty - y rotationrotz - z rotationscalex - x scaling factorscaley - y scaling factorscalez - z scaling factortransx - x translationtransy - y translationtransz - z translation
public static double[] static_make_matrix(double rotx,
double roty,
double rotz,
double scale,
double transx,
double transy,
double transz)
rotx - x rotationroty - y rotationrotz - z rotationscale - scaling factortransx - x translationtransy - y translationtransz - z translation
make_matrix(double rotx, double roty, double rotz,
double scale, double transx, double transy, double transz)
public static double[] static_make_matrix(double rotx,
double roty,
double rotz,
double scalex,
double scaley,
double scalez,
double transx,
double transy,
double transz)
rotx - x rotationroty - y rotationrotz - z rotationscalex - x scaling factorscaley - y scaling factorscalez - z scaling factortransx - x translationtransy - y translationtransz - z translation
make_matrix(double rotx, double roty, double rotz,
double scale, double transx, double transy, double transz)
public void instance_unmake_matrix(double[] rot,
double[] scale,
double[] trans,
double[] matrix)
instance_unmake_matrix in interface MouseBehaviorrot - array to hold x,y,z rotation valuesscale - array to hold scale valuetrans - array to hold x,y,z translation values
public static void unmake_matrix(double[] rot,
double[] scale,
double[] trans,
double[] matrix)
instance_unmake_matrix.
rot - array to hold x,y,z rotation valuesscale - array to hold scale value(s). If length == 1, assumes
uniform scaling.trans - array to hold x,y,z translation values
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||