javax.media.j3d
Class ConeSoundRetained

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
                          extended by javax.media.j3d.ConeSoundRetained
All Implemented Interfaces:
java.lang.Cloneable, NnuId

 class ConeSoundRetained
extends PointSoundRetained

A ConeSoundRetained node defines a point sound source located at some location in space whose amplitude is constrained not only by maximum and minimum amplitude spheres but by two concentric cone volumes directed down an vector radiating from the sound's location.


Field Summary
(package private)  float[] angularDistance
           
(package private)  float[] angularGain
           
(package private)  float[] backAttenuationDistance
           
(package private)  float[] backAttenuationGain
           
(package private)  Vector3f direction
          The Cone Sound's direction vector.
(package private)  int filterType
           
(package private)  float[] frequencyCutoff
           
(package private) static int LOW_PASS
           
(package private) static int NO_FILTERING
           
(package private)  Vector3f xformDirection
           
 
Fields inherited from class javax.media.j3d.PointSoundRetained
attenuationDistance, attenuationGain, position, trans, xformPosition
 
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
ConeSoundRetained()
           
 
Method Summary
(package private)  void getAngularAttenuation(float[] distance, float[] gain, float[] filter)
          Retrieves angular attenuation including gain and filter returned as separate arrays
(package private)  void getAngularAttenuation(Point3f[] attenuation)
          Retrieves angular attenuation including gain and filter in a single array
(package private)  int getAngularAttenuationLength()
          Retrieves angular attenuation array length.
(package private)  void getBackDistanceGain(float[] distance, float[] gain)
          Retieves this sound's back attenuation distance and gain arrays, returned in separate arrays.
(package private)  void getBackDistanceGain(Point2f[] attenuation)
          Retieves sound's back distance attenuation Put the contents of the two separate distance and gain arrays into an array of Point2f.
(package private)  void getDirection(Vector3f direction)
          Retrieves this sound's direction and places it in the vector provided.
(package private)  void getDistanceGain(float[] frontDistance, float[] frontGain, float[] backDistance, float[] backGain)
          Gets this sound's elliptical distance gain attenuation values in separate arrays
(package private)  void getDistanceGain(Point2f[] frontAttenuation, Point2f[] backAttenuation)
          Gets this sound's elliptical distance attenuation
(package private)  void getXformDirection(Vector3f direction)
           
(package private)  void initMirrorObject(ConeSoundRetained ms)
           
(package private)  void mergeTransform(TransformGroupRetained xform)
           
(package private)  void setAngularAttenuation(float[] distance, float[] gain, float[] filter)
          Sets angular attenuation including gain and filter using separate arrays
(package private)  void setAngularAttenuation(Point2f[] attenuation)
          Sets this sound's angular gain attenuation (not including filter)
(package private)  void setAngularAttenuation(Point3f[] attenuation)
          Sets this sound's angular attenuation including both gain and filter.
(package private)  void setBackDistanceGain(float[] distance, float[] gain)
          Sets this sound's back distance gain attenuation as an array of Point2fs.
(package private)  void setBackDistanceGain(Point2f[] attenuation)
          Sets this sound's back distance gain attenuation - where gain scale factor is applied to sound based on distance listener along the negative sound direction axis from sound source.
(package private)  void setDirection(float x, float y, float z)
          Sets this sound's direction from the three values provided.
(package private)  void setDirection(Vector3f direction)
          Sets this sound's direction from the vector provided.
(package private)  void setDistanceGain(float[] frontDistance, float[] frontGain, float[] backDistance, float[] backGain)
          Sets this sound's distance gain attenuation as an array of Point2fs.
(package private)  void setDistanceGain(Point2f[] frontAttenuation, Point2f[] backAttenuation)
          Sets this sound's distance gain elliptical attenuation - where gain scale factor is applied to sound based on distance listener is from sound source.
(package private)  void updateMirrorObject(java.lang.Object[] objs)
          This updates the Direction fields of cone sound.
(package private)  void updateTransformChange()
           
 
Methods inherited from class javax.media.j3d.PointSoundRetained
getDistanceGain, getDistanceGain, getDistanceGainLength, getPosition, getXformPosition, initMirrorObject, setDistanceGain, setDistanceGain, setPosition, setPosition
 
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

direction

Vector3f direction
The Cone Sound's direction vector. This is the cone axis.


xformDirection

Vector3f xformDirection

NO_FILTERING

static final int NO_FILTERING
See Also:
Constant Field Values

LOW_PASS

static final int LOW_PASS
See Also:
Constant Field Values

backAttenuationDistance

float[] backAttenuationDistance

backAttenuationGain

float[] backAttenuationGain

angularDistance

float[] angularDistance

angularGain

float[] angularGain

filterType

int filterType

frequencyCutoff

float[] frequencyCutoff
Constructor Detail

ConeSoundRetained

ConeSoundRetained()
Method Detail

setDistanceGain

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

Parameters:
frontAttenuation - defined by pairs of (distance,gain-scale-factor)
backAttenuation - defined by pairs of (distance,gain-scale-factor)
Throws:
CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph

setDistanceGain

void setDistanceGain(float[] frontDistance,
                     float[] frontGain,
                     float[] backDistance,
                     float[] backGain)
Sets this sound's distance gain attenuation as an array of Point2fs.

Parameters:
frontDistance - array of monotonically-increasing floats
frontGain - array of non-negative scale factors
backDistance - array of monotonically-increasing floats
backGain - array of non-negative scale factors
Throws:
CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph

setBackDistanceGain

void setBackDistanceGain(Point2f[] attenuation)
Sets this sound's back distance gain attenuation - where gain scale factor is applied to sound based on distance listener along the negative sound direction axis from sound source.

Parameters:
attenuation - defined by pairs of (distance,gain-scale-factor)
Throws:
CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph

setBackDistanceGain

void setBackDistanceGain(float[] distance,
                         float[] gain)
Sets this sound's back distance gain attenuation as an array of Point2fs.

Parameters:
distance - array of monotonically-increasing floats
gain - array of non-negative scale factors
Throws:
CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph

getDistanceGain

void getDistanceGain(Point2f[] frontAttenuation,
                     Point2f[] backAttenuation)
Gets this sound's elliptical distance attenuation

Parameters:
frontAttenuation - arrays containing forward distances attenuation pairs
backAttenuation - arrays containing backward distances attenuation pairs
Throws:
CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph

getDistanceGain

void getDistanceGain(float[] frontDistance,
                     float[] frontGain,
                     float[] backDistance,
                     float[] backGain)
Gets this sound's elliptical distance gain attenuation values in separate arrays

Parameters:
frontDistance - array of float distances along the sound axis
fronGain - array of non-negative scale factors associated with front distances
backDistance - array of float negative distances along the sound axis
backGain - array of non-negative scale factors associated with back distances
Throws:
CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph

getBackDistanceGain

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

Parameters:
attenuation - containing distance attenuation pairs

getBackDistanceGain

void getBackDistanceGain(float[] distance,
                         float[] gain)
Retieves this sound's back 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.

setDirection

void setDirection(Vector3f direction)
Sets this sound's direction from the vector provided.

Parameters:
direction - the new direction

setDirection

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

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

getDirection

void getDirection(Vector3f direction)
Retrieves this sound's direction and places it in the vector provided.


getXformDirection

void getXformDirection(Vector3f direction)

setAngularAttenuation

void setAngularAttenuation(Point2f[] attenuation)
Sets this sound's angular gain attenuation (not including filter)

Parameters:
attenuation - array containing angular distance and gain

setAngularAttenuation

void setAngularAttenuation(Point3f[] attenuation)
Sets this sound's angular attenuation including both gain and filter.

Parameters:
attenuation - array containing angular distance, gain and filter

setAngularAttenuation

void setAngularAttenuation(float[] distance,
                           float[] gain,
                           float[] filter)
Sets angular attenuation including gain and filter using separate arrays

Parameters:
distance - array containing angular distance
filter - array containing angular low-pass frequency cutoff values

getAngularAttenuationLength

int getAngularAttenuationLength()
Retrieves angular attenuation array length. All arrays are forced to same size

Throws:
CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph

getAngularAttenuation

void getAngularAttenuation(Point3f[] attenuation)
Retrieves angular attenuation including gain and filter in a single array

Parameters:
attenuation - applied to gain when listener is between cones

getAngularAttenuation

void getAngularAttenuation(float[] distance,
                           float[] gain,
                           float[] filter)
Retrieves angular attenuation including gain and filter returned as separate arrays

Parameters:
distance - array containing angular distance
gain - array containing angular gain attenuation
filter - array containing angular low-pass frequency cutoff values

updateMirrorObject

void updateMirrorObject(java.lang.Object[] objs)
This updates the Direction fields of cone sound. Neither Angular gain Attenuation and Filtering fields, nor back distance gain not maintained in mirror object

Overrides:
updateMirrorObject in class PointSoundRetained

initMirrorObject

void initMirrorObject(ConeSoundRetained ms)

updateTransformChange

void updateTransformChange()
Overrides:
updateTransformChange in class PointSoundRetained

mergeTransform

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


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