Class OGLTextureTransform3D
java.lang.Object
org.web3d.vrml.renderer.common.nodes.AbstractNode
org.web3d.vrml.renderer.common.nodes.texture.BaseTextureTransform3D
org.web3d.vrml.renderer.ogl.nodes.texture.OGLTextureTransform3D
- All Implemented Interfaces:
VRMLNode
,FrameStateListener
,VRMLAppearanceChildNodeType
,VRMLNodeType
,VRMLTextureCoordinateTransformNodeType
,VRMLTextureTransformNodeType
,OGLTextureCoordinateTransformNodeType
,OGLVRMLNode
public class OGLTextureTransform3D
extends BaseTextureTransform3D
implements OGLTextureCoordinateTransformNodeType
Java3D implementation of a texture transform.
- Version:
- $Revision: 1.3 $
- Author:
- Justin Couch
-
Field Summary
Fields inherited from class org.web3d.vrml.renderer.common.nodes.texture.BaseTextureTransform3D
FIELD_CENTER, FIELD_ORIENTATION, FIELD_SCALE, FIELD_TRANSLATION, fieldDecl, fieldMap, LAST_TEXTURETRANSFORM_INDEX, vfCenter, vfOrientation, vfScale, vfTranslation
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 TypeMethodDescriptionvoid
Add a listener for textureTransform changes.org.j3d.aviatrix3d.SceneGraphObject
Get the Java3D 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
setValue
(int index, float value) Set the value of the field at the given index as a float.void
setValue
(int index, float[] value, int numValid) Set the value of the field at the given index as an array of floats.Methods inherited from class org.web3d.vrml.renderer.common.nodes.texture.BaseTextureTransform3D
getFieldDeclaration, getFieldIndex, getFieldValue, getNodeFieldIndices, getNumFields, getPrimaryType, sendRoute
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, updateRefCount
-
Constructor Details
-
OGLTextureTransform3D
public OGLTextureTransform3D()Construct a new default instance of this class. -
OGLTextureTransform3D
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 Java3D 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 classAbstractNode
-
setValue
public void setValue(int index, float value) throws InvalidFieldException, InvalidFieldValueException Set the value of the field at the given index as a float. This would be used to set SFFloat field types.- Specified by:
setValue
in interfaceVRMLNodeType
- Overrides:
setValue
in classAbstractNode
- Parameters:
index
- The index of destination field to setvalue
- The new value to use for the node- Throws:
InvalidFieldException
- The index does not match a known fieldInvalidFieldValueException
- The value provided is out of range for the field type.
-
setValue
public void setValue(int index, float[] value, int numValid) throws InvalidFieldException, InvalidFieldValueException Set the value of the field at the given index as an array of floats. This would be used to set SFColor and SFVec3f field types.- Specified by:
setValue
in interfaceVRMLNodeType
- Overrides:
setValue
in classBaseTextureTransform3D
- Parameters:
index
- The index of destination field to setvalue
- The new value to use for the nodenumValid
- The number of valid values to copy from the array- Throws:
InvalidFieldException
- The index does not match a known fieldInvalidFieldValueException
- The value provided is out of range for the field type.
-
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
-