4 #define EPSILON 0.00001f 7 #ifndef FLOAT_POS_INFINITY 8 #define FLOAT_POS_INFINITY 999999999.0f 21 static bool SmoothMoveFloat1(
float& src,
const float dest,
const float fMaxStep);
24 static bool SmoothMoveAngle1(
float& src,
const float dest,
const float fMaxStep);
41 static bool MatchString(
const std::string& matchPattern,
const std::string& matchStr);
52 static inline int Round(
float fValue);
61 static inline bool CompareXZ(
const T& a,
const T& b)
63 return (a.x==b.x && a.z==b.z);
68 static bool CompareXZ(
const T& a,
const T& b,
float epsilon)
70 return (fabs(a.x-b.x) + fabs(a.z-b.z)) < epsilon;
98 static void CameraRotMatrixYawPitch(
Matrix4& out,
float fYaw,
float fPitch);
103 return int(fValue > 0.0f ? fValue + 0.5f : fValue - 0.5f);
static int Round(float fValue)
get the closest integer near the specified float number.
Definition: ParaMath.h:609
different physics engine has different winding order.
Definition: EventBinding.h:32
static bool ComputeFacingTarget(const Vector3 &target, const Vector3 &source, FLOAT &fFacing)
facing target in xz plane fFacing: [out] it is in the range [0, 2PI] return true if target!=source(a...
Standard 3-dimensional vector.
Definition: ParaVector3.h:16
static float ToStandardAngle(float fAngle)
make sure that the angle is in the range (-Pi,Pi]
static bool SmoothMoveAngle1(float &src, const float dest, const float fMaxStep)
change src from src to dest, by a maximum of fMaxStep.
static Matrix4 * CreateBillboardMatrix(Matrix4 *pOut, const Matrix4 *matModelview, const Vector3 *vBillboardPos, bool bAxisAligned=false)
create a billboard matrix
static void GetMatrixScaling(const Matrix4 &globalMat, float *fScalingX, float *fScalingY, float *fScalingZ)
Get the scaling factor from globalMat.
Class encapsulating a standard 4x4 homogeneous matrix.
Definition: ParaMatrix4.h:23
static float MaxVec3(const Vector3 &v)
Returns MAX(x, y, z);.
static bool CompareXZ(const T &a, const T &b, float epsilon)
return true if equal.
Definition: MathLib.h:68
static bool CompareXZ(const T &a, const T &b)
return true if equal.
Definition: MathLib.h:61
static int Round(float fValue)
get the closest integer near the specified float number.
static bool SmoothMoveFloat1(float &src, const float dest, const float fMaxStep)
change src from src to dest, by a maximum of fMaxStep.
static bool MatchString(const std::string &matchPattern, const std::string &matchStr)
check if the matchStr matches the string pattern in matchPattern
static bool SmoothMoveVec3(Vector3 *result, const Vector3 &vPosTarget, const Vector3 &vPos, FLOAT fIncrease, FLOAT fTolerance)
linearly (smoothly) move vPos to vPosTarget by the amount fIncrease return true if we have reached th...
static float MinVec3(const Vector3 &v)
Returns MIN(x, y, z);.