102: m_point(0.0, 0.0, 0.0)
103, m_normal(0.0, 0.0, 1.0)
110, m_normal(normal.GetNormalized())
154 return point - m_normal * distance;
166 return m_point == plane.m_point && m_normal == plane.m_normal;
172 return !(*
this == plane);
Definition of a plane in 3D space.
void SetPoint(const CVector3d &point)
Set point on the plane.
void SetNormal(const CVector3d &normal)
Set normal vector of the plane.
const CVector3d & GetPoint() const
Get point on the plane.
CPlane3d()
Default constructor.
double GetSignedDistance(const CVector3d &point) const
Calculate signed distance from point to plane.
CVector3d GetProjection(const CVector3d &point) const
Project point onto the plane.
bool operator==(const CPlane3d &plane) const
bool Contains(const CVector3d &point, double tolerance=I_BIG_EPSILON) const
Check if point lies on the plane (within tolerance).
const CVector3d & GetNormal() const
Get normal vector of the plane.
CPlane3d(const CVector3d &p1, const CVector3d &p2, const CVector3d &p3)
Construct plane from three points.
bool Serialize(iser::IArchive &archive)
Serialize this plane to specified archive.
bool operator!=(const CPlane3d &plane) const
double GetDistance(const CVector3d &point) const
Calculate absolute distance from point to plane.
Represents a position or mathematical vector in 3D space with double precision.
CVector3d GetNormalized(double length=1.0) const
Return normalized vector with the same direction and specified length.
Element GetDotProduct(const TVector< Size, Element > &vector) const
Calculates the dot product with another vector.
Represents an input/output persistence archive for object serialization.
static const double I_BIG_EPSILON