public final class Listener extends Object
| Modifier and Type | Method and Description |
|---|---|
static Vector3f |
getDirection()
Gets the listener's current orientation or "view direction" in the scene.
|
static float |
getGlobalVolume()
Gets the global sound volume.
|
static Vector3f |
getPosition()
Gets the listener's current position in the scene.
|
static void |
setDirection(float x,
float y,
float z)
Sets the orientation or "view direction" of the listener in the scene.
|
static void |
setDirection(Vector3f v)
Sets the orientation or "view direction" of the listener in the scene.
|
static void |
setGlobalVolume(float volume)
Sets the global sound volume.
|
static void |
setPosition(float x,
float y,
float z)
Sets the position of the listener in the scene.
|
static void |
setPosition(Vector3f v)
Sets the position of the listener in the scene.
|
public static void setGlobalVolume(float volume)
volume - the global sound volume, ranging between 0 (silence) and 100 (full volume).public static float getGlobalVolume()
public static void setPosition(float x,
float y,
float z)
x - the X coordinate of the listener's new position.y - the Y coordinate of the listener's new position.z - the Z coordinate of the listener's new position.SoundSource.setPosition(org.jsfml.system.Vector3f)public static void setPosition(Vector3f v)
v - the listener's new position.SoundSource.setPosition(org.jsfml.system.Vector3f)public static Vector3f getPosition()
public static void setDirection(float x,
float y,
float z)
x - the X component of the listener's new orientation.y - the Y component of the listener's new orientation.z - the Z component of the listener's new orientation.SoundSource.setPosition(org.jsfml.system.Vector3f)public static void setDirection(Vector3f v)
v - the listener's new orientation.SoundSource.setPosition(org.jsfml.system.Vector3f)public static Vector3f getDirection()