From 00b5163e3197fefe9037901ac46b5f84393a501b Mon Sep 17 00:00:00 2001 From: Jiri Pittner Date: Wed, 15 Nov 2023 15:59:09 +0100 Subject: [PATCH] added traits class for vecmat3.h --- vecmat3.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/vecmat3.h b/vecmat3.h index e36b807..a8df298 100644 --- a/vecmat3.h +++ b/vecmat3.h @@ -167,6 +167,7 @@ public: }; + //stream I/O #ifndef AVOID_STDSTREAM template @@ -197,5 +198,32 @@ void perspective(T *proj_xy, const Vec3 &point, const Mat3 &rot_angle, con }//namespace + +using namespace LA_Vecmat3; +namespace LA { +//forward declaration, needed of this file is used separately from the rest of LA +template +class LA_traits; + +template +class LA_traits > +{ +public: + static bool is_plaindata() {return true;}; + static void copyonwrite(Vec3& x) {}; + typedef T normtype; +}; + +template +class LA_traits > +{ +public: + static bool is_plaindata() {return true;}; + static void copyonwrite(Mat3& x) {}; + typedef T normtype; +}; + + +} #endif /* _VECMAT3_H_ */