25 constexpr Plane3() noexcept = default;
31 constexpr explicit
Plane3( const
Plane3<U> & p ) noexcept :
n( p.
n ),
d( T( p.
d ) ) { }
45 const auto len =
n.length();
48 const auto rlen = 1 / len;
57 return s << pl.
n <<
'\n' << pl.
d;
62 return s >> pl.
n >> pl.
d;
91 return a.
n == b.
n && a.
d == b.
d;
#define MR_REQUIRES_IF_SUPPORTED(...)
Definition MRMacros.h:33
bool operator==(const Allocator< T > &, const Allocator< U > &) noexcept
Definition MRAllocator.h:95
Plane3
Definition MRMeshFwd.h:390
constexpr Plane3() noexcept=default
Plane3 normalized() const
returns same plane represented with unit n-vector
Definition MRPlane3.h:43
Plane3< T > transformed(const Plane3< T > &plane, const AffineXf3< T > &xf)
Fixes ambiguity in the old bindings on VS2019 only. TODO remove when wropping old bindings....
Definition MRPlane3.h:83
auto dot(const Matrix2< T > &a, const Matrix2< T > &b) -> decltype(dot(a.x, b.x))
double-dot product: x = a : b
Definition MRMatrix2.h:142
Vector3< T > project(const Vector3< T > &p) const
finds the closest point on plane
Definition MRPlane3.h:53
T distance(const Vector3< T > &x) const
returns distance from given point to this plane (if n is a unit vector)
Definition MRPlane3.h:36
bool operator!=(const Color &a, const Color &b)
Definition MRColor.h:107
static constexpr int size
Definition MRVectorTraits.h:22
friend std::ostream & operator<<(std::ostream &s, const Plane3 &pl)
Definition MRPlane3.h:55
const Plane3 & operator+() const
returns same representation
Definition MRPlane3.h:41
Vector3< T > n
Definition MRPlane3.h:22
friend std::istream & operator>>(std::istream &s, Plane3 &pl)
Definition MRPlane3.h:60
T d
Definition MRPlane3.h:23
constexpr AffineXf inverse() const noexcept
computes inverse transformation
Definition MRAffineXf.h:54
Plane3< T > invTransformed(const Plane3< T > &pl, const AffineXf3< T > &ixf)
Definition MRPlane3.h:73
V b
Definition MRAffineXf.h:31
M A
Definition MRAffineXf.h:30
AffineXf< Vector3< T > > AffineXf3
Definition MRMeshFwd.h:300
Plane3 operator-() const
returns same plane represented with flipped direction of n-vector
Definition MRPlane3.h:39
static constexpr Plane3 fromDirAndPt(const Vector3< T > &n, const Vector3< T > &p)
Definition MRPlane3.h:33
Only strictly necessary for the bindings (to make MR::MeshIntersectionResult a complete type).
Definition MRCameraOrientationPlugin.h:8
Definition MRVector3.h:33