MeshLib Documentation
Loading...
Searching...
No Matches
MR::Plane3< T > Struct Template Reference

#include <MRPlane3.h>

Public Member Functions

constexpr Plane3 () noexcept=default
 
constexpr Plane3 (const Vector3< T > &n, T d) noexcept
 
template<typename U >
constexpr Plane3 (const Plane3< U > &p) noexcept
 
distance (const Vector3< T > &x) const
 returns distance from given point to this plane (if n is a unit vector)
 
Plane3 operator- () const
 returns same plane represented with flipped direction of n-vector
 
const Plane3operator+ () const
 returns same representation
 
Plane3 normalized () const
 returns same plane represented with unit n-vector
 
Vector3< T > project (const Vector3< T > &p) const
 finds the closest point on plane
 

Static Public Member Functions

static constexpr Plane3 fromDirAndPt (const Vector3< T > &n, const Vector3< T > &p)
 

Public Attributes

Vector3< T > n
 
d = 0
 

Related Symbols

(Note that these are not member symbols.)

template<typename T >
Plane3< T > invTransformed (const Plane3< T > &pl, const AffineXf3< T > &ixf)
 
template<typename T >
Plane3< T > transformed (const Plane3< T > &plane, const AffineXf3< T > &xf)
 

Detailed Description

template<typename T>
struct MR::Plane3< T >

3-dimensional plane: dot(n,x) - d = 0

Constructor & Destructor Documentation

◆ Plane3() [1/3]

template<typename T >
MR::Plane3< T >::Plane3 ( )
constexprdefaultnoexcept

◆ Plane3() [2/3]

template<typename T >
MR::Plane3< T >::Plane3 ( const Vector3< T > & n,
T d )
inlineconstexprnoexcept

◆ Plane3() [3/3]

template<typename T >
template<typename U >
MR::Plane3< T >::Plane3 ( const Plane3< U > & p)
inlineexplicitconstexprnoexcept

Member Function Documentation

◆ distance()

template<typename T >
T MR::Plane3< T >::distance ( const Vector3< T > & x) const
inlinenodiscard

returns distance from given point to this plane (if n is a unit vector)

◆ fromDirAndPt()

template<typename T >
static constexpr Plane3 MR::Plane3< T >::fromDirAndPt ( const Vector3< T > & n,
const Vector3< T > & p )
inlinestaticnodiscardconstexpr

◆ normalized()

template<typename T >
Plane3 MR::Plane3< T >::normalized ( ) const
inlinenodiscard

returns same plane represented with unit n-vector

◆ operator+()

template<typename T >
const Plane3 & MR::Plane3< T >::operator+ ( ) const
inlinenodiscard

returns same representation

◆ operator-()

template<typename T >
Plane3 MR::Plane3< T >::operator- ( ) const
inlinenodiscard

returns same plane represented with flipped direction of n-vector

◆ project()

template<typename T >
Vector3< T > MR::Plane3< T >::project ( const Vector3< T > & p) const
inlinenodiscard

finds the closest point on plane

Friends And Related Symbol Documentation

◆ invTransformed()

template<typename T >
Plane3< T > invTransformed ( const Plane3< T > & pl,
const AffineXf3< T > & ixf )
related

given plane: pl(x) = 0, and inverse transformation: y=ixf^-1(x); returns the same plane in y reference frame: pl'(y) = 0; if given transformation is not rigid, then it is a good idea to normalize returned plane

◆ transformed()

template<typename T >
Plane3< T > transformed ( const Plane3< T > & plane,
const AffineXf3< T > & xf )
related

given plane: pl(x) = 0, and transformation: y=xf(x); returns the same plane in y reference frame: pl'(y) = 0; if given transformation is not rigid, then it is a good idea to normalize returned plane

Member Data Documentation

◆ d

template<typename T >
T MR::Plane3< T >::d = 0

◆ n

template<typename T >
Vector3<T> MR::Plane3< T >::n

The documentation for this struct was generated from the following file: