From 2efe395f5003ab4afbecf965ed2d28a51ed53593 Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Fri, 23 Oct 2015 15:23:23 -1000 Subject: [PATCH] Additional Athena support --- include/CTransform.hpp | 4 ++++ include/CVector3f.hpp | 10 +++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/include/CTransform.hpp b/include/CTransform.hpp index 127c21a..e2ab4d5 100644 --- a/include/CTransform.hpp +++ b/include/CTransform.hpp @@ -17,6 +17,10 @@ public: CTransform() : m_basis(false) {} CTransform(const CMatrix3f& basis, const CVector3f& offset=CVector3f::skZero) : m_basis(basis), m_origin(offset) {} +#if ZE_ATHENA_TYPES + CTransform(const atVec4f* mtx) + : m_basis(mtx[0], mtx[1], mtx[2]), m_origin(mtx[0].vec[3], mtx[1].vec[3], mtx[2].vec[3]) {} +#endif inline CTransform operator*(const CTransform& rhs) const {return CTransform(m_basis * rhs.m_basis, m_origin + (m_basis * rhs.m_origin));} diff --git a/include/CVector3f.hpp b/include/CVector3f.hpp index 192f45e..a8d59f0 100644 --- a/include/CVector3f.hpp +++ b/include/CVector3f.hpp @@ -22,7 +22,15 @@ public: #if ZE_ATHENA_TYPES CVector3f(const atVec3f& vec) #if __SSE__ - : mVec128(vec.mVec128){} + : mVec128(vec.mVec128){} +#else + { + x = vec.vec[0], y = vec.vec[1], z = vec.vec[2], v[3] = 0.0f; + } +#endif + CVector3f(const atVec4f& vec) +#if __SSE__ + : mVec128(vec.mVec128){} #else { x = vec.vec[0], y = vec.vec[1], z = vec.vec[2], v[3] = 0.0f;