Class OGLMultiTextureTransform
java.lang.Object
org.web3d.vrml.renderer.common.nodes.AbstractNode
org.web3d.vrml.renderer.common.nodes.texture.BaseMultiTextureTransform
org.web3d.vrml.renderer.ogl.nodes.texture.OGLMultiTextureTransform
- All Implemented Interfaces:
VRMLNode
,FrameStateListener
,VRMLAppearanceChildNodeType
,VRMLNodeType
,VRMLTextureCoordinateTransformNodeType
,VRMLTextureTransformNodeType
,OGLTextureCoordinateTransformNodeType
,OGLTextureTransformListener
,OGLVRMLNode
public class OGLMultiTextureTransform
extends BaseMultiTextureTransform
implements OGLTextureCoordinateTransformNodeType, OGLTextureTransformListener
Java3D implementation of a multi texture transform.
- Version:
- $Revision: 1.2 $
- Author:
- Alan Hudson
-
Field Summary
Fields inherited from class org.web3d.vrml.renderer.common.nodes.texture.BaseMultiTextureTransform
FIELD_TEXTURETRANSFORM, fieldDecl, fieldMap, LAST_MULTITEXTURETRANSFORM_INDEX, vfTextureTransform
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 new default instance of this class.Construct a new instance of this node based on the details from the given node. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Add a single texturetransform node to the list of textures.void
Add a listener for textureTransform changes.protected void
fireTextureTransformChanged
(OGLVRMLNode src, javax.vecmath.Matrix4f[] tmatrix) Fire a textureTransformChanged event to the listeners.org.j3d.aviatrix3d.SceneGraphObject
Get the OpenGL scene graph object representation of this node.javax.vecmath.Matrix4f[]
Request the Transformation used to represent a texture transformation.void
Remove a listener for textureTransform changes.void
Notification that the construction phase of this node has finished.void
textureTransformChanged
(OGLVRMLNode src, javax.vecmath.Matrix4f[] tmatrix, boolean[] updated) Invoked when a textureTransform has changed.Methods inherited from class org.web3d.vrml.renderer.common.nodes.texture.BaseMultiTextureTransform
getFieldDeclaration, getFieldIndex, getFieldValue, getNodeFieldIndices, getNumFields, getPrimaryType, sendRoute, setValue, setValue
Methods 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, setDEF, setErrorReporter, setFrameStateManager, setMetadataObject, setUserData, setValue, setValue, 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, 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, notifyExternProtoLoaded, removeNodeListener, sendRoute, setDEF, setFrameStateManager, setMetadataObject, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, updateRefCount
-
Constructor Details
-
OGLMultiTextureTransform
public OGLMultiTextureTransform()Construct a new default instance of this class. -
OGLMultiTextureTransform
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
-
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 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:
setupFinished
in interfaceVRMLNodeType
- Overrides:
setupFinished
in classBaseMultiTextureTransform
-
textureTransformChanged
public void textureTransformChanged(OGLVRMLNode src, javax.vecmath.Matrix4f[] tmatrix, boolean[] updated) Invoked when a textureTransform has changed.- Specified by:
textureTransformChanged
in interfaceOGLTextureTransformListener
- Parameters:
src
- The node instance that was the source of this changetmatrix
- The new TransformMatrix arrayupdated
- Flag for each index illustrating whether it has been updated or not.
-
getTransformMatrix
public javax.vecmath.Matrix4f[] getTransformMatrix()Request the Transformation used to represent a texture transformation. The transform will contain all of the warp, scale and rotation- Specified by:
getTransformMatrix
in interfaceOGLTextureCoordinateTransformNodeType
- Returns:
- The transform used to modify this texture
-
addTransformListener
Add a listener for textureTransform changes.- Specified by:
addTransformListener
in interfaceOGLTextureCoordinateTransformNodeType
- Parameters:
tl
- The listener to add
-
removeTransformListener
Remove a listener for textureTransform changes.- Specified by:
removeTransformListener
in interfaceOGLTextureCoordinateTransformNodeType
- Parameters:
tl
- The listener to remove
-
addTextureTransformNode
Add a single texturetransform node to the list of textures. Override this to add render-specific behavior, but remember to call this method.- Overrides:
addTextureTransformNode
in classBaseMultiTextureTransform
- Parameters:
node
- The node to add- Throws:
InvalidFieldValueException
- This is a bindable node shared
-
fireTextureTransformChanged
Fire a textureTransformChanged event to the listeners.- Parameters:
src
- The node instance that was the source of this changetmatrix
- The new TransformMatrix array
-