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, vfTextureTransformFields 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 voidAdd a single texturetransform node to the list of textures.voidAdd a listener for textureTransform changes.protected voidfireTextureTransformChanged(OGLVRMLNode src, javax.vecmath.Matrix4f[] tmatrix) Fire a textureTransformChanged event to the listeners.org.j3d.aviatrix3d.SceneGraphObjectGet the OpenGL scene graph object representation of this node.javax.vecmath.Matrix4f[]Request the Transformation used to represent a texture transformation.voidRemove a listener for textureTransform changes.voidNotification that the construction phase of this node has finished.voidtextureTransformChanged(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, 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, setDEF, setErrorReporter, setFrameStateManager, setMetadataObject, setUserData, setValue, setValue, 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
-
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:
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 classBaseMultiTextureTransform
-
textureTransformChanged
public void textureTransformChanged(OGLVRMLNode src, javax.vecmath.Matrix4f[] tmatrix, boolean[] updated) Invoked when a textureTransform has changed.- Specified by:
textureTransformChangedin 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:
getTransformMatrixin interfaceOGLTextureCoordinateTransformNodeType- Returns:
- The transform used to modify this texture
-
addTransformListener
Add a listener for textureTransform changes.- Specified by:
addTransformListenerin interfaceOGLTextureCoordinateTransformNodeType- Parameters:
tl- The listener to add
-
removeTransformListener
Remove a listener for textureTransform changes.- Specified by:
removeTransformListenerin 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:
addTextureTransformNodein 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
-