|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.washington.NVisF.viewer.PlotEnvironment
The PlotEnvironment class provides the viewer that displays 3D objects and various utility methods to aid viewing. This includes: (1) setting up all the windows; (2) maintaining a list of 3-D object groups whose visibility can be toggled; (3) adding utility mouse behaviors for rotating, translating, and zooming from the com.sun.j3d.utils.behaviors.mouse package; (4) providing a few utility methods for rotating the view and adjusting some view parameters. This somewhat disorganized class will be significantly revamped and extended in later versions.
Field Summary | |
static int |
maxObjectGroups
|
int |
viewerSize
|
Constructor Summary | |
PlotEnvironment()
|
Method Summary | |
int |
addObjectGroup(ObjectGroup targetGroup,
boolean visible)
Adds the specified ObjectGroup to a private list of known ObjectGroups. |
void |
initUniverse()
Calls initUniverse(int viewerSize) with a default viewer size of 512x512. |
void |
initUniverse(int viewerSize)
This method sets up the viewer and should be called before accessing any of the other methods. |
boolean |
removeObjectGroup(int index)
removes the ObjectGroup specified by index from the private list. |
void |
resetRotation()
Undoes any accumulated rotations, but preserves translates and zooms. |
void |
resetUniverse()
Undoes all rotations, translates, and zooms, returning the view to its initial state. |
void |
rotX(double radians)
Rotates the universe by the given angle about the X axis (that is, rotate down). |
void |
rotY(double radians)
Rotates the universe by the given angle about the Y axis (that is, rotate right). |
void |
rotZ(double radians)
Rotates the universe by the given angle about the Z axis (that is, rotate counter-clockwise). |
boolean |
setObjectGroupVisible(int index,
boolean visible)
sets the visibility of the ObjectGroup specified by index according to the visible flag. |
void |
setScaleFactor(double factor)
Seta a scale factor for the universe. |
void |
setViewParams(float vx,
float vy,
float vz,
float frontclip,
float backclip)
Sets various viewing parameters. |
boolean |
showObjectGroup(int index)
sets the specified group to be visible. |
boolean |
turnOffObjectGroup(int index)
sets the specified group to be not visible. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int maxObjectGroups
public int viewerSize
Constructor Detail |
public PlotEnvironment()
Method Detail |
public void initUniverse()
public void initUniverse(int viewerSize)
public void setViewParams(float vx, float vy, float vz, float frontclip, float backclip)
public void setScaleFactor(double factor)
factor
- the scale factorpublic void resetUniverse()
public void resetRotation()
public void rotX(double radians)
public void rotY(double radians)
public void rotZ(double radians)
public int addObjectGroup(ObjectGroup targetGroup, boolean visible)
targetGroup
- the ObjectGroup to addvisible
- boolean flag controlling visibilityObjectGroup
public boolean showObjectGroup(int index)
index
- the unique identifier returned from addObjectGroup()public boolean turnOffObjectGroup(int index)
index
- the unique identifier returned from addObjectGroup()public boolean setObjectGroupVisible(int index, boolean visible)
index
- the unique identifier returned from addObjectGroup()public boolean removeObjectGroup(int index)
index
- the unique identifier returned from addObjectGroup()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |