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 boolean
Flag used in the end of frame listener, indicating that the new nodes may be added to the sceneprotected boolean
Synchronization flagprotected OGLConstruct
The constructprotected OGLStandardBrowserCore
The browser coreprotected org.j3d.util.ErrorReporter
The error reporting mechanismprotected FrameStateManager
The frame state managerprotected boolean
Should the headlight be onprotected OGLNavigationInfo
The navigation infoprotected VRMLWorldRootNodeType
The scene root, parent for the nav info and viewpoint nodesprotected OGLViewpoint
The viewpoint -
Constructor Summary
ConstructorsConstructorDescriptionAutoConfigureViewpoint
(OGLConstruct construct, boolean headlight) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoid
Notification that the rendering of the event model is complete and that rendering is about to begin.boolean
Create 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:FrameStateListener
Notification 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:
allEventsComplete
in 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.
-