Interface SoundRolloffFunction
public interface SoundRolloffFunction
Sound rolloff type.
- Author:
- Matthew Tropiano
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SoundRolloffFunctionCosine attenuation.static final SoundRolloffFunctionLinear attenuation.static final SoundRolloffFunctionNo attenuation.static final SoundRolloffFunctionSquared attenuation. -
Method Summary
Modifier and TypeMethodDescriptionfloatgetAttenuationScalar(float distanceScalar) Calculates the attenuation scalar given a distance scalar.
-
Field Details
-
NONE
No attenuation. -
LINEAR
Linear attenuation. -
COSINE
Cosine attenuation. -
SQUARED
Squared attenuation.
-
-
Method Details
-
getAttenuationScalar
float getAttenuationScalar(float distanceScalar) Calculates the attenuation scalar given a distance scalar.- Parameters:
distanceScalar- the distance scalar (0 = less than reference distance min, 1 = greater than reference distance max).- Returns:
- an attenuation scalar value (0 = fully attenuated, 1 = no attenuation).
-