Package org.web3d.x3d.sai.Sound
Interface Sound
- All Superinterfaces:
X3DChildNode,X3DNode,X3DSoundNode
- All Known Implementing Classes:
SoundObject
public interface Sound extends X3DSoundNode
The Sound node controls the 3D spatialization of sound playback by a child AudioClip or MovieTexture node.
X3D node tooltip: [X3DSoundNode] The Sound node controls the 3D spatialization of sound playback by a child AudioClip or MovieTexture node. Sound intensity includes stereo support, varying according to user location and view direction in the scene.
Package hint: This interface is defined by the X3D Java Language Binding Specification for the Scene Authoring Interface (SAI).
X3D node tooltip: [X3DSoundNode] The Sound node controls the 3D spatialization of sound playback by a child AudioClip or MovieTexture node. Sound intensity includes stereo support, varying according to user location and view direction in the scene.
- Hint: if the audio source is stereo or multi-channel, channel separation is retained during playback.
- Warning: while providing sounds on the ground plane, ensure that the audible auralization ellipse is sufficiently elevated to match avatar height.
- Hint: X3D Sound component Figure 16.2 Sound Node Geometry, https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/sound.html#f-Soundnodegeometry
- Hint: X3D Scene Authoring Hints:Audio https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#Audio
Package hint: This interface is defined by the X3D Java Language Binding Specification for the Scene Authoring Interface (SAI).
-
Method Summary
Modifier and Type Method Description float[]getDirection()Provide array of 3-tuple float results from inputOutput SFVec3f field named direction.floatgetIntensity()Provide float value within allowed range of [0,1] from inputOutput SFFloat field named intensity.float[]getLocation()Provide array of 3-tuple float results from inputOutput SFVec3f field named location.floatgetMaxBack()Provide float value within allowed range of [0,infinity) from inputOutput SFFloat field named maxBack.floatgetMaxFront()Provide float value within allowed range of [0,infinity) from inputOutput SFFloat field named maxFront.X3DMetadataObjectgetMetadata()Provide X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.floatgetMinBack()Provide float value within allowed range of [0,infinity) from inputOutput SFFloat field named minBack.floatgetMinFront()Provide float value within allowed range of [0,infinity) from inputOutput SFFloat field named minFront.floatgetPriority()Provide float value within allowed range of [0,1] from inputOutput SFFloat field named priority.X3DSoundSourceNodegetSource()Provide X3DSoundSourceNode instance (using a properly typed node) from inputOutput SFNode field source.booleangetSpatialize()Provide boolean value from initializeOnly SFBool field named spatialize.SoundsetDirection(float[] newValue)Accessor method to assign 3-tuple float array to inputOutput SFVec3f field named direction.SoundsetIntensity(float newValue)Accessor method to assign float value to inputOutput SFFloat field named intensity.SoundsetLocation(float[] newValue)Accessor method to assign 3-tuple float array to inputOutput SFVec3f field named location.SoundsetMaxBack(float newValue)Accessor method to assign float value to inputOutput SFFloat field named maxBack.SoundsetMaxFront(float newValue)Accessor method to assign float value to inputOutput SFFloat field named maxFront.SoundsetMetadata(X3DMetadataObject newValue)Accessor method to assign X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.SoundsetMinBack(float newValue)Accessor method to assign float value to inputOutput SFFloat field named minBack.SoundsetMinFront(float newValue)Accessor method to assign float value to inputOutput SFFloat field named minFront.SoundsetPriority(float newValue)Accessor method to assign float value to inputOutput SFFloat field named priority.SoundsetSource(X3DSoundSourceNode newValue)Accessor method to assign X3DSoundSourceNode instance (using a properly typed node) to inputOutput SFNode field source.SoundsetSpatialize(boolean newValue)Accessor method to assign boolean value to initializeOnly SFBool field named spatialize.
-
Method Details
-
getDirection
float[] getDirection()Provide array of 3-tuple float results from inputOutput SFVec3f field named direction.
Tooltip: direction of sound axis, relative to local coordinate system. *- Returns:
- value of direction field
-
setDirection
Accessor method to assign 3-tuple float array to inputOutput SFVec3f field named direction.
Tooltip: direction of sound axis, relative to local coordinate system. *- Parameters:
newValue- is new value for the direction field.- Returns:
Sound- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getIntensity
float getIntensity()Provide float value within allowed range of [0,1] from inputOutput SFFloat field named intensity.
Tooltip: Factor [0,1] adjusting loudness (decibels) of emitted sound. *- Returns:
- value of intensity field
-
setIntensity
Accessor method to assign float value to inputOutput SFFloat field named intensity.
Tooltip: Factor [0,1] adjusting loudness (decibels) of emitted sound. *- Parameters:
newValue- is new value for the intensity field.- Returns:
Sound- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getLocation
float[] getLocation()Provide array of 3-tuple float results from inputOutput SFVec3f field named location.
Tooltip: Position of sound ellipsoid center, relative to local coordinate system.- Hint: improve audibility by setting location='0 1.6 0' so that center height of sound ellipsoid matches typical NavigationInfo avatarSize height.
- Returns:
- value of location field
-
setLocation
Accessor method to assign 3-tuple float array to inputOutput SFVec3f field named location.
Tooltip: Position of sound ellipsoid center, relative to local coordinate system.- Hint: improve audibility by setting location='0 1.6 0' so that center height of sound ellipsoid matches typical NavigationInfo avatarSize height.
- Parameters:
newValue- is new value for the location field.- Returns:
Sound- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getMaxBack
float getMaxBack()Provide float value within allowed range of [0,infinity) from inputOutput SFFloat field named maxBack.
Tooltip: Outer (zero loudness)ellipsoid distance along back direction.- Warning: ensure minBack <= maxBack.
- Returns:
- value of maxBack field
-
setMaxBack
Accessor method to assign float value to inputOutput SFFloat field named maxBack.
Tooltip: Outer (zero loudness)ellipsoid distance along back direction.- Warning: ensure minBack <= maxBack.
- Parameters:
newValue- is new value for the maxBack field.- Returns:
Sound- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getMaxFront
float getMaxFront()Provide float value within allowed range of [0,infinity) from inputOutput SFFloat field named maxFront.
Tooltip: Outer (zero loudness)ellipsoid distance along front direction.- Warning: ensure minFront <= maxFront.
- Returns:
- value of maxFront field
-
setMaxFront
Accessor method to assign float value to inputOutput SFFloat field named maxFront.
Tooltip: Outer (zero loudness)ellipsoid distance along front direction.- Warning: ensure minFront <= maxFront.
- Parameters:
newValue- is new value for the maxFront field.- Returns:
Sound- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getMetadata
X3DMetadataObject getMetadata()Provide X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.
Tooltip: [X3DMetadataObject] Information about this node can be contained in a MetadataBoolean, MetadataDouble, MetadataFloat, MetadataInteger, MetadataString or MetadataSet node.- Hint: X3D Architecture 7.2.4 Metadata https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/core.html#Metadata
- Specified by:
getMetadatain interfaceX3DChildNode- Specified by:
getMetadatain interfaceX3DNode- Specified by:
getMetadatain interfaceX3DSoundNode- Returns:
- value of metadata field
- See Also:
- X3D Scene Authoring Hints: Metadata Nodes
-
setMetadata
Accessor method to assign X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.
Tooltip: [X3DMetadataObject] Information about this node can be contained in a MetadataBoolean, MetadataDouble, MetadataFloat, MetadataInteger, MetadataString or MetadataSet node.- Hint: X3D Architecture 7.2.4 Metadata https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/core.html#Metadata
- Specified by:
setMetadatain interfaceX3DChildNode- Specified by:
setMetadatain interfaceX3DNode- Specified by:
setMetadatain interfaceX3DSoundNode- Parameters:
newValue- is new value for the metadata field.- Returns:
Sound- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).- See Also:
- X3D Scene Authoring Hints: Metadata Nodes
-
getMinBack
float getMinBack()Provide float value within allowed range of [0,infinity) from inputOutput SFFloat field named minBack.
Tooltip: Inner (full loudness) ellipsoid distance along back direction.- Warning: ensure minBack <= maxBack.
- Returns:
- value of minBack field
-
setMinBack
Accessor method to assign float value to inputOutput SFFloat field named minBack.
Tooltip: Inner (full loudness) ellipsoid distance along back direction.- Warning: ensure minBack <= maxBack.
- Parameters:
newValue- is new value for the minBack field.- Returns:
Sound- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getMinFront
float getMinFront()Provide float value within allowed range of [0,infinity) from inputOutput SFFloat field named minFront.
Tooltip: Inner (full loudness) ellipsoid distance along front direction.- Warning: ensure minFront <= maxFront.
- Returns:
- value of minFront field
-
setMinFront
Accessor method to assign float value to inputOutput SFFloat field named minFront.
Tooltip: Inner (full loudness) ellipsoid distance along front direction.- Warning: ensure minFront <= maxFront.
- Parameters:
newValue- is new value for the minFront field.- Returns:
Sound- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getPriority
float getPriority()Provide float value within allowed range of [0,1] from inputOutput SFFloat field named priority.
Tooltip: Player hint [0,1] if needed to choose which sounds to play. *- Returns:
- value of priority field
-
setPriority
Accessor method to assign float value to inputOutput SFFloat field named priority.
Tooltip: Player hint [0,1] if needed to choose which sounds to play. *- Parameters:
newValue- is new value for the priority field.- Returns:
Sound- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getSource
X3DSoundSourceNode getSource()Provide X3DSoundSourceNode instance (using a properly typed node) from inputOutput SFNode field source.
Tooltip: [X3DSoundSourceNode] sound source for the Sound node, either an AudioClip node or a MovieTexture node.- Warning: if source field is not specified, the Sound node does not emit audio.
- Returns:
- value of source field
-
setSource
Accessor method to assign X3DSoundSourceNode instance (using a properly typed node) to inputOutput SFNode field source.
Tooltip: [X3DSoundSourceNode] sound source for the Sound node, either an AudioClip node or a MovieTexture node.- Warning: if source field is not specified, the Sound node does not emit audio.
- Parameters:
newValue- is new value for the source field.- Returns:
Sound- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getSpatialize
boolean getSpatialize()Provide boolean value from initializeOnly SFBool field named spatialize.
Tooltip: Whether to spatialize sound playback relative to viewer.- Hint: only effective between minimum and maximum ellipsoids.
- Returns:
- value of spatialize field
-
setSpatialize
Accessor method to assign boolean value to initializeOnly SFBool field named spatialize.
Tooltip: Whether to spatialize sound playback relative to viewer.- Hint: only effective between minimum and maximum ellipsoids.
- Parameters:
newValue- is new value for the spatialize field.- Returns:
Sound- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-