public class Listener extends Object
Modifier and Type | Method and Description |
---|---|
float |
getGain()
Gets the value of the gain, or volume of the audio in the environment
relative to the listener.
|
float[] |
getOrientation()
Gets the orientation of the Listener in the Sound3D environment.
|
Vec3f |
getPosition()
Gets the position in (x-y-z coordinates) of the Listener in the Sound3D
environment.
|
Vec3f |
getVelocity()
Gets the velocity in (x-y-z coordinates) of the Listener in the Sound3D
environment.
|
void |
setGain(float gain)
Sets the Gain, or volume of the audio in the environment relative to the
listener
|
void |
setOrientation(float[] orientation)
Sets the orientation of the Listener in the Sound3D environment.
|
void |
setPosition(float x,
float y,
float z)
Sets the position in (x-y-z coordinates) of the Listener in the Sound3D
environment.
|
void |
setPosition(Vec3f position)
Sets the position in (x-y-z coordinates) of the Listener in the Sound3D
environment.
|
void |
setVelocity(Vec3f velocity)
Sets the velocity in (x-y-z coordinates) of the Listener in the Sound3D
environment.
|
public void setGain(float gain)
gain
- the gain, or volumepublic float getGain()
public void setPosition(float x, float y, float z)
x
- The position of the listener along the X-axis in the Sound3D
environmenty
- The position of the listener along the Y-axis in the Sound3D
environmentz
- The position of the listener along the Z-axis in the Sound3D
environmentpublic void setPosition(Vec3f position)
position
- a Vec3f object containing the x,y and z coordinates of
Listener.public Vec3f getPosition()
public void setVelocity(Vec3f velocity)
velocity
- a Vec3f object containing the velicity in
x,y and z coordinates of Listener.public Vec3f getVelocity()
public void setOrientation(float[] orientation)
orientation
- 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.public float[] getOrientation()