zombie.core.sound
Interface Attenuator
- All Known Implementing Classes:
- DefAttenuation, NoAttenuation
public interface Attenuator
Something that will return an attenuated gain factor for a sound depending on its distance from the specified "origin" in the
SoundEngine
Method Summary |
float |
getAttenuation(float x,
float y)
Calculate the attenuation at the specifed point, in absolute world coordinates. |
float |
getXPosition(float x,
float y,
float z)
|
float |
getYPosition(float x,
float y,
float z)
|
float |
getZPosition(float x,
float y,
float z)
|
getAttenuation
float getAttenuation(float x,
float y)
- Calculate the attenuation at the specifed point, in absolute world coordinates. The closer something is to the "origin",
the higher the gain will be, up to 1.0f maximum.
- Parameters:
x
- y
-
- Returns:
- gain factor, between 0.0f and 1.0f inclusive.
getXPosition
float getXPosition(float x,
float y,
float z)
getYPosition
float getYPosition(float x,
float y,
float z)
getZPosition
float getZPosition(float x,
float y,
float z)