Top Description Fields Constructors Methods
com.jogamp.openal.sound3d

public Class Listener

extends Object
Class Inheritance
Imports
com.jogamp.openal.AL, .ALConstants

This class represents the human listener in the Sound3D environment. It provides methods for controlling the position, orientation as well as other properties associated with the listener.
Author
Athomas Goldberg

Field Summary

Modifier and TypeField and Description
private final AL

Constructor Summary

AccessConstructor and Description
pack-priv
Listener(final AL al)

Method Summary

Modifier and TypeMethod and Description
public float

Returns:

the gain value.
getGain
()

Gets the value of the gain, or volume of the audio in the environment relative to the listener.

public float[]

Returns:

an array containing the orientation of the listener. The first 3 elements of the array contain the x,y,z up-vector, the second 3 elements contain the x,z,z look-at vector.
getOrientation
()

Gets the orientation of the Listener in the Sound3D environment.

public Vec3f

Returns:

a Vec3f object containing the x,y and z coordinates of Listener.
getPosition
()

Gets the position in (x-y-z coordinates) of the Listener in the Sound3D environment.

public Vec3f

Returns:

a Vec3f object containing the velicity in x,y and z coordinates of Listener.
getVelocity
()

Gets the velocity in (x-y-z coordinates) of the Listener in the Sound3D environment.

public void
setGain(final float
the gain, or volume
gain
)

Sets the Gain, or volume of the audio in the environment relative to the listener

public void
setOrientation(final float[]
The first 3 elements of the array should contain the x,y,z up-vector, the second 3 elements should contain the x,z,z look-at vector.
orientation
)

Sets the orientation of the Listener in the Sound3D environment.

public void
setPosition(final float
The position of the listener along the X-axis in the Sound3D environment
x
,
final float
The position of the listener along the Y-axis in the Sound3D environment
y
,
final float
The position of the listener along the Z-axis in the Sound3D environment
z
)

Sets the position in (x-y-z coordinates) of the Listener in the Sound3D environment.

public void
setPosition(final Vec3f
a Vec3f object containing the x,y and z coordinates of Listener.
position
)

Sets the position in (x-y-z coordinates) of the Listener in the Sound3D environment.

public void
setVelocity(final Vec3f
a Vec3f object containing the velicity in x,y and z coordinates of Listener.
velocity
)

Sets the velocity in (x-y-z coordinates) of the Listener in the Sound3D environment.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

alback to summary
private final AL al

Constructor Detail

Listenerback to summary
pack-priv Listener(final AL al)

Method Detail

getGainback to summary
public float getGain()

Gets the value of the gain, or volume of the audio in the environment relative to the listener.

Returns:float

the gain value.

getOrientationback to summary
public float[] getOrientation()

Gets the orientation of the Listener in the Sound3D environment. Orientation is expressed as "up" and "at" vectors.

Returns:float[]

an array containing the orientation of the listener. The first 3 elements of the array contain the x,y,z up-vector, the second 3 elements contain the x,z,z look-at vector.

getPositionback to summary
public Vec3f getPosition()

Gets the position in (x-y-z coordinates) of the Listener in the Sound3D environment.

Returns:Vec3f

a Vec3f object containing the x,y and z coordinates of Listener.

getVelocityback to summary
public Vec3f getVelocity()

Gets the velocity in (x-y-z coordinates) of the Listener in the Sound3D environment. Used in determining doppler shift.

Returns:Vec3f

a Vec3f object containing the velicity in x,y and z coordinates of Listener.

setGainback to summary
public void setGain(final float gain)

Sets the Gain, or volume of the audio in the environment relative to the listener

Parameters
gain:float

the gain, or volume

setOrientationback to summary
public void setOrientation(final float[] orientation)

Sets the orientation of the Listener in the Sound3D environment. Orientation is expressed as "up" and "at" vectors.

Parameters
orientation:float[]

The first 3 elements of the array should contain the x,y,z up-vector, the second 3 elements should contain the x,z,z look-at vector.

setPositionback to summary
public void setPosition(final float x, final float y, final float z)

Sets the position in (x-y-z coordinates) of the Listener in the Sound3D environment.

Parameters
x:float

The position of the listener along the X-axis in the Sound3D environment

y:float

The position of the listener along the Y-axis in the Sound3D environment

z:float

The position of the listener along the Z-axis in the Sound3D environment

setPositionback to summary
public void setPosition(final Vec3f position)

Sets the position in (x-y-z coordinates) of the Listener in the Sound3D environment.

Parameters
position:Vec3f

a Vec3f object containing the x,y and z coordinates of Listener.

setVelocityback to summary
public void setVelocity(final Vec3f velocity)

Sets the velocity in (x-y-z coordinates) of the Listener in the Sound3D environment. Used in determining doppler shift.

Parameters
velocity:Vec3f

a Vec3f object containing the velicity in x,y and z coordinates of Listener.