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 _VECTOR3_H 00008 #define _VECTOR3_H 00009 00010 #include <Physsim/VectorN.h> 00011 00012 namespace Physsim { 00013 00015 class Vector3 : public VectorN 00016 { 00017 public: 00018 Vector3(); 00019 Vector3(Real x, Real y, Real z); 00020 Vector3(const boost::shared_array<Real> array); 00021 Vector3(const Vector3& source); 00022 Vector3(const VectorN& source); 00023 void cross(const Vector3& v); 00024 static Vector3 cross(const Vector3& v1, const Vector3& v2); 00025 void operator=(const Vector3& source) { VectorN::operator=(source); } 00026 virtual void operator=(const VectorN& source) { assert(source.size() == 3); VectorN::operator=(source); } 00027 static void det_orthonormal_basis(const Vector3& v1, Vector3& v2, Vector3& v3); 00028 }; 00029 } 00030 00031 #endif 00032
1.5.1