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

#include <MRDistanceMapParams.h>

Public Member Functions

 MeshToDistanceMapParams ()=default
 default constructor. Manual params initialization is required:
 
MRMESH_API MeshToDistanceMapParams (const Vector3f &direction, const Vector2i &resolution, const MeshPart &mp, bool usePreciseBoundingBox=false)
 
MRMESH_API MeshToDistanceMapParams (const Vector3f &direction, const Vector2f &pixelSize, const MeshPart &mp, bool usePreciseBoundingBox=false)
 
MRMESH_API MeshToDistanceMapParams (const Matrix3f &rotation, const Vector3f &origin, const Vector2i &resolution, const Vector2f &size)
 
MRMESH_API MeshToDistanceMapParams (const Matrix3f &rotation, const Vector3f &origin, const Vector2f &pixelSize, const Vector2i &resolution)
 
MRMESH_API MeshToDistanceMapParams (const Matrix3f &rotation, const Vector2i &resolution, const MeshPart &mp, bool usePreciseBoundingBox=false)
 
MRMESH_API MeshToDistanceMapParams (const AffineXf3f &xf, const Vector2i &resolution, const Vector2f &size)
 
MRMESH_API MeshToDistanceMapParams (const AffineXf3f &xf, const Vector2f &pixelSize, const Vector2i &resolution)
 
 operator AffineXf3f () const
 converts in transformation
 
AffineXf3f xf () const
 
void setDistanceLimits (float min, float max)
 

Public Attributes

Vector3f xRange = Vector3f( 1.f, 0.f, 0.f )
 Cartesian range vector between distance map borders in X direction.
 
Vector3f yRange = Vector3f( 0.f, 1.f, 0.f )
 Cartesian range vector between distance map borders in Y direction.
 
Vector3f direction = Vector3f( 0.f, 0.f, 1.f )
 direction of intersection ray
 
Vector3f orgPoint = Vector3f( 0.f, 0.f, 0.f )
 location of (0,0) pixel with value 0.f
 
bool useDistanceLimits = false
 out of limits intersections will be set to non-valid
 
bool allowNegativeValues = false
 allows to find intersections in backward to direction vector with negative values
 
float minValue = 0.f
 Using of this parameter depends on useDistanceLimits.
 
float maxValue = 0.f
 Using of this parameter depends on useDistanceLimits.
 
Vector2i resolution
 resolution of distance map
 

Constructor & Destructor Documentation

◆ MeshToDistanceMapParams() [1/8]

MR::MeshToDistanceMapParams::MeshToDistanceMapParams ( )
default

default constructor. Manual params initialization is required:

◆ MeshToDistanceMapParams() [2/8]

MRMESH_API MR::MeshToDistanceMapParams::MeshToDistanceMapParams ( const Vector3f & direction,
const Vector2i & resolution,
const MeshPart & mp,
bool usePreciseBoundingBox = false )

direction vector shows the projections vector to the distance map for points on model yRange and xRange directions make orthonormal basis with direction see Vector3<T>::perpendicular() for more details All Output Distance map values will be positive usePreciseBoundingBox false (fast): use general (cached) bounding box with applied rotation usePreciseBoundingBox true (slow): compute bounding box from points with respect to rotation

◆ MeshToDistanceMapParams() [3/8]

MRMESH_API MR::MeshToDistanceMapParams::MeshToDistanceMapParams ( const Vector3f & direction,
const Vector2f & pixelSize,
const MeshPart & mp,
bool usePreciseBoundingBox = false )

◆ MeshToDistanceMapParams() [4/8]

MRMESH_API MR::MeshToDistanceMapParams::MeshToDistanceMapParams ( const Matrix3f & rotation,
const Vector3f & origin,
const Vector2i & resolution,
const Vector2f & size )

input matrix should be orthonormal! rotation.z - direction rotation.x * (box X length) - xRange rotation.y * (box Y length) - yRange All Output Distance map values will be positive

◆ MeshToDistanceMapParams() [5/8]

MRMESH_API MR::MeshToDistanceMapParams::MeshToDistanceMapParams ( const Matrix3f & rotation,
const Vector3f & origin,
const Vector2f & pixelSize,
const Vector2i & resolution )

◆ MeshToDistanceMapParams() [6/8]

MRMESH_API MR::MeshToDistanceMapParams::MeshToDistanceMapParams ( const Matrix3f & rotation,
const Vector2i & resolution,
const MeshPart & mp,
bool usePreciseBoundingBox = false )

input matrix should be orthonormal! rotation.z - direction rotation.x * (box X length) - xRange rotation.y * (box Y length) - yRange All Output Distance map values will be positive usePreciseBoundingBox false (fast): use general (cached) bounding box with applied rotation usePreciseBoundingBox true (slow): compute bounding box from points with respect to rotation

◆ MeshToDistanceMapParams() [7/8]

MRMESH_API MR::MeshToDistanceMapParams::MeshToDistanceMapParams ( const AffineXf3f & xf,
const Vector2i & resolution,
const Vector2f & size )

The most general constructor. Use it if you have to find special view, resolution, distance map with visual the part of the model etc. All params match is in the user responsibility xf.b - origin point: pixel(0,0) with value 0. xf.A.z - direction xf.A.x - xRange xf.A.y - yRange All Output Distance map values could be positive and negative by default. Set allowNegativeValues to false if negative values are not required

◆ MeshToDistanceMapParams() [8/8]

MRMESH_API MR::MeshToDistanceMapParams::MeshToDistanceMapParams ( const AffineXf3f & xf,
const Vector2f & pixelSize,
const Vector2i & resolution )

Member Function Documentation

◆ operator AffineXf3f()

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

converts in transformation

◆ setDistanceLimits()

void MR::MeshToDistanceMapParams::setDistanceLimits ( float min,
float max )
inline

if distance is not in set range, pixel became invalid default value: false. Any distance will be applied (include negative)

◆ xf()

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

Member Data Documentation

◆ allowNegativeValues

bool MR::MeshToDistanceMapParams::allowNegativeValues = false

allows to find intersections in backward to direction vector with negative values

◆ direction

Vector3f MR::MeshToDistanceMapParams::direction = Vector3f( 0.f, 0.f, 1.f )

direction of intersection ray

◆ maxValue

float MR::MeshToDistanceMapParams::maxValue = 0.f

Using of this parameter depends on useDistanceLimits.

◆ minValue

float MR::MeshToDistanceMapParams::minValue = 0.f

Using of this parameter depends on useDistanceLimits.

◆ orgPoint

Vector3f MR::MeshToDistanceMapParams::orgPoint = Vector3f( 0.f, 0.f, 0.f )

location of (0,0) pixel with value 0.f

◆ resolution

Vector2i MR::MeshToDistanceMapParams::resolution

resolution of distance map

◆ useDistanceLimits

bool MR::MeshToDistanceMapParams::useDistanceLimits = false

out of limits intersections will be set to non-valid

◆ xRange

Vector3f MR::MeshToDistanceMapParams::xRange = Vector3f( 1.f, 0.f, 0.f )

Cartesian range vector between distance map borders in X direction.

◆ yRange

Vector3f MR::MeshToDistanceMapParams::yRange = Vector3f( 0.f, 1.f, 0.f )

Cartesian range vector between distance map borders in Y direction.


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