Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
SFML.Audio.Listener
- setGlobalVolume :: Float -> IO ()
- getGlobalVolume :: IO Float
- setListenerPosition :: Vec3f -> IO ()
- getListenerPosition :: IO Vec3f
- setListenerDirection :: Vec3f -> IO ()
- getListenerDirection :: IO Vec3f
- setListenerUpVector :: Vec3f -> IO ()
- getListenerUpVector :: IO Vec3f
Documentation
Change the global volume of all the sounds and musics.
The volume is a number between 0 and 100; it is combined with the individual volume of each sound or music.
The default value for the volume is 100 (maximum).
Get the current value of the global volume.
setListenerPosition :: Vec3f -> IO ()
Set the position of the listener in the scene.
The default listener's position is (0, 0, 0).
getListenerPosition :: IO Vec3f
Get the current position of the listener in the scene.
setListenerDirection :: Vec3f -> IO ()
Set the orientation of the forward vector in the scene.
The direction (also called "at vector") is the vector pointing forward from the listener's perspective. Together with the up vector, it defines the 3D orientation of the listener in the scene. The direction vector doesn't have to be normalized.
The default listener's direction is (0, 0, -1).
getListenerDirection :: IO Vec3f
Get the current orientation of the listener in the scene.
setListenerUpVector :: Vec3f -> IO ()
Set the upward vector of the listener in the scene
The up vector is the vector that points upward from the listener's perspective. Together with the direction, it defines the 3D orientation of the listener in the scene. The up vector doesn't have to be normalized. The default listener's up vector is (0, 1, 0). It is usually not necessary to change it, especially in 2D scenarios.
getListenerUpVector :: IO Vec3f
Get the current upward vector (unnormalised) of the listener in the scene.