Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src/math
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-05-10 10:19:16 +0000
committerStijn Buys <ingar@osirion.org>2008-05-10 10:19:16 +0000
commit930db4020b9af2ccd999cb3a8c980cc9d527f8cf (patch)
tree1767c67dbe94615c02d529f3ed04e614cb948921 /src/math
parent421fc71813f08bfe359f9ac7596933a7e4cea6e0 (diff)
client-side axis interpolation
Diffstat (limited to 'src/math')
-rw-r--r--src/math/plane3f.cc32
-rw-r--r--src/math/plane3f.h52
2 files changed, 0 insertions, 84 deletions
diff --git a/src/math/plane3f.cc b/src/math/plane3f.cc
deleted file mode 100644
index 232bc98..0000000
--- a/src/math/plane3f.cc
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- math/plane3f.cc
- This file is part of the Osirion project and is distributed under
- the terms of the GNU General Public License version 2
-*/
-
-#include "math/plane3f.h"
-#include <string>
-
-namespace math
-{
-
-Plane3f::Plane3f(Vector3f const & point0, Vector3f const &point1, Vector3f const &point2)
-{
- plane_point[0] = point0;
- plane_point[1] = point1;
- plane_point[2] = point2;
-
- plane_normal = crossproduct((plane_point[1] - plane_point[0]) , (plane_point[2] - plane_point[0]) );
- pd = -1 * (plane_normal.x * plane_point[0].x + plane_normal.y * plane_point[0].y + plane_normal.z * plane_point[0].z);
-}
-
-Plane3f::Plane3f(Plane3f const & other)
-{
- for (size_t i=0; i < 3; i++)
- this->plane_point[i] = other.plane_point[i];
-
- plane_normal = crossproduct((plane_point[1] - plane_point[0]) , (plane_point[2] - plane_point[0]) );
- pd = -1 * (plane_normal.x * plane_point[0].x + plane_normal.y * plane_point[0].y + plane_normal.z * plane_point[0].z);
-}
-
-}
diff --git a/src/math/plane3f.h b/src/math/plane3f.h
deleted file mode 100644
index 02037d2..0000000
--- a/src/math/plane3f.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- math/plane3f.h
- This file is part of the Osirion project and is distributed under
- the terms of the GNU General Public License version 2
-*/
-
-#ifndef __INCLUDED_MATH_PLANE3F_H__
-#define __INCLUDED_MATH_PLANE3F_H__
-
-#include "math/vector3f.h"
-
-namespace math
-{
-
-/** @brief A class representing a plane in 3d space
- * all points p(x, y, z) on the plane satisfy the general equation
- * x*a() + y*b() + z*c() + d() = 0
- */
-class Plane3f
-{
-public:
- /// a plane defined by 3 points in space
- Plane3f(Vector3f const & point0, Vector3f const &point1, Vector3f const &point2);
- /// copy constructor
- Plane3f(Plane3f const & other);
-
- /// normal of the plane, not normalized to lenght 1
- inline Vector3f const & normal() const { return plane_normal; }
- /// the points defining the plane.
- /// @param i 0 <= i < 3
- inline Vector3f const & point(size_t i) const { return plane_point[i]; }
- /// plane texture
- inline std::string & texture() { return plane_texture; }
- /// first parameter of the general equation
- inline float a() const { return plane_normal[0]; }
- /// second parameter of the general equation
- inline float b() const { return plane_normal[1]; }
- /// third param of the general equation
- inline float c() const { return plane_normal[2]; }
- /// fourth parameter of the general equation
- inline float d() const { return pd; }
-
-private:
- Vector3f plane_point[3];
- Vector3f plane_normal;
- std::string plane_texture;
- float pd;
-};
-
-}
-
-#endif // __INCLUDED_MATH_PLANE3F_H__