com.threerings.openal
Class Listener

java.lang.Object
  extended by com.threerings.openal.Listener

public class Listener
extends Object

Represents the OpenAL listener object.


Field Summary
protected  float _ax
          The orientation of the listener (initialized to the OpenAL defaults).
protected  float _ay
          The orientation of the listener (initialized to the OpenAL defaults).
protected  float _az
          The orientation of the listener (initialized to the OpenAL defaults).
protected  float _gain
          The gain of the listener.
protected  float _px
          The position of the listener.
protected  float _py
          The position of the listener.
protected  float _pz
          The position of the listener.
protected  float _ux
          The orientation of the listener (initialized to the OpenAL defaults).
protected  float _uy
          The orientation of the listener (initialized to the OpenAL defaults).
protected  float _uz
          The orientation of the listener (initialized to the OpenAL defaults).
protected  FloatBuffer _vbuf
          A buffer for floating point values.
protected  float _vx
          The velocity of the listener.
protected  float _vy
          The velocity of the listener.
protected  float _vz
          The velocity of the listener.
 
Constructor Summary
protected Listener()
          The listener is only to be created by the SoundManager.
 
Method Summary
 float getPositionX()
          Returns the x component of the listener's position.
 float getPositionY()
          Returns the y component of the listener's position.
 float getPositionZ()
          Returns the z component of the listener's position.
 void setGain(float gain)
          Sets the gain of the listener.
 void setOrientation(float ax, float ay, float az, float ux, float uy, float uz)
          Sets the orientation of the listener in terms of an "at" (direction) and "up" vector.
 void setPosition(float x, float y, float z)
          Sets the position of the listener.
 void setVelocity(float x, float y, float z)
          Sets the velocity of the listener.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_px

protected float _px
The position of the listener.


_py

protected float _py
The position of the listener.


_pz

protected float _pz
The position of the listener.


_vx

protected float _vx
The velocity of the listener.


_vy

protected float _vy
The velocity of the listener.


_vz

protected float _vz
The velocity of the listener.


_gain

protected float _gain
The gain of the listener.


_ax

protected float _ax
The orientation of the listener (initialized to the OpenAL defaults).


_ay

protected float _ay
The orientation of the listener (initialized to the OpenAL defaults).


_az

protected float _az
The orientation of the listener (initialized to the OpenAL defaults).


_ux

protected float _ux
The orientation of the listener (initialized to the OpenAL defaults).


_uy

protected float _uy
The orientation of the listener (initialized to the OpenAL defaults).


_uz

protected float _uz
The orientation of the listener (initialized to the OpenAL defaults).


_vbuf

protected FloatBuffer _vbuf
A buffer for floating point values.

Constructor Detail

Listener

protected Listener()
The listener is only to be created by the SoundManager.

Method Detail

setPosition

public void setPosition(float x,
                        float y,
                        float z)
Sets the position of the listener.


getPositionX

public float getPositionX()
Returns the x component of the listener's position.


getPositionY

public float getPositionY()
Returns the y component of the listener's position.


getPositionZ

public float getPositionZ()
Returns the z component of the listener's position.


setVelocity

public void setVelocity(float x,
                        float y,
                        float z)
Sets the velocity of the listener.


setGain

public void setGain(float gain)
Sets the gain of the listener.


setOrientation

public void setOrientation(float ax,
                           float ay,
                           float az,
                           float ux,
                           float uy,
                           float uz)
Sets the orientation of the listener in terms of an "at" (direction) and "up" vector.