added traits class for vecmat3.h
This commit is contained in:
		
							parent
							
								
									f8b2ee6e1a
								
							
						
					
					
						commit
						00b5163e31
					
				
							
								
								
									
										28
									
								
								vecmat3.h
									
									
									
									
									
								
							
							
						
						
									
										28
									
								
								vecmat3.h
									
									
									
									
									
								
							| @ -167,6 +167,7 @@ public: | |||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
| //stream I/O
 | //stream I/O
 | ||||||
| #ifndef AVOID_STDSTREAM | #ifndef AVOID_STDSTREAM | ||||||
| template <typename T> | template <typename T> | ||||||
| @ -197,5 +198,32 @@ void perspective(T *proj_xy, const Vec3<T> &point, const Mat3<T> &rot_angle, con | |||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| }//namespace
 | }//namespace
 | ||||||
|  | 
 | ||||||
|  | using namespace  LA_Vecmat3; | ||||||
|  | namespace LA { | ||||||
|  | //forward declaration, needed of this file is used separately from the rest of LA
 | ||||||
|  | template<typename T> | ||||||
|  | class LA_traits; | ||||||
|  | 
 | ||||||
|  | template<typename T> | ||||||
|  | class LA_traits<Vec3<T> > | ||||||
|  | { | ||||||
|  | public: | ||||||
|  |        static bool is_plaindata() {return true;}; | ||||||
|  |        static void copyonwrite(Vec3<T>& x) {}; | ||||||
|  |        typedef T normtype; | ||||||
|  | }; | ||||||
|  | 
 | ||||||
|  | template<typename T> | ||||||
|  | class LA_traits<Mat3<T> > | ||||||
|  | { | ||||||
|  | public: | ||||||
|  |        static bool is_plaindata() {return true;}; | ||||||
|  |        static void copyonwrite(Mat3<T>& x) {}; | ||||||
|  |        typedef T normtype; | ||||||
|  | }; | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | } | ||||||
| #endif /* _VECMAT3_H_ */ | #endif /* _VECMAT3_H_ */ | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user