|
Aviatrix3D 2.1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.j3d.aviatrix3d.SceneGraphObject
org.j3d.aviatrix3d.Viewport
public abstract class Viewport
Abstract representation of a viewport on the drawable surface.
A viewport defines the amount of screen to cover in pixel dimensions. Viewports may be used to segregate the rendered surface into multiple separate entities. An example of this is the 4-view CAD application, where each viewport has a different viewpoint looking into a shared scene graph structure.
Viewports define their coordinate system in the window-system interface: The x,y position is the lower left corner, with height going up the screen and width heading to the right.
Viewports cannot be shared amongst multiple parent layers.
Field Summary | |
---|---|
static int |
COMPOSITE
The viewport is a composite type, having many local layers defined |
static int |
FLAT
The viewport is a 2D type, allowing only flat projections and automatically calculated view environment information. |
static int |
MULTIPASS
The viewport is a multipass type, allowing multiple rendering passes for a single layer. |
static int |
SIMPLE
The viewport is a simple type, having single scene defined |
protected int |
viewHeight
The width of the viewport in pixels |
protected int |
viewportType
The viewport type constant |
protected int |
viewWidth
The width of the viewport in pixels |
protected int |
viewX
The lower left X position of the viewpoint, in pixels |
protected int |
viewY
The lower left Y position of the viewpoint, in pixels |
Fields inherited from class org.j3d.aviatrix3d.SceneGraphObject |
---|
alive, LISTENER_SET_TIMING_ERR_PROP, updateHandler |
Constructor Summary | |
---|---|
protected |
Viewport(int type)
Create a default instance of this viewport. |
Method Summary | |
---|---|
void |
getDimensions(int[] dim)
Get the dimensions of the viewport, copied into the user-provided array. |
int |
getHeight()
Convenience method to fetch the height of the viewport. |
int |
getType()
Get the type that this layer represents |
int |
getWidth()
Convenience method to fetch the width of the viewport. |
int |
getX()
Convenience method to fetch the starting X position. |
int |
getY()
Convenience method to fetch the starting Y position. |
boolean |
isValid()
Check to see if this is a valid viewport. |
void |
setDimensions(int x,
int y,
int width,
int height)
Set the dimensions of the viewport in pixels. |
Methods inherited from class org.j3d.aviatrix3d.SceneGraphObject |
---|
checkForCyclicChild, checkForCyclicParent, dataChanged, getAppUpdateWriteTimingMessage, getBoundsWriteTimingMessage, getDataWriteTimingMessage, getUserData, isLive, setLive, setUpdateHandler, setUserData |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int SIMPLE
public static final int COMPOSITE
public static final int MULTIPASS
public static final int FLAT
protected final int viewportType
protected int viewX
protected int viewY
protected int viewWidth
protected int viewHeight
Constructor Detail |
---|
protected Viewport(int type)
type
- The type constant for this layerMethod Detail |
---|
public void setDimensions(int x, int y, int width, int height) throws InvalidWriteTimingException
x
- The lower left x coordinate for the viewy
- The lower left y coordinate for the viewwidth
- The width of the viewport in pixelsheight
- The height of the viewport in pixels
InvalidWriteTimingException
- An attempt was made to write outside
of the ApplicationUpdateObserver callback methodpublic void getDimensions(int[] dim)
dim
- The array to copy the values intopublic int getX()
public int getY()
public int getWidth()
public int getHeight()
public int getType()
public boolean isValid()
|
Aviatrix3D 2.1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |