MeshLib Documentation
Loading...
Searching...
No Matches
MR::ContourToDistanceMapParams Struct Reference

Structure with parameters to generate DistanceMap by Contours. More...

#include <MRDistanceMapParams.h>

Public Member Functions

 ContourToDistanceMapParams ()=default
 Default ctor, make sure to fill all fields manually.
 
MRMESH_API ContourToDistanceMapParams (const Vector2i &resolution, const Vector2f &oriPoint, const Vector2f &areaSize, bool withSign=false)
 Ctor, calculating pixelSize by areaSize & dmapSize.
 
MRMESH_API ContourToDistanceMapParams (const Vector2i &resolution, const Box2f &box, bool withSign=false)
 Ctor, calculating pixelSize & oriPoint by box parameters.
 
MRMESH_API ContourToDistanceMapParams (const Vector2i &resolution, const Contours2f &contours, float offset, bool withSign=false)
 Ctor, calculating pixelSize & oriPoint by contours box + offset.
 
MRMESH_API ContourToDistanceMapParams (float pixelSize, const Contours2f &contours, float offset, bool withSign=false)
 Ctor, calculating resolution & oriPoint by contours box + offset.
 
MRMESH_API ContourToDistanceMapParams (const DistanceMapToWorld &toWorld)
 
Vector2f toWorld (Vector2f point) const
 
 operator AffineXf3f () const
 converts in transformation
 
AffineXf3f xf () const
 

Public Attributes

Vector2f pixelSize { 1.F, 1.F }
 pixel size
 
Vector2i resolution { 1, 1 }
 distance map size
 
Vector2f orgPoint { 0.F, 0.F }
 coordinates of origin area corner
 
bool withSign { false }
 allows calculate negative values of distance (inside closed and correctly oriented (CW) contours)
 

Detailed Description

Structure with parameters to generate DistanceMap by Contours.

Constructor & Destructor Documentation

◆ ContourToDistanceMapParams() [1/6]

MR::ContourToDistanceMapParams::ContourToDistanceMapParams ( )
default

Default ctor, make sure to fill all fields manually.

◆ ContourToDistanceMapParams() [2/6]

MRMESH_API MR::ContourToDistanceMapParams::ContourToDistanceMapParams ( const Vector2i & resolution,
const Vector2f & oriPoint,
const Vector2f & areaSize,
bool withSign = false )

Ctor, calculating pixelSize by areaSize & dmapSize.

◆ ContourToDistanceMapParams() [3/6]

MRMESH_API MR::ContourToDistanceMapParams::ContourToDistanceMapParams ( const Vector2i & resolution,
const Box2f & box,
bool withSign = false )

Ctor, calculating pixelSize & oriPoint by box parameters.

◆ ContourToDistanceMapParams() [4/6]

MRMESH_API MR::ContourToDistanceMapParams::ContourToDistanceMapParams ( const Vector2i & resolution,
const Contours2f & contours,
float offset,
bool withSign = false )

Ctor, calculating pixelSize & oriPoint by contours box + offset.

◆ ContourToDistanceMapParams() [5/6]

MRMESH_API MR::ContourToDistanceMapParams::ContourToDistanceMapParams ( float pixelSize,
const Contours2f & contours,
float offset,
bool withSign = false )

Ctor, calculating resolution & oriPoint by contours box + offset.

◆ ContourToDistanceMapParams() [6/6]

MRMESH_API MR::ContourToDistanceMapParams::ContourToDistanceMapParams ( const DistanceMapToWorld & toWorld)
explicit

Member Function Documentation

◆ operator AffineXf3f()

MR::ContourToDistanceMapParams::operator AffineXf3f ( ) const
inline

converts in transformation

◆ toWorld()

Vector2f MR::ContourToDistanceMapParams::toWorld ( Vector2f point) const
inline

get world 2d coordinate (respects origin point and pixel size) point - coordinate on distance map

◆ xf()

AffineXf3f MR::ContourToDistanceMapParams::xf ( ) const
inline

Member Data Documentation

◆ orgPoint

Vector2f MR::ContourToDistanceMapParams::orgPoint { 0.F, 0.F }

coordinates of origin area corner

◆ pixelSize

Vector2f MR::ContourToDistanceMapParams::pixelSize { 1.F, 1.F }

pixel size

◆ resolution

Vector2i MR::ContourToDistanceMapParams::resolution { 1, 1 }

distance map size

◆ withSign

bool MR::ContourToDistanceMapParams::withSign { false }

allows calculate negative values of distance (inside closed and correctly oriented (CW) contours)


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