to support GLM_FORCE_AVX2
This commit is contained in:
parent
8e471259d2
commit
1bc9a625da
@ -14,10 +14,10 @@
|
|||||||
namespace hgl
|
namespace hgl
|
||||||
{
|
{
|
||||||
using Quatf=glm::quat;
|
using Quatf=glm::quat;
|
||||||
constexpr const Quatf IdentityQuatf=Quatf(1,0,0,0);
|
const Quatf IdentityQuatf(1,0,0,0); //w,x,y,z
|
||||||
|
|
||||||
#define DEFINE_MATRIX(num) using Matrix##num##f=glm::mat##num; \
|
#define DEFINE_MATRIX(num) using Matrix##num##f=glm::mat##num; \
|
||||||
constexpr const Matrix##num##f Identity##num##f=Matrix##num##f(1.0f); \
|
const Matrix##num##f Identity##num##f=Matrix##num##f(1.0f); \
|
||||||
inline bool IsIdentityMatrix(const Matrix##num##f &m){return(hgl_cmp(m,Identity##num##f)==0);} \
|
inline bool IsIdentityMatrix(const Matrix##num##f &m){return(hgl_cmp(m,Identity##num##f)==0);} \
|
||||||
inline int FastMatrixComp(const Matrix##num##f &m1,const Matrix##num##f &m2){return hgl_cmp(m1,m2);}
|
inline int FastMatrixComp(const Matrix##num##f &m1,const Matrix##num##f &m2){return hgl_cmp(m1,m2);}
|
||||||
|
|
||||||
|
@ -15,10 +15,10 @@ namespace hgl
|
|||||||
X,Y,Z
|
X,Y,Z
|
||||||
};
|
};
|
||||||
|
|
||||||
#define DEF_VECTOR(flag,glm_type) using Vector1##flag=glm::glm_type##1; constexpr const Vector1##flag ZeroVector1##flag=Vector1##flag(0); constexpr const Vector1##flag OneVector1##flag=Vector1##flag(1);\
|
#define DEF_VECTOR(flag,glm_type) using Vector1##flag=glm::glm_type##1; const Vector1##flag ZeroVector1##flag=Vector1##flag(0); const Vector1##flag OneVector1##flag=Vector1##flag(1);\
|
||||||
using Vector2##flag=glm::glm_type##2; constexpr const Vector2##flag ZeroVector2##flag=Vector2##flag(0,0); constexpr const Vector2##flag OneVector2##flag=Vector2##flag(1,1);\
|
using Vector2##flag=glm::glm_type##2; const Vector2##flag ZeroVector2##flag=Vector2##flag(0,0); const Vector2##flag OneVector2##flag=Vector2##flag(1,1);\
|
||||||
using Vector3##flag=glm::glm_type##3; constexpr const Vector3##flag ZeroVector3##flag=Vector3##flag(0,0,0); constexpr const Vector3##flag OneVector3##flag=Vector3##flag(1,1,1);\
|
using Vector3##flag=glm::glm_type##3; const Vector3##flag ZeroVector3##flag=Vector3##flag(0,0,0); const Vector3##flag OneVector3##flag=Vector3##flag(1,1,1);\
|
||||||
using Vector4##flag=glm::glm_type##4; constexpr const Vector4##flag ZeroVector4##flag=Vector4##flag(0,0,0,0); constexpr const Vector4##flag OneVector4##flag=Vector4##flag(1,1,1,1);
|
using Vector4##flag=glm::glm_type##4; const Vector4##flag ZeroVector4##flag=Vector4##flag(0,0,0,0); const Vector4##flag OneVector4##flag=Vector4##flag(1,1,1,1);
|
||||||
|
|
||||||
DEF_VECTOR(f,vec)
|
DEF_VECTOR(f,vec)
|
||||||
DEF_VECTOR(d,dvec)
|
DEF_VECTOR(d,dvec)
|
||||||
@ -41,9 +41,9 @@ namespace hgl
|
|||||||
|
|
||||||
namespace AxisVector
|
namespace AxisVector
|
||||||
{
|
{
|
||||||
constexpr const Vector3f X=Vector3f(1,0,0);
|
const Vector3f X=Vector3f(1,0,0);
|
||||||
constexpr const Vector3f Y=Vector3f(0,1,0);
|
const Vector3f Y=Vector3f(0,1,0);
|
||||||
constexpr const Vector3f Z=Vector3f(0,0,1);
|
const Vector3f Z=Vector3f(0,0,1);
|
||||||
};
|
};
|
||||||
|
|
||||||
inline const Vector3f GetAxisVector(const AXIS &axis)
|
inline const Vector3f GetAxisVector(const AXIS &axis)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user