Aviatrix3D 1.0

org.j3d.aviatrix3d
Class ConeSound

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
                      extended byorg.j3d.aviatrix3d.ConeSound
All Implemented Interfaces:
AudioRenderable, AudioUpdateListener

public class ConeSound
extends PointSound

A ConeSound class which emits a conical sound in one direction.

By default this class is mimics a PointSound. You must provide parameters for the direction and cone angles to make it directional. The sound will attenuate by distance based on the refDistance and maxDistance parameters.

Version:
$Revision: 1.5 $
Author:
Alan Hudson

Field Summary
 
Fields inherited from class org.j3d.aviatrix3d.PointSound
maxDistance, refDistance, rolloffFactor
 
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
ConeSound()
          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 setInnerAngle(float angle)
          Set the inner angle for the cone.
 void setOuterAngle(float angle)
          Set the outer angle for the cone.
 void setRefDistance(float[] dir)
          Set the direction.
 
Methods inherited from class org.j3d.aviatrix3d.PointSound
setMaxDistance, setRefDistance, setRolloffFactor
 
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
 

Constructor Detail

ConeSound

public ConeSound()
Creates a sound.

Method Detail

setRefDistance

public void setRefDistance(float[] dir)
Set the direction.

Parameters:
dir - The direction to emit sound.

setInnerAngle

public void setInnerAngle(float angle)
Set the inner angle for the cone.

Parameters:
angle - The inner angle

setOuterAngle

public void setOuterAngle(float angle)
Set the outer angle for the cone.

Parameters:
angle - The outer angle

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 PointSound
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 PointSound

isEnabled

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

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

Aviatrix3D 1.0

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