From 87d560beb26e58efec8f87f1d07f621a1bc9c2b8 Mon Sep 17 00:00:00 2001 From: Jiri Pittner Date: Thu, 7 Oct 2021 14:10:22 +0200 Subject: [PATCH] vecmat3.cc compatibility fix --- vecmat3.cc | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/vecmat3.cc b/vecmat3.cc index 0cb1192..d38e239 100644 --- a/vecmat3.cc +++ b/vecmat3.cc @@ -129,7 +129,7 @@ const Vec3 Mat3::operator*(const Vec3 &rhs) const //cf. https://en.wikipedia.org/wiki/Euler_angles and NASA paper cited therein template -void LA_Vecmat3::euler2rotmat(const T *eul, Mat3 &a, const char *type, bool transpose, bool direction, bool reverse) +void euler2rotmat(const T *eul, Mat3 &a, const char *type, bool transpose, bool direction, bool reverse) { T c2=cos(eul[1]); T s2=sin(eul[1]); @@ -316,7 +316,7 @@ if(transpose) a.transposeme(); template -void LA_Vecmat3::rotmat2euler(T *eul, const Mat3 &a, const char *type, bool transpose, bool direction, bool reverse) +void rotmat2euler(T *eul, const Mat3 &a, const char *type, bool transpose, bool direction, bool reverse) { T m11=a[0][0]; T m22=a[1][1]; @@ -445,7 +445,7 @@ if(direction) //stream I/O #ifndef AVOID_STDSTREAM template -std::istream& LA_Vecmat3::operator>>(std::istream &s, Vec3 &x) +std::istream& operator>>(std::istream &s, Vec3 &x) { s >> x.q[0]; s >> x.q[1]; @@ -454,7 +454,7 @@ return s; } template -std::ostream& LA_Vecmat3::operator<<(std::ostream &s, const Vec3 &x) { +std::ostream& operator<<(std::ostream &s, const Vec3 &x) { s << x.q[0]<<" "; s << x.q[1]<<" "; s << x.q[2]; @@ -462,7 +462,7 @@ return s; } template -std::istream& LA_Vecmat3::operator>>(std::istream &s, Mat3 &x) +std::istream& operator>>(std::istream &s, Mat3 &x) { s >> x.q[0][0]; s >> x.q[0][1]; @@ -477,7 +477,7 @@ return s; } template -std::ostream& LA_Vecmat3::operator<<(std::ostream &s, const Mat3 &x) { +std::ostream& operator<<(std::ostream &s, const Mat3 &x) { s << x.q[0][0]<<" "<< x.q[0][1]<<" " << x.q[0][2]<; \ template class Mat3; \ -template void LA_Vecmat3::euler2rotmat(const T *eul, Mat3 &a, const char *type, bool transpose=0, bool direction=0, bool reverse=0); \ -template void LA_Vecmat3::rotmat2euler(T *eul, const Mat3 &a, const char *type, bool transpose=0, bool direction=0, bool reverse=0); \ +template void euler2rotmat(const T *eul, Mat3 &a, const char *type, bool transpose=0, bool direction=0, bool reverse=0); \ +template void rotmat2euler(T *eul, const Mat3 &a, const char *type, bool transpose=0, bool direction=0, bool reverse=0); \ #ifndef AVOID_STDSTREAM #define INSTANTIZE2(T) \ -template std::istream& LA_Vecmat3::operator>>(std::istream &s, Vec3 &x); \ -template std::ostream& LA_Vecmat3::operator<<(std::ostream &s, const Vec3 &x); \ -template std::istream& LA_Vecmat3::operator>>(std::istream &s, Mat3 &x); \ -template std::ostream& LA_Vecmat3::operator<<(std::ostream &s, const Mat3 &x); \ +template std::istream& operator>>(std::istream &s, Vec3 &x); \ +template std::ostream& operator<<(std::ostream &s, const Vec3 &x); \ +template std::istream& operator>>(std::istream &s, Mat3 &x); \ +template std::ostream& operator<<(std::ostream &s, const Mat3 &x); \ #endif