Class BaseTextureNode
java.lang.Object
org.web3d.vrml.renderer.common.nodes.AbstractNode
org.web3d.vrml.renderer.common.nodes.BaseTextureNode
- All Implemented Interfaces:
VRMLNode,FrameStateListener,VRMLAppearanceChildNodeType,VRMLNodeType,VRMLTextureNodeType
- Direct Known Subclasses:
BaseComposedCubeMapTexture,BaseImageCubeMapTexture,BaseMultiTexture,BasePixelCubeMapTexture,BaseTexture2DNode,BaseTexture3DNode
Base implementation of a texture object.
- Version:
- $Revision: 1.5 $
- Author:
- Alan Hudson
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<VRMLTextureListener> List to contain interested listeners.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
ConstructorsModifierConstructorDescriptionprotectedBaseTextureNode(String name) Construct a new base representation of a texture node/ -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a listener for texture changes.protected voidfireTextureImageChanged(int idx, VRMLNodeType node, NIOBufferImage image, String url) Fire a textureImageChanged event to the listeners.protected voidfireTextureParamsChanged(int len, VRMLNodeType node, int[] mode, int[] source, int[] function, float alpha, float[] color) Fire a textureParamsChanged event to the listeners.getCacheString(int stage) Get a string for caching this object.voidRemoves a listener for texture changes.Methods inherited from class org.web3d.vrml.renderer.common.nodes.AbstractNode
addNodeListener, allEventsComplete, checkNodeType, checkSecondaryType, checkSecondaryType, clearRemovedLayerIds, fireFieldChanged, getFieldValue, getLayerIds, getMetadataObject, getRefCount, getRemovedLayerIds, getSecondaryType, getUserData, getVRMLNodeName, hasFieldChanged, isDEF, isSetupFinished, notifyExternProtoLoaded, removeNodeListener, sendRoute, setDEF, setErrorReporter, setFrameStateManager, setMetadataObject, setupFinished, setUserData, setValue, setValue, 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, setupFinished, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, updateRefCountMethods inherited from interface org.web3d.vrml.nodes.VRMLTextureNodeType
getTextureType
-
Field Details
-
listenerList
List to contain interested listeners.
-
-
Constructor Details
-
BaseTextureNode
Construct a new base representation of a texture node/- Parameters:
name- The name of the type of node
-
-
Method Details
-
getCacheString
Get a string for caching this object. Default implementation returns null.- Specified by:
getCacheStringin interfaceVRMLTextureNodeType- Parameters:
stage- The stage number, 0 for all single stage textures- Returns:
- A string to use in lookups. Typically the url loaded.
-
addTextureListener
Add a listener for texture changes. If the listener is already registered then this request is ignored.- Specified by:
addTextureListenerin interfaceVRMLTextureNodeType- Parameters:
l- The listener instance to be added
-
removeTextureListener
Removes a listener for texture changes. If the listener is not already registered, the request is ignored.- Specified by:
removeTextureListenerin interfaceVRMLTextureNodeType- Parameters:
l- The listener to be removed
-
fireTextureImageChanged
protected void fireTextureImageChanged(int idx, VRMLNodeType node, NIOBufferImage image, String url) Fire a textureImageChanged event to the listeners.- Parameters:
idx- The stagenode- The node which changedimage- The new imageurl- The url used to load or null.
-
fireTextureParamsChanged
protected void fireTextureParamsChanged(int len, VRMLNodeType node, int[] mode, int[] source, int[] function, float alpha, float[] color) Fire a textureParamsChanged event to the listeners.- Parameters:
len- The number of stagesnode- The node which changedmode- The list of modessource-function-alpha-color-
-