8#include "affine_matrix_3d.hpp"
35 Plane3D(
double nx,
double ny,
double nz,
double distanceToOrigin) noexcept
37 , distanceToOrigin_{distanceToOrigin}
35 Plane3D(
double nx,
double ny,
double nz,
double distanceToOrigin) noexcept {
…}
49 , distanceToOrigin_{distanceToOrigin}
80 return distanceToOrigin_;
90 distanceToOrigin_ = distanceToOrigin;
114 auto normal = normal_ / normal_.Length();
115 return std::abs(normal.X() * x + normal.Y() * y + normal.Z() * z - distanceToOrigin_);
136 return Internal::DoResCallValueOut<AffineMatrix3D>([&](
AffineMatrix3D &value) {
137 auto valueData =
reinterpret_cast<CExports::CVC3DTransformation *
>(&value);
139 return CVB_CALL_CAPI(CVC3DAlignToXYPlane(*
reinterpret_cast<const CExports::CVC3DPlane *
>(
this), *valueData));
151 return (normal_ == plane.normal_ && distanceToOrigin_ == plane.distanceToOrigin_);
162 return !(*
this == plane);
167 double distanceToOrigin_ = 0.0;
Affine transformation for 3D containing a transformation matrix and a translation vector.
Definition affine_matrix_3d.hpp:140
Plane3D(Point3D< double > normal, double distanceToOrigin) noexcept
Creates a new Plane3D object.
Definition plane_3d.hpp:47
double DistanceToPoint(const Point3D< double > &pt) const noexcept
Calculates the distance to the point pt.
Definition plane_3d.hpp:99
double DistanceToPoint(double x, double y, double z) const noexcept
Calculates the distance to the point pt.
Definition plane_3d.hpp:112
double DistanceToOrigin() const noexcept
Gets the distance to the origin in point units.
Definition plane_3d.hpp:78
bool operator==(const Plane3D &plane) const noexcept
Compares to an other plane.
Definition plane_3d.hpp:149
bool operator!=(const Plane3D &plane) const noexcept
Compares to an other plane.
Definition plane_3d.hpp:160
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:88
Point3D< double > Normal() const noexcept
Gets the normal vector of the plane.
Definition plane_3d.hpp:58
AffineMatrix3D AlignToXYPlane()
Calculates a rigid body transformation that maps the plane into the xy plane of the global coordinate...
Definition plane_3d.hpp:134
void SetNormal(Point3D< double > normal) noexcept
Sets the normal vector of the plane.
Definition plane_3d.hpp:68
Multi-purpose 3D vector class.
Definition point_3d.hpp:22
Root namespace for the Image Manager interface.
Definition c_bayer_to_rgb.h:17