Class OGLGeoLOD
java.lang.Object
org.web3d.vrml.renderer.common.nodes.AbstractNode
org.web3d.vrml.renderer.common.nodes.BaseGroupingNode
org.web3d.vrml.renderer.common.nodes.geospatial.BaseGeoLOD
org.web3d.vrml.renderer.ogl.nodes.geospatial.OGLGeoLOD
- All Implemented Interfaces:
org.j3d.aviatrix3d.NodeUpdateListener
,VRMLExecutionSpace
,VRMLNode
,FrameStateListener
,VRMLBoundedNodeType
,VRMLChildNodeType
,VRMLExternalNodeType
,VRMLGroupingNodeType
,VRMLMultiExternalNodeType
,VRMLNodeType
,VRMLViewDependentNodeType
,VRMLWorldRootChildNodeType
,VisibilityListener
,OGLVisibilityListener
,OGLVRMLNode
,OriginListener
public class OGLGeoLOD
extends BaseGeoLOD
implements OGLVRMLNode, OGLVisibilityListener, org.j3d.aviatrix3d.NodeUpdateListener, VRMLExecutionSpace
OpenGL-renderer implementation of a GeoLOD node.
- Version:
- $Revision: 1.15 $
- Author:
- Justin Couch
-
Field Summary
FieldsModifier and TypeFieldDescriptionList of external nodes that are contained in the child nodesFields inherited from class org.web3d.vrml.renderer.common.nodes.geospatial.BaseGeoLOD
center, childrenShown, childScenes, FIELD_CENTER, FIELD_CHILD1_URL, FIELD_CHILD2_URL, FIELD_CHILD3_URL, FIELD_CHILD4_URL, FIELD_GEO_ORIGIN, FIELD_GEO_SYSTEM, FIELD_LEVEL_CHANGED, FIELD_RANGE, FIELD_ROOT_NODE, FIELD_ROOT_URL, LAST_LOD_INDEX, loadedScenes, loadedUri, loadState, local_origin, localCenter, nodeTmp, NUM_FIELDS, originManager, pGeoOrigin, rootScene, rootSceneWrapper, urlRelativeCheck, useOriginManager, vfCenter, vfChild1Url, vfChild2Url, vfChild3Url, vfChild4Url, vfGeoOrigin, vfGeoSystem, vfLevelChanged, vfRange, vfRootNode, vfRootUrl, worldURL
Fields inherited from class org.web3d.vrml.renderer.common.nodes.BaseGroupingNode
childCount, FIELD_ADDCHILDREN, FIELD_BBOX_CENTER, FIELD_BBOX_DISPLAY, FIELD_BBOX_SIZE, FIELD_CHILDREN, FIELD_REMOVECHILDREN, FIELD_VISIBLE, hasBindables, LAST_GROUP_INDEX, shareCount, USE_BIND_MSG, vfBboxCenter, vfBboxDisplay, vfBboxSize, vfChildren, vfVisible
Fields inherited from class org.web3d.vrml.renderer.common.nodes.AbstractNode
errorReporter, FIELD_METADATA, fieldLocalData, hasChanged, inSetup, isDEF, isStatic, LAST_NODE_INDEX, layerIds, nodeName, pMetadata, refCounts, removedLayerIds, stateManager, STATIC_SCENE_GRAPH, vfMetadata, vrmlMajorVersion, vrmlMinorVersion
Fields inherited from interface org.web3d.vrml.nodes.VRMLExternalNodeType
LOAD_COMPLETE, LOAD_FAILED, LOADING, NOT_LOADED
-
Constructor Summary
ConstructorsConstructorDescriptionConstruct a default instance of this node.OGLGeoLOD
(VRMLNodeType node) Construct a new instance of this node based on the details from the given node. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Notification that the rendering of the event model is complete and that rendering is about to begin.protected void
Clear the child node list of all children - both VRML and OpenGL.Get the contained scene graph that this instance has.org.j3d.aviatrix3d.SceneGraphObject
Get the OpenGL scene graph object representation of this node.void
notifyExternProtoLoaded
(int index, VRMLNodeType node) Notify a node that an ExternProto has resolved.void
Notification that the origin has changed.void
setContent
(int index, String mimetype, Object content) Set the content of this node to the given object.void
Notification that the construction phase of this node has finished.void
Notification that its safe to update the node now with any operations that could potentially effect the node's bounds.void
Notification that its safe to update the node now with any operations that only change the node's properties, but do not change the bounds.void
viewPositionChanged
(javax.vecmath.Point3f position, javax.vecmath.AxisAngle4f orientation, javax.vecmath.Matrix4f localPosition) Notification that the object is still visible, but that the viewer reference point has changed.void
visibilityStateChange
(boolean visible, javax.vecmath.Point3f position, javax.vecmath.AxisAngle4f orientation, javax.vecmath.Matrix4f localPosition) Invoked when the user enters or leaves an area.Methods inherited from class org.web3d.vrml.renderer.common.nodes.geospatial.BaseGeoLOD
addContentStateListener, addRootNode, addUrlListener, checkValidContentType, clearRootNodes, fireContentStateChanged, fireUrlChanged, getFieldDeclaration, getFieldIndex, getFieldValue, getLoadState, getNodeFieldIndices, getNumFields, getPreferredClassTypes, getSecondaryType, getUrl, getUrlFieldIndexes, getWorldUrl, loadScene, removeContentStateListener, removeUrlListener, setLoadedURI, setLoadState, setShared, setValue, setValue, setValue, setValue, setValue, setWorldUrl, updateRefCount
Methods inherited from class org.web3d.vrml.renderer.common.nodes.BaseGroupingNode
addChild, addChildNode, containsBindableNodes, copy, getBboxCenter, getBboxDisplay, getBboxSize, getChildren, getChildrenSize, getPrimaryType, getVisible, isShared, removeChildNode, sendRoute, setBboxCenter, setBboxDisplay, setBboxSize, setChildren, setChildren, setDEF, setValue, setValue, setVisible
Methods inherited from class org.web3d.vrml.renderer.common.nodes.AbstractNode
addNodeListener, checkNodeType, checkSecondaryType, checkSecondaryType, clearRemovedLayerIds, fireFieldChanged, getLayerIds, getMetadataObject, getRefCount, getRemovedLayerIds, getUserData, getVRMLNodeName, hasFieldChanged, isDEF, isSetupFinished, removeNodeListener, setErrorReporter, setFrameStateManager, setMetadataObject, setUserData, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setVersion, throwInitOnlyWriteException, throwInputOnlyWriteException, throwInvalidNodeException, throwInvalidProtoException, throwOutputOnlyWriteException, updateRefs
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.web3d.vrml.lang.VRMLNode
getFieldDeclaration, getFieldIndex, getNodeFieldIndices, getNumFields, getPrimaryType, getSecondaryType, getUserData, getVRMLNodeName, isDEF, setErrorReporter, setUserData, setVersion
Methods inherited from interface org.web3d.vrml.nodes.VRMLNodeType
addNodeListener, clearRemovedLayerIds, getFieldValue, getLayerIds, getMetadataObject, getRefCount, getRemovedLayerIds, hasFieldChanged, isSetupFinished, removeNodeListener, sendRoute, setDEF, setFrameStateManager, setMetadataObject, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, updateRefCount
-
Field Details
-
childExternalList
-
-
Constructor Details
-
OGLGeoLOD
public OGLGeoLOD()Construct a default instance of this node. The defaults are set by the VRML specification. -
OGLGeoLOD
Construct a new instance of this node based on the details from the given node. If the node is not a group node, an exception will be thrown. It does not copy the children nodes, just this node.- Parameters:
node
- The node to copy- Throws:
IllegalArgumentException
- The node is not a Group node
-
-
Method Details
-
getContainedScene
Description copied from interface:VRMLExecutionSpace
Get the contained scene graph that this instance has. This represents everything about the internal scene that the node declaration wraps. This is a real-time representation so that if it the nodes contains a script that changes the internal representation then this instance will be updated to reflect and changes made.- Specified by:
getContainedScene
in interfaceVRMLExecutionSpace
- Returns:
- The scene contained by this node instance
-
allEventsComplete
public void allEventsComplete()Notification that the rendering of the event model is complete and that rendering is about to begin. Used to update the scene graph with the loaded scene structure at the end of the frame to avoid issues with multiple access to the scene graph.- Specified by:
allEventsComplete
in interfaceFrameStateListener
- Overrides:
allEventsComplete
in classAbstractNode
-
getSceneGraphObject
public org.j3d.aviatrix3d.SceneGraphObject getSceneGraphObject()Get the OpenGL scene graph object representation of this node. This will need to be cast to the appropriate parent type when being used.- Specified by:
getSceneGraphObject
in interfaceOGLVRMLNode
- Returns:
- The OGL representation.
-
setupFinished
public void setupFinished()Notification that the construction phase of this node has finished. If the node would like to do any internal processing, such as setting up geometry, then go for it now.- Specified by:
setupFinished
in interfaceVRMLNodeType
- Overrides:
setupFinished
in classBaseGeoLOD
-
notifyExternProtoLoaded
Description copied from interface:VRMLNodeType
Notify a node that an ExternProto has resolved. This will verify the objects type and add it to the render sceneGraph.- Specified by:
notifyExternProtoLoaded
in interfaceVRMLNodeType
- Overrides:
notifyExternProtoLoaded
in classAbstractNode
- Parameters:
index
- The field indexnode
- The node resolved
-
setContent
Description copied from interface:VRMLMultiExternalNodeType
Set the content of this node to the given object. The object is then cast by the internal representation to the form it needs. This assumes at least some amount of intelligence on the part of the caller, but we also know that we should not pass something dumb to it when we can check what sort of content types it likes to handle. We assume the loader thread is operating in the same context as the one that created the node in the first place and thus knows the general types of items to pass through.- Specified by:
setContent
in interfaceVRMLMultiExternalNodeType
- Parameters:
index
- The field index to set the content formimetype
- The mime type of this object if knowncontent
- The content of the object- Throws:
IllegalArgumentException
- The content object is not supported
-
visibilityStateChange
public void visibilityStateChange(boolean visible, javax.vecmath.Point3f position, javax.vecmath.AxisAngle4f orientation, javax.vecmath.Matrix4f localPosition) Invoked when the user enters or leaves an area.- Specified by:
visibilityStateChange
in interfaceOGLVisibilityListener
- Parameters:
visible
- true when the user enters the areaposition
- The position of the user on entry/exitorientation
- The orientation of the user therelocalPosition
- The vworld transform object for the class that implemented this listener
-
viewPositionChanged
public void viewPositionChanged(javax.vecmath.Point3f position, javax.vecmath.AxisAngle4f orientation, javax.vecmath.Matrix4f localPosition) Notification that the object is still visible, but that the viewer reference point has changed. Ignored for this implementation.- Specified by:
viewPositionChanged
in interfaceOGLVisibilityListener
- Parameters:
position
- The new position of the userorientation
- The orientation of the user therelocalPosition
- The vworld transform object for the class that implemented this listener
-
updateNodeBoundsChanges
Notification that its safe to update the node now with any operations that could potentially effect the node's bounds.- Specified by:
updateNodeBoundsChanges
in interfaceorg.j3d.aviatrix3d.NodeUpdateListener
- Parameters:
src
- The node or Node Component that is to be updated.
-
updateNodeDataChanges
Notification that its safe to update the node now with any operations that only change the node's properties, but do not change the bounds.- Specified by:
updateNodeDataChanges
in interfaceorg.j3d.aviatrix3d.NodeUpdateListener
- Parameters:
src
- The node or Node Component that is to be updated.
-
clearChildren
protected void clearChildren()Clear the child node list of all children - both VRML and OpenGL.- Overrides:
clearChildren
in classBaseGroupingNode
-
originChanged
public void originChanged()Notification that the origin has changed.- Specified by:
originChanged
in interfaceOriginListener
- Overrides:
originChanged
in classBaseGeoLOD
-