39 bool useFalloff =
false;
42 bool muteWhenInsideObject =
false;
43 bool muteWhenOutsideObject =
false;
44 bool useClosestPointRotationMuteInside =
false;
46 bool useYawForRotation =
true;
47 bool usePitchForRotation =
true;
48 bool useRollForRotation =
true;
50 glm::vec3 cameraPosition;
51 glm::quat cameraRotation;
53 glm::vec3 soundPosition;
54 glm::quat soundRotation;
57 static void ConvertPositionToMach1(Mach1PlatformType platformType,
float *X,
float *Y,
float *Z);
58 static void ConvertPositionToPlatform(Mach1PlatformType platformType,
float *X,
float *Y,
float *Z);
60 static float ClosestPointOnBox(glm::vec3 point, glm::vec3 center, glm::vec3 axis0, glm::vec3 axis1, glm::vec3 axis2, glm::vec3 extents, glm::vec3 &closestPoint);
61 static bool Clip(
float denom,
float numer,
float &t0,
float &t1);
62 static int DoClipping(
float t0,
float t1, glm::vec3 origin, glm::vec3 direction, glm::vec3 center, glm::vec3 axis0, glm::vec3 axis1, glm::vec3 axis2, glm::vec3 extents,
bool solid, glm::vec3 &point0, glm::vec3 &point1);
64 static glm::vec3 QuaternionToEuler(glm::quat q);
65 static glm::quat EulerToQuaternion(glm::vec3 euler);
67 Mach1PlatformType platformType;
68 Mach1DecodeMode decodeMode;
70 static glm::vec3 GetRightVector();
71 static glm::vec3 GetUpVector();
72 static glm::vec3 GetForwardVector();
76 glm::vec3 eulerAngles;
77 glm::vec3 eulerAnglesCube;
79 std::vector<float> coeffs;
82 long timeLastCalculation;
84 glm::vec3 closestPointOnPlane;
89 void setDecodeMode(Mach1DecodeMode mode);
90 void setPlatformType(Mach1PlatformType type);
93 void setUseAttenuation(
bool useAttenuation);
94 void setAttenuationCurve(
float attenuationCurve);
96 void setMuteWhenOutsideObject(
bool muteWhenOutsideObject);
97 void setMuteWhenInsideObject(
bool muteWhenInsideObject);
99 void setUsePlaneCalculation(
bool usePlaneCalculation);
101 void setUseYawForRotation(
bool useYawForRotation);
102 void setUsePitchForRotation(
bool usePitchForRotation);
103 void setUseRollForRotation(
bool useRollForRotation);
115 void evaluatePositionResults();
117 void getCoefficients(
float *result);
121 int getFormatChannelCount();
122 int getFormatCoeffCount();
130 void setFilterSpeed(
float filterSpeed);
132 long getCurrentTime();
133 long getLastCalculationTime();