7 #include "point_3d.hpp" 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;
void SetDistanceToOrigin(double distanceToOrigin) noexcept
Sets the distance to the origin in point units.
Definition: plane_3d.hpp:76
double DistanceToPoint(const Point3D< double > &pt) const noexcept
Calculates the distance to the point pt.
Definition: plane_3d.hpp:84
Point3D< double > Normal() const noexcept
Gets the normal vector of the plane.
Definition: plane_3d.hpp:55
double DistanceToOrigin() const noexcept
Gets the distance to the origin in point units.
Definition: plane_3d.hpp:69
T Length() const noexcept
Gets the length of this point.
Definition: point_3d.hpp:140
Root namespace for the Image Manager interface.
Definition: version.hpp:11
double DistanceToPoint(double x, double y, double z) const noexcept
Calculates the distance to the point pt.
Definition: plane_3d.hpp:94
Plane3D() noexcept=default
Creates a default plane at (0, 0, 0, 0).
Plane3D(double nx, double ny, double nz, double distanceToOrigin) noexcept
Creates a new Plane3D object from the given normal vector components and the distanceToOrigin.
Definition: plane_3d.hpp:34
void SetNormal(Point3D< double > normal) noexcept
Sets the normal vector of the plane.
Definition: plane_3d.hpp:62
A plane in 3D space in Hessian normal form.
Definition: plane_3d.hpp:17
Plane3D(Point3D< double > normal, double distanceToOrigin) noexcept
Creates a new Plane3D object.
Definition: plane_3d.hpp:45