34 Plane3D(
double nx,
double ny,
double nz,
double distanceToOrigin) noexcept
35 : normal_{nx, ny, nz}, distanceToOrigin_{distanceToOrigin}
46 : normal_{normal}, distanceToOrigin_{distanceToOrigin}
96 auto normal = normal_ / normal_.
Length();
97 return abs(normal.X() * x + normal.Y() * y + normal.Z() * z - distanceToOrigin_);
102 double distanceToOrigin_ = 0.0;
A plane in 3D space in Hessian normal form.
Definition: plane_3d.hpp:18
Plane3D(Point3D< double > normal, double distanceToOrigin) noexcept
Creates a new Plane3D object.
Definition: plane_3d.hpp:45
double DistanceToPoint(const Point3D< double > &pt) const noexcept
Calculates the distance to the point pt.
Definition: plane_3d.hpp:84
double DistanceToPoint(double x, double y, double z) const noexcept
Calculates the distance to the point pt.
Definition: plane_3d.hpp:94
double DistanceToOrigin() const noexcept
Gets the distance to the origin in point units.
Definition: plane_3d.hpp:69
Plane3D() noexcept=default
Creates a default plane at (0, 0, 0, 0).
void SetDistanceToOrigin(double distanceToOrigin) noexcept
Sets the distance to the origin in point units.
Definition: plane_3d.hpp:76
Point3D< double > Normal() const noexcept
Gets the normal vector of the plane.
Definition: plane_3d.hpp:55
void SetNormal(Point3D< double > normal) noexcept
Sets the normal vector of the plane.
Definition: plane_3d.hpp:62
T Length() const noexcept
Gets the length of this point.
Definition: point_3d.hpp:140
Root namespace for the Image Manager interface.
Definition: c_barcode.h:24