DGtal 2.0.0
Loading...
Searching...
No Matches
MedianPlane< Naive, Symmetric > Struct Template Reference
Inheritance diagram for MedianPlane< Naive, Symmetric >:
[legend]

Public Member Functions

 MedianPlane ()=default
 MedianPlane (const MedianPlane &other)=default
 MedianPlane (MedianPlane &&other)=default
MedianPlaneoperator= (const MedianPlane &other)=default
MedianPlaneoperator= (MedianPlane &&other)=default
 MedianPlane (Point p, Point q, Point r)
bool operator() (const Point &p) const

Data Fields

Vector N
Integer mu
Integer omega

Detailed Description

template<bool Naive, bool Symmetric>
struct MedianPlane< Naive, Symmetric >
Examples
geometry/volumes/standardDigitalPolyhedronBuilder3D.cpp.

Definition at line 92 of file standardDigitalPolyhedronBuilder3D.cpp.

Constructor & Destructor Documentation

◆ MedianPlane() [1/4]

template<bool Naive, bool Symmetric>
MedianPlane< Naive, Symmetric >::MedianPlane ( )
default

◆ MedianPlane() [2/4]

template<bool Naive, bool Symmetric>
MedianPlane< Naive, Symmetric >::MedianPlane ( const MedianPlane< Naive, Symmetric > & other)
default

◆ MedianPlane() [3/4]

template<bool Naive, bool Symmetric>
MedianPlane< Naive, Symmetric >::MedianPlane ( MedianPlane< Naive, Symmetric > && other)
default

◆ MedianPlane() [4/4]

template<bool Naive, bool Symmetric>
MedianPlane< Naive, Symmetric >::MedianPlane ( Point p,
Point q,
Point r )
inline

Definition at line 101 of file standardDigitalPolyhedronBuilder3D.cpp.

102 : N ( ( q - p ).crossProduct( r - p ) )
103 {
104 mu = N.dot( p );
105 omega = Naive ? N.norm( N.L_infty ) : N.norm( N.L_1 );
106 if ( Symmetric && ( ( omega & 1 ) == 0 ) ) omega += 1;
107 mu -= omega / 2;
108 }
auto crossProduct(PointVector< 3, LeftEuclideanRing, LeftContainer > const &lhs, PointVector< 3, RightEuclideanRing, RightContainer > const &rhs) -> decltype(DGtal::constructFromArithmeticConversion(lhs, rhs))
Cross product of two 3D Points/Vectors.

Member Function Documentation

◆ operator()()

template<bool Naive, bool Symmetric>
bool MedianPlane< Naive, Symmetric >::operator() ( const Point & p) const
inline
Examples
geometry/volumes/standardDigitalPolyhedronBuilder3D.cpp.

Definition at line 109 of file standardDigitalPolyhedronBuilder3D.cpp.

110 {
111 auto r = N.dot( p );
112 return ( mu <= r ) && ( r < mu+omega );
113 }

◆ operator=() [1/2]

template<bool Naive, bool Symmetric>
MedianPlane & MedianPlane< Naive, Symmetric >::operator= ( const MedianPlane< Naive, Symmetric > & other)
default

◆ operator=() [2/2]

template<bool Naive, bool Symmetric>
MedianPlane & MedianPlane< Naive, Symmetric >::operator= ( MedianPlane< Naive, Symmetric > && other)
default

Field Documentation

◆ mu

template<bool Naive, bool Symmetric>
Integer MedianPlane< Naive, Symmetric >::mu

◆ N

template<bool Naive, bool Symmetric>
Vector MedianPlane< Naive, Symmetric >::N

◆ omega

template<bool Naive, bool Symmetric>
Integer MedianPlane< Naive, Symmetric >::omega

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