12 #ifndef __ICEPLANE_H__ 13 #define __ICEPLANE_H__ 15 #define PLANE_EPSILON (1.0e-7f) 23 inline_ Plane(
float nx,
float ny,
float nz,
float d) { Set(nx, ny, nz, d); }
36 inline_ Plane&
Set(
float nx,
float ny,
float nz,
float _d) {
n.Set(nx, ny, nz); d = _d;
return *
this; }
45 float Denom = 1.0f /
n.Magnitude();
113 #endif // __ICEPLANE_H__ inline_ Plane(const Point &p0, const Point &p1, const Point &p2)
Constructor from three points.
inline_ Plane(float nx, float ny, float nz, float d)
Constructor from a normal and a distance.
inline_ Plane()
Constructor.
float d
The distance from the origin.
inline_ Plane & Set(const Point &p, const Point &_n)
Point n
The normal to the plane.
inline_ ~Plane()
Destructor.
inline_ Plane(const Plane &plane)
Copy constructor.
inline_ Plane(const Point &_n, float _d)
Constructor from a normal and a distance.
inline_ float Distance(const Point &p) const
inline_ Plane operator*(const Matrix4x4 &m) const
inline_ bool Belongs(const Point &p) const
inline_ Plane & operator*=(const Matrix4x4 &m)
inline_ Plane(const Point &p, const Point &n)
Constructor from a point on the plane and a normal.
inline_ void TransformPlane(Plane &transformed, const Plane &plane, const Matrix4x4 &transform)
inline_ const HPoint & GetTrans() const
Returns the translation part of the matrix.
inline_ Plane & Set(float nx, float ny, float nz, float _d)