]> git.tdb.fi Git - libs/math.git/blobdiff - source/linal/vector3.h
Redesign the Vector interface
[libs/math.git] / source / linal / vector3.h
diff --git a/source/linal/vector3.h b/source/linal/vector3.h
deleted file mode 100644 (file)
index 4a623ca..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-#ifndef MSP_LINAL_VECTOR3_H_
-#define MSP_LINAL_VECTOR3_H_
-
-#include "vector.h"
-
-namespace Msp {
-namespace LinAl {
-
-/**
-A three-dimensional vector, applicable for Euclidean space.
-*/
-template<typename T>
-class Vector3: public Vector<T, 3>
-{
-public:
-       Vector3() { }
-       Vector3(const T *d): Vector<T, 3>(d) { }
-       Vector3(T, T, T);
-       template<typename U>
-       Vector3(const Vector<U, 3> &v): Vector<T, 3>(v) { }
-};
-
-template<typename T>
-inline Vector3<T>::Vector3(T x, T y, T z)
-{
-       this->data[0] = x;
-       this->data[1] = y;
-       this->data[2] = z;
-}
-
-template<typename T>
-inline T dot(const Vector<T, 3> &v1, const Vector<T, 3> &v2)
-{
-       return inner_product(v1, v2);
-}
-
-template<typename T>
-inline Vector<T, 3> cross(const Vector<T, 3> &v1, const Vector<T, 3> &v2)
-{
-       return Vector<T, 3>(v1[1]*v2[2]-v1[2]*v2[1], v1[2]*v2[0]-v1[0]*v2[2], v1[0]*v2[1]-v1[1]*v2[0]);
-}
-
-} // namespace LinAl
-} // namespace Msp
-
-#endif