GEL  2
GEL is a library for Geometry and Linear Algebra
/Users/jab/Documents/Teaching/02585/GEL2_and_demos/GEL/src/CGLA/ArithVec4Float.h
00001 #ifndef __CGLA_ARITHVEC4FLOAT_H__
00002 #define __CGLA_ARITHVEC4FLOAT_H__
00003 
00004 #include "ArithVecFloat.h"
00005 
00006 namespace CGLA {
00007 
00014         template<class T, class V>
00015         class ArithVec4Float: public ArithVecFloat<T,V,4>
00016         {
00017         public:
00018   
00020                 ArithVec4Float() {}
00021 
00023                 ArithVec4Float(T a, T b, T c, T d): 
00024                         ArithVecFloat<T,V,4>(a,b,c,d) {}
00025 
00027                 void de_homogenize()
00028                 {
00029                         float k = 1.0/(*this)[3];
00030                         (*this)[0] = (*this)[0]*k;
00031                         (*this)[1] = (*this)[1]*k;
00032                         (*this)[2] = (*this)[2]*k;
00033                         (*this)[3] = 1.0;
00034                 }
00035 
00036         };
00037 }
00038 #endif
00039 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations