voxelTerrain
 All Classes Functions Variables Typedefs Enumerations Pages
plane.hpp
1 #ifndef BLUB_MATH_PLANE_HPP
2 #define BLUB_MATH_PLANE_HPP
3 
4 #include "blub/math/vector3.hpp"
5 
6 
7 namespace Ogre
8 {
9  class Plane;
10 }
11 
12 
13 namespace blub
14 {
15 
16 class plane
17 {
18 public:
19 #ifndef BLUB_NO_OGRE3D
20  plane(const Ogre::Plane &vec);
21  operator Ogre::Plane() const;
22 #endif
23 
24  plane();
25  plane(const plane& other);
26  plane(vector3 p0, vector3 p1, vector3 p2);
27  plane(vector3 pos, vector3 normal);
28  plane(const vector3 &normal, const real &d);
29 
38  real getDistance (const vector3 &rkPoint) const;
39 
40  bool operator==(const plane& rhs) const
41  {
42  return rhs.d == d && rhs.normal == normal;
43  }
44  bool operator!=(const plane& rhs) const
45  {
46  return rhs.d != d || rhs.normal != normal;
47  }
48 
49 public:
50  vector3 normal;
51  real d;
52 
53 };
54 
55 }
56 
57 #endif // BLUB_MATH_PLANE_HPP
58 
Definition: vector3.hpp:26
real getDistance(const vector3 &rkPoint) const
Definition: plane.cpp:57
Definition: plane.hpp:16
Definition: deadlineTimer.hpp:10
Definition: axisAlignedBox.hpp:10