Class OGLRenderedTexture
java.lang.Object
org.web3d.vrml.renderer.common.nodes.AbstractNode
org.web3d.vrml.renderer.common.nodes.BaseTextureNode
org.web3d.vrml.renderer.common.nodes.BaseTexture2DNode
org.web3d.vrml.renderer.common.nodes.texture.BaseRenderedTexture
org.web3d.vrml.renderer.ogl.nodes.texture.OGLRenderedTexture
- All Implemented Interfaces:
org.j3d.aviatrix3d.NodeUpdateListener
,VRMLNode
,FrameStateListener
,VRMLAppearanceChildNodeType
,VRMLExternalSynchronizedNodeType
,VRMLNodeType
,VRMLTexture2DNodeType
,VRMLTextureNodeType
,OGLTextureNodeType
,OGLVRMLNode
public class OGLRenderedTexture
extends BaseRenderedTexture
implements OGLTextureNodeType, FrameStateListener, VRMLExternalSynchronizedNodeType, org.j3d.aviatrix3d.NodeUpdateListener
RenderedTexture node implementation for OpenGL.
- Version:
- $Revision: 1.15 $
- Author:
- Justin Couch
-
Field Summary
Fields inherited from class org.web3d.vrml.renderer.common.nodes.texture.BaseRenderedTexture
BACKGROUND_NODE_MSG, BACKGROUND_PROTO_MSG, FIELD_BACKGROUND, FIELD_DIMENSIONS, FIELD_FOG, FIELD_SCENE, FIELD_UPDATE, FIELD_VIEWPOINT, fieldDecl, fieldMap, FOG_NODE_MSG, FOG_PROTO_MSG, LAST_RENDERED_INDEX, NUM_FIELDS, pBackground, pFog, pScene, pViewpoint, SCENE_NODE_MSG, SCENE_PROTO_MSG, UPDATE_ALWAYS, UPDATE_NEXT, UPDATE_NONE, updateFlag, updateMap, vfBackground, vfDimensions, vfFog, vfScene, vfUpdate, vfViewpoint, VIEWPOINT_NODE_MSG, VIEWPOINT_PROTO_MSG
Fields inherited from class org.web3d.vrml.renderer.common.nodes.BaseTexture2DNode
FIELD_DESCRIPTION, FIELD_REPEATS, FIELD_REPEATT, FIELD_TEXTURE_PROPERTIES, implImage, LAST_TEXTURENODETYPE_INDEX, pTextureProperties, TEXPROPS_VERSION_MSG, TEXTURE_PROPS_NODE_MSG, TEXTURE_PROPS_PROTO_MSG, vfDescription, vfRepeatS, vfRepeatT, vfTextureProperties
Fields inherited from class org.web3d.vrml.renderer.common.nodes.BaseTextureNode
listenerList
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
-
Constructor Summary
ConstructorsConstructorDescriptionConstruct a default texture instance.Construct a new instance of this node based on the details from the given node. -
Method Summary
Modifier and TypeMethodDescriptionorg.j3d.aviatrix3d.SceneGraphObject
Get the OpenGL scene graph object representation of this node.int[]
Get the secondary type of this node.void
Notification that event evaluation is about to start.void
Notification that event evaluation is about to start.protected void
Set new value to be used for the background field.protected void
setFog
(VRMLNodeType fog) Set new value to be used for the fog field.protected void
setScene
(VRMLNodeType scn) Set new value to be used for the scene field.void
setTexture
(int index, org.j3d.aviatrix3d.Texture tex) Set the Aviatrix3D texture representation back into the node implementation.protected void
The update state has changed.void
Notification that the construction phase of this node has finished.protected void
Set new value to be used for the viewpoint field.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.Methods inherited from class org.web3d.vrml.renderer.common.nodes.texture.BaseRenderedTexture
getFieldDeclaration, getFieldIndex, getFieldValue, getNodeFieldIndices, getNumFields, getPrimaryType, getTextureType, sendRoute, setValue, setValue, setValue
Methods inherited from class org.web3d.vrml.renderer.common.nodes.BaseTexture2DNode
copy, getDescription, getImage, getRepeatS, getRepeatT, getTextureProperties, setTextureProperties, setValue
Methods inherited from class org.web3d.vrml.renderer.common.nodes.BaseTextureNode
addTextureListener, fireTextureImageChanged, fireTextureParamsChanged, getCacheString, removeTextureListener
Methods inherited from class org.web3d.vrml.renderer.common.nodes.AbstractNode
addNodeListener, allEventsComplete, checkNodeType, checkSecondaryType, checkSecondaryType, clearRemovedLayerIds, fireFieldChanged, getLayerIds, getMetadataObject, getRefCount, getRemovedLayerIds, getUserData, getVRMLNodeName, hasFieldChanged, isDEF, isSetupFinished, notifyExternProtoLoaded, removeNodeListener, setDEF, setErrorReporter, setFrameStateManager, setMetadataObject, setUserData, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setVersion, throwInitOnlyWriteException, throwInputOnlyWriteException, throwInvalidNodeException, throwInvalidProtoException, throwOutputOnlyWriteException, updateRefCount, 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.nodes.FrameStateListener
allEventsComplete
Methods inherited from interface org.web3d.vrml.lang.VRMLNode
getFieldDeclaration, getFieldIndex, getNodeFieldIndices, getNumFields, getPrimaryType, getUserData, getVRMLNodeName, isDEF, setErrorReporter, setUserData, setVersion
Methods 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
Methods inherited from interface org.web3d.vrml.nodes.VRMLTexture2DNodeType
getDescription, getImage, getRepeatS, getRepeatT, getTextureProperties, setTextureProperties
Methods inherited from interface org.web3d.vrml.nodes.VRMLTextureNodeType
addTextureListener, getCacheString, removeTextureListener
-
Constructor Details
-
OGLRenderedTexture
public OGLRenderedTexture()Construct a default texture instance. -
OGLRenderedTexture
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
-
setTexture
public void setTexture(int index, org.j3d.aviatrix3d.Texture tex) Set the Aviatrix3D texture representation back into the node implementation.- Specified by:
setTexture
in interfaceOGLTextureNodeType
- Parameters:
index
- The index of the texture (for multitexture)tex
- The texture object to set
-
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:
getSceneGraphObject
in interfaceOGLVRMLNode
- Returns:
- The OpenGL representation.
-
getSecondaryType
public int[] getSecondaryType()Get the secondary type of this node. Replaces the instanceof mechanism for use in switch statements.- Specified by:
getSecondaryType
in interfaceVRMLNode
- Overrides:
getSecondaryType
in classAbstractNode
- Returns:
- The secondary type
-
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 classBaseRenderedTexture
-
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.
-
preEventEvaluation
public void preEventEvaluation()Notification that event evaluation is about to start. This is a safer time to modify the underlying rendering structures.- Specified by:
preEventEvaluation
in interfaceVRMLExternalSynchronizedNodeType
-
postEventEvaluation
public void postEventEvaluation()Notification that event evaluation is about to start. This is a safer time to modify the underlying rendering structures.- Specified by:
postEventEvaluation
in interfaceVRMLExternalSynchronizedNodeType
-
setUpdate
The update state has changed. Override if need be for any renderer-specific needs.- Overrides:
setUpdate
in classBaseRenderedTexture
- Parameters:
state
- The new state for updates
-
setBackground
Set new value to be used for the background field.- Overrides:
setBackground
in classBaseRenderedTexture
- Parameters:
bg
- The new background. null will act like delete- Throws:
InvalidFieldValueException
- The node does not match the required type.
-
setFog
Set new value to be used for the fog field.- Overrides:
setFog
in classBaseRenderedTexture
- Parameters:
fog
- The new fog. null will act like delete- Throws:
InvalidFieldValueException
- The node does not match the required type.
-
setViewpoint
Set new value to be used for the viewpoint field.- Overrides:
setViewpoint
in classBaseRenderedTexture
- Parameters:
vp
- The new viewpoint. null will act like delete- Throws:
InvalidFieldValueException
- The node does not match the required type.
-
setScene
Set new value to be used for the scene field.- Overrides:
setScene
in classBaseRenderedTexture
- Parameters:
scn
- The new scene. null will act like delete- Throws:
InvalidFieldValueException
- The node does not match the required type.
-