Skip to content

Commit

Permalink
Additional Athena support
Browse files Browse the repository at this point in the history
  • Loading branch information
jackoalan committed Oct 24, 2015
1 parent 1901de9 commit 2efe395
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
4 changes: 4 additions & 0 deletions include/CTransform.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ class ZE_ALIGN(16) CTransform
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));}
Expand Down
10 changes: 9 additions & 1 deletion include/CVector3f.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,15 @@ class ZE_ALIGN(16) CVector3f
#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;
Expand Down

0 comments on commit 2efe395

Please sign in to comment.