mirror of https://github.com/AxioDL/zeus.git
Minor API tweaks
This commit is contained in:
parent
141b803c66
commit
0e792b213a
|
@ -12,7 +12,7 @@ class alignas(16) CPlane
|
||||||
public:
|
public:
|
||||||
ZE_DECLARE_ALIGNED_ALLOCATOR();
|
ZE_DECLARE_ALIGNED_ALLOCATOR();
|
||||||
|
|
||||||
inline CPlane() : a(1.f), d(0.f) {}
|
inline CPlane() : a(1.f), b(0.f), c(0.f), d(0.f) {}
|
||||||
CPlane(float a, float b, float c, float d) : a(a), b(b), c(c), d(d) {}
|
CPlane(float a, float b, float c, float d) : a(a), b(b), c(c), d(d) {}
|
||||||
CPlane(const CVector3f& a, const CVector3f& b, const CVector3f& c)
|
CPlane(const CVector3f& a, const CVector3f& b, const CVector3f& c)
|
||||||
{
|
{
|
||||||
|
|
|
@ -260,7 +260,7 @@ public:
|
||||||
static CQuaternion slerpShort(const CQuaternion& a, const CQuaternion& b, double t);
|
static CQuaternion slerpShort(const CQuaternion& a, const CQuaternion& b, double t);
|
||||||
static CQuaternion nlerp(const CQuaternion& a, const CQuaternion& b, double t);
|
static CQuaternion nlerp(const CQuaternion& a, const CQuaternion& b, double t);
|
||||||
static CQuaternion shortestRotationArc(const zeus::CVector3f& v0, const zeus::CVector3f& v1);
|
static CQuaternion shortestRotationArc(const zeus::CVector3f& v0, const zeus::CVector3f& v1);
|
||||||
static CQuaternion clampedRotateTo(const zeus::CVector3f& v0, const zeus::CVector3f& v1,
|
static CQuaternion clampedRotateTo(const zeus::CUnitVector3f& v0, const zeus::CUnitVector3f& v1,
|
||||||
const zeus::CRelAngle& angle);
|
const zeus::CRelAngle& angle);
|
||||||
|
|
||||||
inline float roll() const { return std::atan2(2.f * (x * y + w * z), w * w + x * x - y * y - z * z); }
|
inline float roll() const { return std::atan2(2.f * (x * y + w * z), w * w + x * x - y * y - z * z); }
|
||||||
|
|
|
@ -233,7 +233,7 @@ CQuaternion CQuaternion::shortestRotationArc(const zeus::CVector3f& v0, const ze
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CQuaternion CQuaternion::clampedRotateTo(const zeus::CVector3f& v0, const zeus::CVector3f& v1,
|
CQuaternion CQuaternion::clampedRotateTo(const zeus::CUnitVector3f& v0, const zeus::CUnitVector3f& v1,
|
||||||
const zeus::CRelAngle& angle)
|
const zeus::CRelAngle& angle)
|
||||||
{
|
{
|
||||||
CQuaternion arc = shortestRotationArc(v0, v1);
|
CQuaternion arc = shortestRotationArc(v0, v1);
|
||||||
|
|
Loading…
Reference in New Issue