Class OGLLocalFog
java.lang.Object
org.web3d.vrml.renderer.common.nodes.AbstractNode
org.web3d.vrml.renderer.common.nodes.enveffects.BaseLocalFog
org.web3d.vrml.renderer.ogl.nodes.enveffects.OGLLocalFog
- All Implemented Interfaces:
org.j3d.aviatrix3d.NodeUpdateListener,VRMLNode,FrameStateListener,VRMLChildNodeType,VRMLFogNodeType,VRMLNodeType,VRMLWorldRootChildNodeType,OGLVRMLNode
public class OGLLocalFog
extends BaseLocalFog
implements OGLVRMLNode, org.j3d.aviatrix3d.NodeUpdateListener
Null renderer implementation of a LocalFog node.
This node is purely informational within the scene graph. It does not have a renderable representation.
- Version:
- $Revision: 1.1 $
- Author:
- Justin Couch
-
Field Summary
Fields inherited from class org.web3d.vrml.renderer.common.nodes.enveffects.BaseLocalFog
EXPONENTIAL_TYPE, FIELD_COLOR, FIELD_ENABLED, FIELD_FOGTYPE, FIELD_VISIBILITY_RANGE, fogType, LAST_FOG_INDEX, LINEAR_TYPE, NUM_FIELDS, vfColor, vfEnabled, vfFogType, vfVisibilityRangeFields 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, vrmlMinorVersionFields inherited from interface org.web3d.vrml.nodes.VRMLFogNodeType
FOG_TYPE_DISABLE, FOG_TYPE_EXPONENTIAL, FOG_TYPE_LINEAR -
Constructor Summary
ConstructorsConstructorDescriptionConstruct a default node with an empty info array any the title set to the empty string.OGLLocalFog(VRMLNodeType node) Construct a new instance of this node based on the details from the given node. -
Method Summary
Modifier and TypeMethodDescriptionorg.j3d.aviatrix3d.SceneGraphObjectGet the OpenGL scene graph object representation of this node.voidsetColor(float[] color) Set the color of the current fog.protected voidsetEnabled(boolean state) Set a new state for the enabled field.protected voidsetFogType(String type) Set the local fog type to a new value.voidNotification that the construction phase of this node has finished.voidsetVisibilityRange(float range) Set the visibility limit on the fog to be viewed to a new value.voidNotification that its safe to update the node now with any operations that could potentially effect the node's bounds.voidNotification that its safe to update the node now with any operations that only change the node's properties, but do not change the bounds.Methods inherited from class org.web3d.vrml.renderer.common.nodes.enveffects.BaseLocalFog
getColor, getFieldDeclaration, getFieldIndex, getFieldValue, getFogType, getNodeFieldIndices, getNumFields, getPrimaryType, getVisibilityRange, sendRoute, setDEF, setFogType, setValue, setValue, setValue, setValueMethods inherited from class org.web3d.vrml.renderer.common.nodes.AbstractNode
addNodeListener, allEventsComplete, checkNodeType, checkSecondaryType, checkSecondaryType, clearRemovedLayerIds, fireFieldChanged, getLayerIds, getMetadataObject, getRefCount, getRemovedLayerIds, getSecondaryType, getUserData, getVRMLNodeName, hasFieldChanged, isDEF, isSetupFinished, notifyExternProtoLoaded, removeNodeListener, setErrorReporter, setFrameStateManager, setMetadataObject, setUserData, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setVersion, throwInitOnlyWriteException, throwInputOnlyWriteException, throwInvalidNodeException, throwInvalidProtoException, throwOutputOnlyWriteException, updateRefCount, updateRefsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.web3d.vrml.nodes.FrameStateListener
allEventsCompleteMethods inherited from interface org.web3d.vrml.lang.VRMLNode
getFieldDeclaration, getFieldIndex, getNodeFieldIndices, getNumFields, getPrimaryType, getSecondaryType, getUserData, getVRMLNodeName, isDEF, setErrorReporter, setUserData, setVersionMethods inherited from interface org.web3d.vrml.nodes.VRMLNodeType
addNodeListener, clearRemovedLayerIds, getFieldValue, getLayerIds, getMetadataObject, getRefCount, getRemovedLayerIds, hasFieldChanged, isSetupFinished, notifyExternProtoLoaded, removeNodeListener, sendRoute, setDEF, setFrameStateManager, setMetadataObject, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, updateRefCount
-
Constructor Details
-
OGLLocalFog
public OGLLocalFog()Construct a default node with an empty info array any the title set to the empty string. -
OGLLocalFog
Construct a new instance of this node based on the details from the given node. If the node is not the same type, an exception will be thrown.- Parameters:
node- The node to copy- Throws:
IllegalArgumentException- The node is not the same type
-
-
Method Details
-
updateNodeBoundsChanges
Notification that its safe to update the node now with any operations that could potentially effect the node's bounds.- Specified by:
updateNodeBoundsChangesin 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:
updateNodeDataChangesin interfaceorg.j3d.aviatrix3d.NodeUpdateListener- Parameters:
src- The node or Node Component that is to be updated.
-
setVisibilityRange
Set the visibility limit on the fog to be viewed to a new value. The value of zero will disable the fog. A negative number will generate an exception.- Specified by:
setVisibilityRangein interfaceVRMLFogNodeType- Overrides:
setVisibilityRangein classBaseLocalFog- Parameters:
range- A non-negative number indicating the distance- Throws:
InvalidFieldValueException- The number was negative
-
setColor
Set the color of the current fog. If the color values are out of range or the array is invalid, an exception will be generated.- Specified by:
setColorin interfaceVRMLFogNodeType- Overrides:
setColorin classBaseLocalFog- Parameters:
color- The new colors to set- Throws:
InvalidFieldValueException- The colour values were out of range.
-
setEnabled
protected void setEnabled(boolean state) Set a new state for the enabled field.- Overrides:
setEnabledin classBaseLocalFog- Parameters:
state- True if this sensor is to be enabled
-
setFogType
Set the local fog type to a new value. Converts the string form to the internal representation.- Overrides:
setFogTypein classBaseLocalFog- Parameters:
type- The type string indicating what needs to be set- Throws:
InvalidFieldValueException- The fog type string is invalid
-
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. Default implementation returns null.- Specified by:
getSceneGraphObjectin interfaceOGLVRMLNode- Returns:
- The OpenGL 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:
setupFinishedin interfaceVRMLNodeType- Overrides:
setupFinishedin classAbstractNode
-