All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
MathsHelpers.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "VectorMathDecl.h"
6 
7 namespace Eegeo
8 {
9  namespace Helpers
10  {
11  namespace MathsHelpers
12  {
13  void ComputeScaleAndOffset(Eegeo::m44& result,
14  float scale,
15  const Eegeo::v3& scaleVector,
16  const Eegeo::v3& offset);
17 
18  Eegeo::m33 ComputeScale(float scale, const Eegeo::v3& scaleAxis);
19 
20 
21  float PennerElasticEaseInOut(float from, float to, float interpParam);
22  float PennerEaseInOut_Deprecated(float t, float b, float c, float d, float a, float p);
23 
24  float PennerQuadraticEaseIn(float t, float b, float c, float d);
25  float PennerQuadraticEaseOut(float t, float b, float c, float d);
26  float PennerQuadraticEaseInOut(float t, float b, float c, float d);
27  float PennerExpoEaseOut(float t, float b, float c, float d);
28  float PennerExpoEaseIn(float t, float b, float c, float d);
29 
30  float expDecayFactor(float halfLife, float deltaTime);
31 
32  float ExpMoveTowards( float from, float to, float halfLife, float deltaTime, float epsilon);
33  dv3 ExpMoveTowards(const dv3& from, const dv3& to, float halfLife, float deltaTime, float epsilon);
34 
35  void AlphaBetaFilter(float input, float& output, float& outputVel, float previous, float previousVel, float dt);
36 
37  void AlphaBetaFilter(float input, float& output, float& outputVel, float previous, float previousVel, float dt, float alpha, float beta);
38 
39  bool AreAlphaBetaParamsStable(float alpha, float beta);
40 
41  bool IsUnity(float value);
42  }
43  }
44 }