SVector6.h

00001 /****************************************************************************
00002  * Copyright 2005 Evan Drumwright
00003  * This library is distributed under the terms of the GNU General Public 
00004  * License (found in COPYING).
00005  ****************************************************************************/
00006 
00007 #ifndef _VECTOR6_H
00008 #define _VECTOR6_H
00009 
00010 #include <Physsim/VectorN.h>
00011 #include <Physsim/Vector3.h>
00012 
00013 namespace Physsim {
00014 
00016 
00020 class SVector6 : public VectorN
00021 {
00022         public:
00023                 SVector6();
00024                 SVector6(Real x, Real y, Real z, Real a, Real b, Real c);
00025                 SVector6(const boost::shared_array<Real> array);
00026                 SVector6(const SVector6& source);
00027                 SVector6(const VectorN& source);
00028                 SVector6(const Vector3& upper, const Vector3& lower);
00029                 virtual Real dot(const SVector6& v) const { return dot(*this, v); }
00030                 static Real dot(const SVector6& v1, const SVector6& v2);
00031                 void set_lower(const Vector3& lower);
00032                 void set_upper(const Vector3& upper);
00033                 Vector3 get_lower() const;
00034                 Vector3 get_upper() const;
00035                 virtual void operator=(const VectorN& source) { assert(source.size() == 6); VectorN::operator=(source); }
00036                 void operator=(const SVector6& source) { VectorN::operator=(source); }
00037                 void transpose();
00038                 static SVector6 transpose(const SVector6& v);
00039 };
00040 }
00041 
00042 #endif
00043 

Generated on Wed Oct 24 14:54:22 2007 for Physsim by  doxygen 1.5.1