|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.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 usepublic MouseBehaviorJ3D(DisplayRendererJ3D r, Class mhClass)
r
- DisplayRenderer to usemhClass
- MouseHelper subclass to useMethod Detail |
---|
public void destroy()
public MouseHelper getMouseHelper()
MouseHelper
defines the actions taken based
on MouseEvent
s.
getMouseHelper
in interface MouseBehavior
MouseHelper
being used.public void initialize()
initialize
in class Behavior
public void processStimulus(Enumeration criteria)
processStimulus
in class Behavior
criteria
- an enumeration of triggered wakeup criteriapublic VisADRay findRay(int screen_x, int screen_y)
findRay
in interface MouseBehavior
screen_x
- x coordinate of the componentscreen_y
- y coordinate of the component
VisADRay
,
LocalDisplay.getComponent()
public VisADRay cursorRay(double[] cursor)
cursorRay
in interface MouseBehavior
cursor
- array (x,y,z) of cursor location
VisADRay
,
DisplayRenderer.getCursor()
public int[] getScreenCoords(double[] position)
getScreenCoords
in interface MouseBehavior
position
- 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 MouseBehavior
transx
- 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 MouseBehavior
transx
- x translation amounttransy
- y translation amount
multiply_matrix(double[] a, double[] b)
public double[] multiply_matrix(double[] a, double[] b)
multiply_matrix
in interface MouseBehavior
a
- 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 MouseBehavior
rotx
- 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 MouseBehavior
rotx
- 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 MouseBehavior
rot
- array to hold x,y,z rotation valuesscale
- array to hold scale valuetrans
- array to hold x,y,z translation valuespublic 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 |