Class OGLAudioClip
java.lang.Object
org.web3d.vrml.renderer.common.nodes.AbstractNode
org.web3d.vrml.renderer.common.nodes.BaseTimeDependentNode
org.web3d.vrml.renderer.common.nodes.BaseTimeControlledNode
org.web3d.vrml.renderer.common.nodes.sound.BaseAudioClip
org.web3d.vrml.renderer.ogl.nodes.sound.OGLAudioClip
- All Implemented Interfaces:
VRMLNode,FrameStateListener,VRMLAudioClipNodeType,VRMLChildNodeType,VRMLExternalNodeType,VRMLNodeType,VRMLSingleExternalNodeType,VRMLTimeControlledNodeType,VRMLTimeDependentNodeType,VRMLTimeListener,VRMLWorldRootChildNodeType,OGLVRMLNode
AudioClip node implementation for OpenGL.
- Version:
- $Revision: 1.4 $
- Author:
- Alan Hudson
-
Field Summary
Fields inherited from class org.web3d.vrml.renderer.common.nodes.sound.BaseAudioClip
fieldDecl, fieldMap, vfDescription, vfDuration, vfIsActive, vfIsPaused, vfPitch, vfUrlFields inherited from class org.web3d.vrml.renderer.common.nodes.BaseTimeControlledNode
FIELD_ELAPSED_TIME, FIELD_LOOP, FIELD_PAUSE_TIME, FIELD_RESUME_TIME, FIELD_START_TIME, FIELD_STOP_TIME, LAST_TIME_INDEX, vfElapsedTime, vfLoop, vfPauseTime, vfResumeTime, vfStartTime, vfStopTimeFields inherited from class org.web3d.vrml.renderer.common.nodes.BaseTimeDependentNode
vrmlClockFields 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, vrmlMinorVersionFields inherited from interface org.web3d.vrml.nodes.VRMLExternalNodeType
LOAD_COMPLETE, LOAD_FAILED, LOADING, NOT_LOADED -
Constructor Summary
ConstructorsConstructorDescriptionEmpty constructor.OGLAudioClip(VRMLNodeType node) Construct a new instance of this node based on the details from the given node. -
Method Summary
Modifier and TypeMethodDescriptionorg.j3d.aviatrix3d.SceneGraphObjectGet the Java3D scene graph object representation of this node.voidsetCapabilityOverrideMap(Map capBits, Map freqBits) Provide the set of mappings that override anything that the loader might set.voidsetCapabilityRequiredMap(Map capBits, Map freqBits) Set the mapping of capability bits that the user would like to make sure is set.voidsetContent(String mimetype, Object content) setContent is called when the content has been loaded.voidsetLoop(boolean loop) Set the loop variable.voidsetPitch(float newPitch) Sets a new value for this node's pitch.voidNotification that the construction phase of this node has finished.Methods inherited from class org.web3d.vrml.renderer.common.nodes.sound.BaseAudioClip
addContentStateListener, addSoundStateListener, addUrlListener, allEventsComplete, checkValidContentType, copy, fireContentStateChanged, fireSoundStateChanged, fireUrlChanged, getDescription, getDuration, getFieldDeclaration, getFieldIndex, getFieldValue, getIsActive, getLoadState, getNodeFieldIndices, getNumFields, getPitch, getPrimaryType, getSecondaryType, getUrl, getWorldUrl, removeContentStateListener, removeSoundStateListener, removeUrlListener, sendRoute, setDescription, setDuration, setIsActive, setLoadedURI, setLoadState, setStartTime, setStopTime, setUrl, setValue, setValue, setValue, setVRMLClock, setWorldUrl, timeClickMethods inherited from class org.web3d.vrml.renderer.common.nodes.BaseTimeControlledNode
copy, getLoop, getStartTime, getStopTime, setPauseTime, setResumeTime, setValue, setValueMethods inherited from class org.web3d.vrml.renderer.common.nodes.AbstractNode
addNodeListener, 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, 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, updateRefCountMethods inherited from interface org.web3d.vrml.nodes.VRMLTimeControlledNodeType
getLoop, getStartTime, getStopTime
-
Constructor Details
-
OGLAudioClip
public OGLAudioClip()Empty constructor. -
OGLAudioClip
Construct a new instance of this node based on the details from the given node. If the node is not a Sound node, an exception will be thrown. It does not copy the source node, just this node.- Parameters:
node- The node to copy- Throws:
IllegalArgumentException- The node is not a compatible node
-
-
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:
getSceneGraphObjectin interfaceOGLVRMLNode- Returns:
- The OGL representation.
-
setupFinished
public void setupFinished()Description copied from interface:VRMLNodeTypeNotification 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. It is then responsible for calling its children's setupFinished.- Specified by:
setupFinishedin interfaceVRMLNodeType- Overrides:
setupFinishedin classAbstractNode
-
setLoop
public void setLoop(boolean loop) Set the loop variable. Override the base class.- Specified by:
setLoopin interfaceVRMLTimeControlledNodeType- Overrides:
setLoopin classBaseAudioClip- Parameters:
loop-
-
setPitch
Sets a new value for this node's pitch. The value must be > 0.- Specified by:
setPitchin interfaceVRMLAudioClipNodeType- Overrides:
setPitchin classBaseAudioClip- Parameters:
newPitch- New value for pitch.- Throws:
InvalidFieldValueException- Pitch is <= 0
-
setCapabilityOverrideMap
Provide the set of mappings that override anything that the loader might set. Default implementation does nothing.If the key is set, but the value is null or zero length, then all capabilities on that node will be disabled. If the key is set the values override all settings that the loader may wish to normally make. This can be very dangerous if the loader is used for a file format that includes its own internal animation engine, so be very careful with this request.
- Parameters:
capBits- The capability bits to be setfreqBits- The frequency bits to be set
-
setCapabilityRequiredMap
Set the mapping of capability bits that the user would like to make sure is set. The end output is that the capabilities are the union of what the loader wants and what the user wants. Default implementation does nothing.If the map contains a key, but the value is null or zero length, the request is ignored.
- Parameters:
capBits- The capability bits to be setfreqBits- The frequency bits to be set
-
setContent
setContent is called when the content has been loaded. We require that the content object be an InputStream- Specified by:
setContentin interfaceVRMLSingleExternalNodeType- Overrides:
setContentin classBaseAudioClip- Parameters:
mimetype- The mime type of this object if knowncontent- The content of the object- Throws:
IllegalArgumentException- The content object is not supported
-