rtcVec6.h
Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2009
00003  * Robert Bosch LLC
00004  * Research and Technology Center North America
00005  * Palo Alto, California
00006  *
00007  * All rights reserved.
00008  *
00009  *------------------------------------------------------------------------------
00010  * project ....: Autonomous Technologies
00011  * file .......: rtcVec6.h
00012  * authors ....: Benjamin Pitzer
00013  * organization: Robert Bosch LLC
00014  * creation ...: 04/03/2008
00015  * modified ...: $Date: 2009-01-21 18:19:16 -0800 (Wed, 21 Jan 2009) $
00016  * changed by .: $Author: benjaminpitzer $
00017  * revision ...: $Revision: 14 $
00018  */
00019 #ifndef RTC_VEC6_H
00020 #define RTC_VEC6_H
00021 
00022 //== INCLUDES ==================================================================
00023 #include "rtc/rtcMath.h"
00024 #include "rtc/rtcVec.h"
00025 
00026 //== NAMESPACES ================================================================
00027 namespace rtc {
00028 
00029 // Forward declarations
00030 template <class T, int M> class Vec; // M-d vector
00031 template <class T> class Vec6; // 6d Vector
00032 
00036 template <class T>
00037 class Vec6: public Vec<T,6> {
00038 public:
00039   // inherit member data and functions of parent
00040   using Vec<T,6>::x;
00041   using Vec<T,6>::set;
00042 
00043   // Constructors
00044   Vec6();
00045   Vec6(const T* d);
00046   Vec6(const T a);
00047   Vec6(const T x0, const T x1, const T x2,
00048        const T x3, const T x4, const T x5);
00049   Vec6(const Vec<T,6>& v);
00050 
00051   // Cast Operation
00052   template <class U> Vec6(const Vec<U,6>& v);
00053 
00054   // Mutators
00055   void set(const T x0, const T x1, const T x2,
00056            const T x3, const T x4, const T x5);
00057 };
00058 
00059 // Declare a few common typdefs
00060 typedef Vec6<bool> Vec6b;
00061 typedef Vec6<signed char> Vec6c;
00062 typedef Vec6<unsigned char> Vec6uc;
00063 typedef Vec6<signed short int> Vec6s;
00064 typedef Vec6<unsigned short int> Vec6us;
00065 typedef Vec6<int> Vec6i;
00066 typedef Vec6<unsigned int> Vec6ui;
00067 typedef Vec6<float> Vec6f;
00068 typedef Vec6<double> Vec6d;
00069 
00070 //==============================================================================
00071 // Vec6<T>
00072 //==============================================================================
00073 
00074 // Constructors
00075 
00078 template <class T>
00079 inline Vec6<T>::Vec6() {}
00080 
00083 template <class T>
00084 inline Vec6<T>::Vec6(const T* d) : Vec<T,6>(d) {}
00085 
00088 template <class T>
00089 inline Vec6<T>::Vec6(const T a) : Vec<T,6>(a) {}
00090 
00093 template <class T>
00094 inline Vec6<T>::Vec6(const T x0, const T x1, const T x2,
00095                      const T x3, const T x4, const T x5) {
00096   set(x0,x1,x2,x3,x4,x5);
00097 }
00098 
00101 template <class T>
00102 inline Vec6<T>::Vec6(const Vec<T,6>& v) : Vec<T,6>(v) {}
00103 
00104 // Casting Operation
00105 
00108 template <class T> template <class U>
00109 inline Vec6<T>::Vec6(const Vec<U,6>& v) : Vec<T,6>(v) {}
00110 
00111 // Mutators
00112 
00115 template <class T>
00116 inline void Vec6<T>::set(const T x0, const T x1, const T x2,
00117                          const T x3, const T x4, const T x5) {
00118   x[0] = x0; x[1] = x1; x[2] = x2;
00119   x[3] = x3; x[4] = x4; x[5] = x5;
00120 }
00121 
00122 //==============================================================================
00123 } // NAMESPACE rtc
00124 //==============================================================================
00125 #endif // RTC_VEC6_H defined
00126 //==============================================================================


rtc
Author(s): Benjamin Pitzer
autogenerated on Mon Oct 6 2014 10:07:35