|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.jreality.ui.viewerapp.ViewerSwitch
public class ViewerSwitch
hides several viewer implementations and provides the same viewing component for all. Using this class an application doesn't need to care about component replacement when switching from one viewer to another...
| Constructor Summary | |
|---|---|
ViewerSwitch(Viewer[] viewers)
|
|
ViewerSwitch(Viewer[] viewers,
String[] names)
|
|
| Method Summary | |
|---|---|
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)
|
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? |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ViewerSwitch(Viewer[] viewers)
public ViewerSwitch(Viewer[] viewers,
String[] names)
| Method Detail |
|---|
public Viewer getCurrentViewer()
public void selectViewer(int i)
public int getNumViewers()
public Viewer[] getViewers()
public String[] getViewerNames()
public void selectViewer(String viewerName)
public SceneGraphComponent getSceneRoot()
Viewer
getSceneRoot in interface Viewerpublic SceneGraphComponent getAuxiliaryRoot()
Viewer
getAuxiliaryRoot in interface Viewerpublic SceneGraphPath getCameraPath()
Viewer
getCameraPath in interface Viewerpublic Component getViewingComponent()
Viewer
getViewingComponent in interface Viewerpublic boolean hasViewingComponent()
Viewer
hasViewingComponent in interface Viewerpublic void render()
Viewer
render in interface Viewerpublic void setAuxiliaryRoot(SceneGraphComponent ar)
Viewer
setAuxiliaryRoot in interface Viewerar - the auxiliary rootpublic void setCameraPath(SceneGraphPath p)
Viewer
setCameraPath in interface Viewerp - the camera path.public void setSceneRoot(SceneGraphComponent r)
Viewer
setSceneRoot in interface Viewerr - the scene rootpublic boolean canRenderAsync()
Viewer
canRenderAsync in interface Viewerpublic Dimension getViewingComponentSize()
Viewer
getViewingComponentSize in interface Viewer
public void renderAsync()
throws UnsupportedOperationException
Viewer
renderAsync in interface ViewerUnsupportedOperationExceptionpublic void dispose()
public void setToolSystem(ToolSystem toolSystem)
toolSystem -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||