JOAL v2.6.0-rc-20250706
JOAL, OpenAL® API Binding for Java™ (public API).
com.jogamp.openal.sound3d.Listener Class Reference

This class represents the human listener in the Sound3D environment. More...

Collaboration diagram for com.jogamp.openal.sound3d.Listener:

Public Member Functions

 Listener ()
 
void setGain (final float gain)
 Sets the Gain, or volume of the audio in the environment relative to the listener. More...
 
float getGain ()
 Gets the value of the gain, or volume of the audio in the environment relative to the listener. More...
 
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. More...
 
void setPosition (final Vec3f position)
 Sets the position in (x-y-z coordinates) of the Listener in the Sound3D environment. More...
 
Vec3f getPosition ()
 Gets the position in (x-y-z coordinates) of the Listener in the Sound3D environment. More...
 
void setVelocity (final Vec3f velocity)
 Sets the velocity in (x-y-z coordinates) of the Listener in the Sound3D environment. More...
 
Vec3f getVelocity ()
 Gets the velocity in (x-y-z coordinates) of the Listener in the Sound3D environment. More...
 
void setOrientation (final float[] orientation)
 Sets the orientation of the Listener in the Sound3D environment. More...
 
float[] getOrientation ()
 Gets the orientation of the Listener in the Sound3D environment. More...
 

Detailed Description

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, Sven Gothel, et al.

Definition at line 46 of file Listener.java.

Constructor & Destructor Documentation

◆ Listener()

com.jogamp.openal.sound3d.Listener.Listener ( )

Definition at line 47 of file Listener.java.

Member Function Documentation

◆ getGain()

float com.jogamp.openal.sound3d.Listener.getGain ( )

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

Returns
the gain value.

Definition at line 66 of file Listener.java.

Here is the call graph for this function:

◆ getOrientation()

float[] com.jogamp.openal.sound3d.Listener.getOrientation ( )

Gets the orientation of the Listener in the Sound3D environment.

Orientation is expressed as at and up vectors.

Returns
an array containing the orientation of the listener, a pair of 3-float vectors for x,y,z. The first 3 elements of the array contain the at vector, the second 3 elements contain the up vector.

Definition at line 160 of file Listener.java.

Here is the call graph for this function:

◆ getPosition()

Vec3f com.jogamp.openal.sound3d.Listener.getPosition ( )

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

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

Definition at line 106 of file Listener.java.

Here is the call graph for this function:

◆ getVelocity()

Vec3f com.jogamp.openal.sound3d.Listener.getVelocity ( )

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

Used in determining doppler shift.

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

Definition at line 133 of file Listener.java.

Here is the call graph for this function:

◆ setGain()

void com.jogamp.openal.sound3d.Listener.setGain ( final float  gain)

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

Parameters
gainthe gain, or volume

Definition at line 56 of file Listener.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setOrientation()

void com.jogamp.openal.sound3d.Listener.setOrientation ( final float[]  orientation)

Sets the orientation of the Listener in the Sound3D environment.

Orientation is expressed as at and up vectors.

Parameters
orientationThe first 3 elements of the array should contain the at vector, the second 3 elements should contain the up vector.

Definition at line 149 of file Listener.java.

Here is the call graph for this function:

◆ setPosition() [1/2]

void com.jogamp.openal.sound3d.Listener.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
xThe position of the listener along the X-axis in the Sound3D environment
yThe position of the listener along the Y-axis in the Sound3D environment
zThe position of the listener along the Z-axis in the Sound3D environment

Definition at line 84 of file Listener.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setPosition() [2/2]

void com.jogamp.openal.sound3d.Listener.setPosition ( final Vec3f  position)

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

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

Definition at line 95 of file Listener.java.

Here is the call graph for this function:

◆ setVelocity()

void com.jogamp.openal.sound3d.Listener.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
velocitya Vec3f object containing the velicity in x,y and z coordinates of Listener.

Definition at line 122 of file Listener.java.

Here is the call graph for this function:

The documentation for this class was generated from the following file: