public class ViewerSwitch extends Object implements Viewer
Constructor and Description |
---|
ViewerSwitch(Viewer[] viewers) |
ViewerSwitch(Viewer[] viewers,
String[] names) |
Modifier and Type | Method and Description |
---|---|
boolean |
canRenderAsync()
Tells wether this viewer supports asyncronous rendering.
|
void |
dispose() |
SceneGraphComponent |
getAuxiliaryRoot()
Some viewers (at least the jogl viewer) support an auxilary
root - for things to display that are no part of the scene itself.
|
SceneGraphPath |
getCameraPath()
Get the camera path.
|
Viewer |
getCurrentViewer() |
int |
getNumViewers() |
SceneGraphComponent |
getSceneRoot()
Get the scene root.
|
String[] |
getViewerNames() |
Viewer[] |
getViewers() |
Component |
getViewingComponent()
Gives the viewing component.
|
Dimension |
getViewingComponentSize()
Gives the dimension of the viewing component in pixel.
|
boolean |
hasViewingComponent()
Has this viewer a viewing component?
|
void |
render()
This method triggers rendering of the viewer.
|
void |
renderAsync()
Some viewers support asyncronous rendering.
|
void |
selectViewer(int i)
change the current viewer and give it the needed information
|
void |
selectViewer(String viewerName) |
void |
setAuxiliaryRoot(SceneGraphComponent ar)
Some viewers (at least the jogl viewer) support an auxilary
root - for things to display that are no part of the scene itself.
|
void |
setCameraPath(SceneGraphPath p)
Set the camera path.
|
void |
setSceneRoot(SceneGraphComponent r)
Set the scene root.
|
void |
setToolSystem(ToolSystem toolSystem)
Set all the viewers and the ViewerSwitch to have the same ToolSystem
Would it be better to look up the tool system via the scene root, rather than per viewer?
|
public ViewerSwitch(Viewer[] viewers)
public Viewer getCurrentViewer()
public void selectViewer(int i)
i
- public int getNumViewers()
public Viewer[] getViewers()
public String[] getViewerNames()
public void selectViewer(String viewerName)
public SceneGraphComponent getSceneRoot()
Viewer
getSceneRoot
in interface Viewer
public SceneGraphComponent getAuxiliaryRoot()
Viewer
getAuxiliaryRoot
in interface Viewer
public SceneGraphPath getCameraPath()
Viewer
getCameraPath
in interface Viewer
public Component getViewingComponent()
Viewer
getViewingComponent
in interface Viewer
public boolean hasViewingComponent()
Viewer
hasViewingComponent
in interface Viewer
public void render()
Viewer
public void setAuxiliaryRoot(SceneGraphComponent ar)
Viewer
setAuxiliaryRoot
in interface Viewer
ar
- the auxiliary rootpublic void setCameraPath(SceneGraphPath p)
Viewer
setCameraPath
in interface Viewer
p
- the camera path.public void setSceneRoot(SceneGraphComponent r)
Viewer
setSceneRoot
in interface Viewer
r
- the scene rootpublic boolean canRenderAsync()
Viewer
canRenderAsync
in interface Viewer
public Dimension getViewingComponentSize()
Viewer
getViewingComponentSize
in interface Viewer
public void renderAsync() throws UnsupportedOperationException
Viewer
renderAsync
in interface Viewer
UnsupportedOperationException
public void dispose()
public void setToolSystem(ToolSystem toolSystem)
toolSystem
-