Aviatrix3D 1.0

org.j3d.aviatrix3d
Class PointSound

java.lang.Object
  extended byorg.j3d.aviatrix3d.SceneGraphObject
      extended byorg.j3d.aviatrix3d.Node
          extended byorg.j3d.aviatrix3d.Leaf
              extended byorg.j3d.aviatrix3d.Sound
                  extended byorg.j3d.aviatrix3d.PointSound
All Implemented Interfaces:
AudioRenderable, AudioUpdateListener
Direct Known Subclasses:
ConeSound

public class PointSound
extends Sound

A PointSound class which emits sound in all directions from a point.

The sound will attenuate by distance based on the refDistance and maxDistance parameters.

Version:
$Revision: 1.5 $
Author:
Alan Hudson

Field Summary
protected  float maxDistance
          Maximum distance of a source.
protected  float refDistance
          The distance when gain rolloff starts
protected  float rolloffFactor
          How quickly does the sound decrease over distance.
 
Fields inherited from class org.j3d.aviatrix3d.Sound
buffer, dataChanged, format, freq, loop, paramsChanged, paused, pitch, playChanged, playing, seq, soundSource
 
Fields inherited from class org.j3d.aviatrix3d.Node
bounds, implicitBounds, INVALID_BOUNDS, parent
 
Fields inherited from class org.j3d.aviatrix3d.SceneGraphObject
alive, LISTENER_SET_NOT_LIVE_MESSAGE, updateHandler, WRITE_TIMING_MSG
 
Constructor Summary
PointSound()
          Creates a sound.
 
Method Summary
 boolean isEnabled()
          State check to see whether the sound is enabled.
 void postRender(net.java.games.joal.AL al)
           
 void render(net.java.games.joal.AL al, javax.vecmath.Matrix4f transform)
          This method is called to render this node.
 void setMaxDistance(float distance)
          Set the distance when gain rolloff reaches zero.
 void setRefDistance(float distance)
          Set the distance when gain rolloff starts.
 void setRolloffFactor(float factor)
          Set the rollloffFactor.
 
Methods inherited from class org.j3d.aviatrix3d.Sound
audioUpdated, checkForCyclicChild, getBounds, isPaused, isPlaying, markBoundsDirty, paramsUpdated, pauseSound, recomputeBounds, requestBoundsUpdate, setAudioSource, setLive, setUpdateHandler, startSound, stopSound
 
Methods inherited from class org.j3d.aviatrix3d.Node
boundsChanged, checkForCyclicParent, getParent, removeParent, setBounds, setParent, updateBounds, updateParentBounds
 
Methods inherited from class org.j3d.aviatrix3d.SceneGraphObject
dataChanged, getUserData, isLive, setUserData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

refDistance

protected float refDistance
The distance when gain rolloff starts


maxDistance

protected float maxDistance
Maximum distance of a source. Used to clamp distance attenuation


rolloffFactor

protected float rolloffFactor
How quickly does the sound decrease over distance.

Constructor Detail

PointSound

public PointSound()
Creates a sound.

Method Detail

setRefDistance

public void setRefDistance(float distance)
Set the distance when gain rolloff starts.

Parameters:
distance - The distance in units

setMaxDistance

public void setMaxDistance(float distance)
Set the distance when gain rolloff reaches zero.

Parameters:
distance - The distance in units

setRolloffFactor

public void setRolloffFactor(float factor)
Set the rollloffFactor.

Parameters:
factor -

render

public void render(net.java.games.joal.AL al,
                   javax.vecmath.Matrix4f transform)
This method is called to render this node. All openGL commands needed to render the node should be executed. Any transformations needed should be added to the transformation stack premultiplied. This method must be re-entrant as it can be called from multiple places at once.

Overrides:
render in class Sound
Parameters:
al - The al context to render with
transform - The transformation stack to this node

postRender

public void postRender(net.java.games.joal.AL al)
Overrides:
postRender in class Sound

isEnabled

public boolean isEnabled()
State check to see whether the sound is enabled.

Overrides:
isEnabled in class Sound
Returns:
true if the sound has something to render

Aviatrix3D 1.0

Latest Info from http://aviatrix3d.j3d.org/
Copyright © 2003 - 2005 j3d.org