|
Aviatrix3D 2.1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.j3d.aviatrix3d.SceneGraphObject org.j3d.aviatrix3d.Layer org.j3d.aviatrix3d.CompositeLayer2D
public class CompositeLayer2D
A layer that allows the definition of multiple viewports to be rendered, but is restricted to 2D rendering only.
This layer allows for the provision of multiple viewports within it. Each viewport is independently managed. Not provision is made for checking if viewports overlap or do other visually unappealing things. A typical use of this layer would be to provide multiple views onto a single shared scene graph, reminiscent of 3D editor applications like AutoCAD, Maya et al.
Internationalisation Resource Names
Field Summary |
---|
Fields inherited from class org.j3d.aviatrix3d.Layer |
---|
COMPOSITE, COMPOSITE_2D, layerType, SIMPLE, SIMPLE_2D |
Fields inherited from class org.j3d.aviatrix3d.SceneGraphObject |
---|
alive, LISTENER_SET_TIMING_ERR_PROP, updateHandler |
Constructor Summary | |
---|---|
CompositeLayer2D()
Construct a new layer instance. |
Method Summary | |
---|---|
void |
addViewport(Viewport2D vp)
Add a new viewport to be used by this layer. |
void |
clearViewports()
Remove all the viewports from this layer. |
ViewportCullable |
getCullableViewport(int viewportIndex)
Get the cullable layer child that for the given layer index. |
Viewport2D |
getViewport(int num)
Get the currently set viewport instance at a specific index. |
void |
insertViewport(Viewport2D vp,
int index)
Add a new viewport to be used by this layer at a specified position in the array of viewpor. |
int |
numCullableChildren()
Returns the number of valid cullable children to process. |
int |
numViewports()
Return how many viewports this layer contains. |
Viewport2D |
removeViewport(int num)
Remove the given viewport at the specified index from this layer. |
void |
removeViewport(Viewport2D vp)
Remove the given viewport from this layer. |
protected void |
setLive(boolean state)
Notification that this object is live now. |
protected void |
setUpdateHandler(NodeUpdateHandler handler)
Set the viewportgraph update handler for this node. |
Methods inherited from class org.j3d.aviatrix3d.Layer |
---|
compareTo, equals, equals, getCullable, getType |
Methods inherited from class org.j3d.aviatrix3d.SceneGraphObject |
---|
checkForCyclicChild, checkForCyclicParent, dataChanged, getAppUpdateWriteTimingMessage, getBoundsWriteTimingMessage, getDataWriteTimingMessage, getUserData, isLive, setUserData |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CompositeLayer2D()
Method Detail |
---|
public ViewportCullable getCullableViewport(int viewportIndex)
public int numCullableChildren()
protected void setUpdateHandler(NodeUpdateHandler handler)
setUpdateHandler
in class SceneGraphObject
handler
- The instance to use as a handlerprotected void setLive(boolean state)
setLive
in class SceneGraphObject
state
- true if this should be marked as live nowpublic void addViewport(Viewport2D vp) throws InvalidWriteTimingException, AlreadyParentedException
Note that a viewport cannot have more than one parent, so sharing it between layers will result in an error.
vp
- The viewport instance to use
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener data change callback method
AlreadyParentedException
- This viewport already has a current parent
preventing it from being usedpublic void insertViewport(Viewport2D vp, int index) throws InvalidWriteTimingException, AlreadyParentedException
Note that a viewport cannot have more than one parent, so sharing it between layers will result in an error.
vp
- The viewport instance to useindex
- The position in the list to put this viewport
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener data change callback method
AlreadyParentedException
- This viewport already has a current parent
preventing it from being usedpublic void removeViewport(Viewport2D vp)
vp
- The viewport instance to be removed
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener data change callback methodpublic Viewport2D removeViewport(int num)
num
- The index of the viewport to remove
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener data change callback methodpublic void clearViewports()
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener data change callback methodpublic Viewport2D getViewport(int num)
num
- The index of the viewport to fetch
public int numViewports()
|
Aviatrix3D 2.1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |