Package org.xj3d.ui.construct.ogl
Class AutoConfigureViewpoint
java.lang.Object
org.xj3d.ui.construct.ogl.AutoConfigureViewpoint
- All Implemented Interfaces:
FrameStateListener
Utility module for the ThumbnailRecorder that will attempt to create
a useful default viewpoint of the loaded scene. The generated viewpoint
will be along the vector [1, 1, 1] from the center of the scene bounds,
at a distance that -should- have the object(s) in the field of view.
- Version:
- $Revision: 1.10 $
- Author:
- Rex Melton
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanFlag used in the end of frame listener, indicating that the new nodes may be added to the sceneprotected booleanSynchronization flagprotected OGLConstructThe constructprotected OGLStandardBrowserCoreThe browser coreprotected org.j3d.util.ErrorReporterThe error reporting mechanismprotected FrameStateManagerThe frame state managerprotected booleanShould the headlight be onprotected OGLNavigationInfoThe navigation infoprotected VRMLWorldRootNodeTypeThe scene root, parent for the nav info and viewpoint nodesprotected OGLViewpointThe viewpoint -
Constructor Summary
ConstructorsConstructorDescriptionAutoConfigureViewpoint(OGLConstruct construct, boolean headlight) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidNotification that the rendering of the event model is complete and that rendering is about to begin.booleanCreate and configure a new viewpoint.
-
Field Details
-
construct
The construct -
headlight
protected boolean headlightShould the headlight be on -
core
The browser core -
fsm
The frame state manager -
errorReporter
protected org.j3d.util.ErrorReporter errorReporterThe error reporting mechanism -
configComplete
protected boolean configCompleteSynchronization flag -
viewpoint
The viewpoint -
root
The scene root, parent for the nav info and viewpoint nodes -
addNodes
protected boolean addNodesFlag used in the end of frame listener, indicating that the new nodes may be added to the scene
-
-
Constructor Details
-
AutoConfigureViewpoint
Constructor- Parameters:
construct- The construct containing the scene for which to configure a viewpoint.headlight- Should the headlight be on
-
-
Method Details
-
allEventsComplete
public void allEventsComplete()Description copied from interface:FrameStateListenerNotification that the rendering of the event model is complete and that rendering is about to begin. If the node needs to update itself for this frame, it should do so now before the render pass takes place.- Specified by:
allEventsCompletein interfaceFrameStateListener
-
configure
public boolean configure()Create and configure a new viewpoint. Wait for the node to be added and bound in the scene before returning. If the bounds of the scene could not be determined, no configuration is performed and the method returns immediately.- Returns:
- true if the viewpoint was added successfully, false otherwise.
-