My Project
ShapePlane.h
1 #pragma once
2 
3 namespace ParaEngine
4 {
5  class CShapeAABB;
6  #define PLANE_EPSILON (1.0e-7f)
7 
9  class CShapePlane : Plane
10  {
11 
12  CShapePlane& Zero();
13  CShapePlane& Set(float nx, float ny, float nz, float _d);
14  CShapePlane& Set(const Vector3& p, const Vector3& _n);
15  CShapePlane& Set(const Vector3& p0, const Vector3& p1, const Vector3& p2);
16 
21  enum Side
22  {
23  NO_SIDE,
24  POSITIVE_SIDE,
25  NEGATIVE_SIDE,
26  BOTH_SIDE
27  };
28  Side getSide (const Vector3& rkPoint) const;
29 
34  Side getSide (const CShapeAABB& rkBox) const;
35 
45  Side getSide (const Vector3& centre, const Vector3& halfSize) const;
46 
47 
48  float Distance(const Vector3& p)const;
49  bool Belongs(const Vector3& p)const;
50 
51  void Normalize();
52 
53  // Cast operators
54  operator Vector3() const;
55  operator Vector4() const;
56 
57  // Arithmetic operators
58  CShapePlane operator*(const Matrix4& m) const;
59  CShapePlane& operator*=(const Matrix4& m);
60  };
61 }
4-dimensional homogeneous vector.
Definition: ParaVector4.h:10
plane
Definition: ShapePlane.h:9
different physics engine has different winding order.
Definition: EventBinding.h:32
Standard 3-dimensional vector.
Definition: ParaVector3.h:16
AABB-related code.
Definition: ShapeAABB.h:11
Class encapsulating a standard 4x4 homogeneous matrix.
Definition: ParaMatrix4.h:23
Defines a plane in 3D space.
Definition: ParaPlane.h:23