org.j3d.aviatrix3d
Class ConeSound
java.lang.Object
org.j3d.aviatrix3d.SceneGraphObject
org.j3d.aviatrix3d.Node
org.j3d.aviatrix3d.Leaf
org.j3d.aviatrix3d.Sound
org.j3d.aviatrix3d.PointSound
org.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
Fields inherited from class org.j3d.aviatrix3d.Sound |
buffer, dataChanged, format, freq, loop, paramsChanged, paused, pitch, playChanged, playing, seq, soundSource |
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.Sound |
audioUpdated, checkForCyclicChild, getBounds, isPaused, isPlaying, markBoundsDirty, paramsUpdated, pauseSound, recomputeBounds, requestBoundsUpdate, setAudioSource, setLive, setUpdateHandler, startSound, stopSound |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConeSound
public ConeSound()
- Creates a sound.
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 withtransform
- 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
Latest Info from http://aviatrix3d.j3d.org/
Copyright © 2003 - 2005 j3d.org