MeshLib C++ Docs
Loading...
Searching...
No Matches
Contour

Functions

template<typename T , typename R = T>
MR::calcOrientedArea (const Contour2< T > &contour)
 
template<typename T , typename R = T>
Vector3< R > MR::calcOrientedArea (const Contour3< T > &contour)
 
template<typename V , typename R = typename V::ValueType>
MR::calcLength (const Contour< V > &contour)
 
template<typename To , typename From >
MR_BIND_IGNORE To MR::convertContour (const From &from)
 
template<typename To , typename From >
MR_BIND_IGNORE To MR::convertContours (const From &from)
 

Detailed Description

Function Documentation

◆ calcLength()

template<typename V , typename R = typename V::ValueType>
R MR::calcLength ( const Contour< V > & contour)

returns sum length of the given contour

Template Parameters
Ris the type for the accumulation and for result

◆ calcOrientedArea() [1/2]

template<typename T , typename R = T>
R MR::calcOrientedArea ( const Contour2< T > & contour)

>0 for clockwise loop, < 0 for CCW loop

Template Parameters
Ris the type for the accumulation and for result

◆ calcOrientedArea() [2/2]

template<typename T , typename R = T>
Vector3< R > MR::calcOrientedArea ( const Contour3< T > & contour)

returns the vector with the magnitude equal to contour area, and directed to see the contour in ccw order from the vector tip

Template Parameters
Ris the type for the accumulation and for result

◆ convertContour()

template<typename To , typename From >
MR_BIND_IGNORE To MR::convertContour ( const From & from)

Copy double-contour to float-contour, or vice versa. Also handles 2D-3D conversions (zeroing or dropping the Z component). This is excluded from the bindings for simplicity. While it does bind (if manually instantiated), the resulting names are quite ugly. Instead we provide wrapper functions with nicer names below.

◆ convertContours()

template<typename To , typename From >
MR_BIND_IGNORE To MR::convertContours ( const From & from)

Copy double-contours to float-contours, or vice versa. Also handles 2D-3D conversions (zeroing or dropping the Z component). This is excluded from the bindings for simplicity. While it does bind (if manually instantiated), the resulting names are quite ugly. Instead we provide wrapper functions with nicer names below.