javax.media.j3d
Class PointSoundRetained

java.lang.Object
  extended by javax.media.j3d.IndexedObject
      extended by javax.media.j3d.SceneGraphObjectRetained
          extended by javax.media.j3d.NodeRetained
              extended by javax.media.j3d.LeafRetained
                  extended by javax.media.j3d.SoundRetained
                      extended by javax.media.j3d.PointSoundRetained
All Implemented Interfaces:
java.lang.Cloneable, NnuId
Direct Known Subclasses:
ConeSoundRetained

 class PointSoundRetained
extends SoundRetained

The PointSoundRetained node (a sub-class of the SoundRetained node) defines a spatially-located sound source whose waves radiate uniformly in all directions from a given location in space.


Field Summary
(package private)  float[] attenuationDistance
           
(package private)  float[] attenuationGain
           
(package private)  Point3f position
          Origin of Sound source in Listener's space.
(package private)  Transform3D trans
           
(package private)  Point3f xformPosition
          The transformed position of this sound
 
Fields inherited from class javax.media.j3d.SoundRetained
ALL_ATTIBS_DIRTY_BITS, ALL_STATE_DIRTY_BITS, ANGULAR_ATTENUATION_DIRTY_BIT, ATTRIBUTE_DIRTY_BITS, BACK_DISTANCE_GAIN_DIRTY_BIT, BOUNDING_LEAF_DIRTY_BIT, boundingLeaf, BOUNDS_CHANGED, BOUNDS_DIRTY_BIT, continuous, CONTINUOUS_DIRTY_BIT, debugFlag, DIRECTION_DIRTY_BIT, DIRECTIONAL_DIRTY_BITS, DISTANCE_GAIN_DIRTY_BIT, duration, enable, ENABLE_DIRTY_BIT, IMMEDIATE_MODE_DIRTY_BIT, inImmCtx, INITIAL_GAIN_DIRTY_BIT, initialGain, internalErrors, isViewScoped, key, LIVE_DIRTY_BIT, LOAD_COMPLETE, LOAD_FAILED, LOAD_NULL, LOAD_PENDING, LOAD_SOUND_DIRTY_BIT, loadStatus, LOOP_COUNT_DIRTY_BIT, loopCount, mirrorSounds, mute, MUTE_DIRTY_BIT, NULL_SOUND, numMirrorSounds, pause, PAUSE_DIRTY_BIT, POSITION_DIRTY_BIT, POSITIONAL_DIRTY_BITS, priority, PRIORITY_DIRTY_BIT, rate, RATE_DIRTY_BIT, release, RELEASE_DIRTY_BIT, schedulingRegion, sgSound, SOUND_DATA_DIRTY_BIT, soundData, soundType, targetThreads, transformedRegion, XFORM_DIRTY_BIT
 
Fields inherited from class javax.media.j3d.LeafRetained
boundsDirty, switchState
 
Fields inherited from class javax.media.j3d.NodeRetained
ALTERNATEAPPEARANCE, AMBIENTLIGHT, apiBounds, BACKGROUND, BACKGROUNDSOUND, BEHAVIOR, BOUNDINGLEAF, boundsAutoCompute, BRANCHGROUP, branchGroupPaths, cachedBounds, childIndex, CLIP, collidable, CONESOUND, CONTAINS_VIEWPLATFORM, CURRENT_LOCAL_TO_VWORLD, DECALGROUP, DIRECTIONALLIGHT, EXPONENTIALFOG, geometryBackground, GROUP, inSharedGroup, LAST_LOCAL_TO_VWORLD, LINEARFOG, LINK, localBounds, locale, localToVworld, localToVworldIndex, localToVworldKeys, MODELCLIP, MORPH, nnuId, nodeId, nodeType, NUMNODES, ORDEREDGROUP, orderedId, ORIENTEDSHAPE3D, parent, parentSwitchLink, parentTransformLink, pickable, POINTLIGHT, POINTSOUND, refCount, SHAPE, SHAREDGROUP, SOUNDSCAPE, SPOTLIGHT, staticTransform, SWITCH, TRANSFORMGROUP, universe, validCachedBounds, VIEWPLATFORM, VIEWSPECIFICGROUP
 
Fields inherited from class javax.media.j3d.SceneGraphObjectRetained
DONT_MERGE, inBackgroundGroup, inSetLive, MERGE, MERGE_DONE, mergeFlag, onUpdateList, source
 
Fields inherited from class javax.media.j3d.IndexedObject
listIdx
 
Constructor Summary
PointSoundRetained()
           
 
Method Summary
(package private)  void getDistanceGain(float[] distance, float[] gain)
          Retieves this sound's attenuation distance and gain arrays, returned in separate arrays.
(package private)  void getDistanceGain(Point2f[] attenuation)
          Retieves sound's distance attenuation Put the contents of the two separate distance and gain arrays into an array of Point2f.
(package private)  int getDistanceGainLength()
          Gets this sound's distance attenuation array length
(package private)  void getPosition(Point3f position)
          Retrieves this sound's location and places it in the vector provided.
(package private)  void getXformPosition(Point3f position)
           
(package private)  void initMirrorObject(PointSoundRetained ms)
           
(package private)  void mergeTransform(TransformGroupRetained xform)
           
(package private)  void setDistanceGain(float[] distance, float[] gain)
          Sets this sound's distance gain given separate arrays.
(package private)  void setDistanceGain(Point2f[] attenuation)
          Sets this sound's distance gain attenuation - where gain scale factor is applied to sound based on distance listener is from sound source.
(package private)  void setPosition(float x, float y, float z)
          Sets this sound's position from the three values provided.
(package private)  void setPosition(Point3f position)
          Sets this sound's location from the vector provided.
(package private)  void updateMirrorObject(java.lang.Object[] objs)
          This updates the positional fields of point sound.
(package private)  void updateTransformChange()
           
 
Methods inherited from class javax.media.j3d.SoundRetained
changeAtomList, clearLive, debugPrint, dispatchAttribChange, dispatchStateChange, getContinuousEnable, getDuration, getEnable, getInImmCtx, getInitialGain, getLoop, getMirrorObjects, getMirrorSound, getMute, getNumberOfChannelsUsed, getNumberOfChannelsUsed, getPause, getPriority, getRateScaleFactor, getReleaseEnable, getSchedulingBoundingLeaf, getSchedulingBounds, getSoundData, initMirrorObject, isPlaying, isPlaying, isPlayingSilently, isPlayingSilently, isReady, isReady, setContinuousEnable, setEnable, setInImmCtx, setInitialGain, setLive, setLoop, setMute, setPause, setPriority, setRateScaleFactor, setReleaseEnable, setSchedulingBoundingLeaf, setSchedulingBounds, setSoundData, setSoundDataState, updateBoundingLeaf
 
Methods inherited from class javax.media.j3d.LeafRetained
clone, updateBoundingLeaf, updateBounds
 
Methods inherited from class javax.media.j3d.NodeRetained
computeCombineBounds, computeNonLiveLocalToVworld, dirtyBoundsCache, doSetLive, equal, findCollidableFlags, findPickableFlags, findTransformLevels, getBounds, getBoundsAutoCompute, getCollidable, getCurrentLocalToVworld, getCurrentLocalToVworld, getCurrentLocalToVworld, getEffectiveBounds, getId, getLastLocalToVworld, getLastLocalToVworld, getLastLocalToVworld, getLocalBounds, getLocale, getLocalToVworld, getLocalToVworld, getLocalToVworld, getParent, getPickable, getVirtualUniverse, isStatic, merge, notifySceneGraphChanged, processViewSpecificInfo, recombineAbove, removeNodeData, searchGeometryAtoms, setAuxData, setBounds, setBoundsAutoCompute, setCollidable, setNodeData, setParent, setPickable, transformBounds, updateCollidable, updateLocalToVworld, updatePickable
 
Methods inherited from class javax.media.j3d.SceneGraphObjectRetained
clearLive, clearLive, clone, compile, doSetLive, getSource, handleFrequencyChange, isInSetLive, markAsLive, setCompiled, setLive, setSource, traverse
 
Methods inherited from class javax.media.j3d.IndexedObject
getIdxUsed, incIdxUsed
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

position

Point3f position
Origin of Sound source in Listener's space.


xformPosition

Point3f xformPosition
The transformed position of this sound


trans

Transform3D trans

attenuationDistance

float[] attenuationDistance

attenuationGain

float[] attenuationGain
Constructor Detail

PointSoundRetained

PointSoundRetained()
Method Detail

setPosition

void setPosition(Point3f position)
Sets this sound's location from the vector provided.

Parameters:
position - the new location

setPosition

void setPosition(float x,
                 float y,
                 float z)
Sets this sound's position from the three values provided.

Parameters:
x - the new x position
y - the new y position
z - the new z position

getPosition

void getPosition(Point3f position)
Retrieves this sound's location and places it in the vector provided.

Parameters:
position - the variable to receive the location vector

getXformPosition

void getXformPosition(Point3f position)

setDistanceGain

void setDistanceGain(Point2f[] attenuation)
Sets this sound's distance gain attenuation - where gain scale factor is applied to sound based on distance listener is from sound source.

Parameters:
distance - attenuation pairs of (distance,gain-scale-factor)

setDistanceGain

void setDistanceGain(float[] distance,
                     float[] gain)
Sets this sound's distance gain given separate arrays. applied to sound based on distance listener is from sound source.

Parameters:
distance - array of monotonically-increasing floats.
gain - array of amplitude scale factors associated with distances.

getDistanceGainLength

int getDistanceGainLength()
Gets this sound's distance attenuation array length

Returns:
distance gain attenuation array length

getDistanceGain

void getDistanceGain(Point2f[] attenuation)
Retieves sound's distance attenuation Put the contents of the two separate distance and gain arrays into an array of Point2f.

Parameters:
attenuation - containing distance attenuation pairs

getDistanceGain

void getDistanceGain(float[] distance,
                     float[] gain)
Retieves this sound's attenuation distance and gain arrays, returned in separate arrays.

Parameters:
distance - array of monotonically-increasing floats.
gain - array of amplitude scale factors associated with distances.

updateMirrorObject

void updateMirrorObject(java.lang.Object[] objs)
This updates the positional fields of point sound. Distance gain attenuation field not maintained in mirror object.

Overrides:
updateMirrorObject in class SoundRetained

initMirrorObject

void initMirrorObject(PointSoundRetained ms)

updateTransformChange

void updateTransformChange()
Overrides:
updateTransformChange in class SoundRetained

mergeTransform

void mergeTransform(TransformGroupRetained xform)
Overrides:
mergeTransform in class SoundRetained


Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.