GEL  2
GEL is a library for Geometry and Linear Algebra
/Users/jab/Documents/Teaching/02585/GEL2_and_demos/GEL/src/CGLA/ArithVec3Int.h
00001 #ifndef __CGLA__ARITHVEC3INT_H__
00002 #define __CGLA__ARITHVEC3INT_H__
00003 
00004 #include "ArithVecInt.h"
00005 
00006 namespace CGLA {
00007 
00008         template<class T, class V>
00009         class ArithVec3Int: public ArithVecInt<T,V,3>
00010         {
00011         public:
00012 
00014                 ArithVec3Int(T a, T b, T c): ArithVecInt<T,V,3>(a,b,c) {}
00015 
00017                 ArithVec3Int() {}
00018                 
00019         };
00020 
00022         template<class T, class V>
00023         inline V cross( const ArithVec3Int<T,V>& x, 
00024                                                                         const ArithVec3Int<T,V>& y ) 
00025         {
00026                 return V( x[1] * y[2] - x[2] * y[1], 
00027                                                         x[2] * y[0] - x[0] * y[2], 
00028                                                         x[0] * y[1] - x[1] * y[0] );
00029         }
00030 
00031 }
00032 
00033 #endif
00034 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations