MeshLib
 
Loading...
Searching...
No Matches
MR::DistanceMapToWorld Struct Reference

This structure store data to transform distance map to world coordinates. More...

#include <MRDistanceMapParams.h>

Public Member Functions

 DistanceMapToWorld ()=default
 Default ctor init all fields with zeros, make sure to fill them manually.
 
MRMESH_API DistanceMapToWorld (const MeshToDistanceMapParams &params)
 Init fields by MeshToDistanceMapParams struct.
 
MRMESH_API DistanceMapToWorld (const ContourToDistanceMapParams &params)
 Init fields by ContourToDistanceMapParams struct.
 
 DistanceMapToWorld (const AffineXf3f &xf)
 Converts from AffineXf3f.
 
Vector3f toWorld (float x, float y, float depth) const
 
 operator AffineXf3f () const
 converts in transformation X: X(p) == toWorld( p.x, p.y, p.z )
 
AffineXf3f xf () const
 

Public Attributes

Vector3f orgPoint
 world coordinates of distance map origin corner
 
Vector3f pixelXVec { Vector3f::plusX() }
 
Vector3f pixelYVec { Vector3f::plusY() }
 
Vector3f direction { Vector3f::plusZ() }
 

Detailed Description

This structure store data to transform distance map to world coordinates.

Constructor & Destructor Documentation

◆ DistanceMapToWorld() [1/4]

MR::DistanceMapToWorld::DistanceMapToWorld ( )
default

Default ctor init all fields with zeros, make sure to fill them manually.

◆ DistanceMapToWorld() [2/4]

MRMESH_API MR::DistanceMapToWorld::DistanceMapToWorld ( const MeshToDistanceMapParams & params)

Init fields by MeshToDistanceMapParams struct.

◆ DistanceMapToWorld() [3/4]

MRMESH_API MR::DistanceMapToWorld::DistanceMapToWorld ( const ContourToDistanceMapParams & params)

Init fields by ContourToDistanceMapParams struct.

◆ DistanceMapToWorld() [4/4]

MR::DistanceMapToWorld::DistanceMapToWorld ( const AffineXf3f & xf)
inline

Converts from AffineXf3f.

Member Function Documentation

◆ operator AffineXf3f()

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

converts in transformation X: X(p) == toWorld( p.x, p.y, p.z )

◆ toWorld()

Vector3f MR::DistanceMapToWorld::toWorld ( float x,
float y,
float depth ) const
inline

get world coordinate by depth map info x - float X coordinate of depth map: (0.0f - left corner of pixel 0, 1.0 - right corner of pixel 0 and left corner of pixel 1) y - float Y coordinate of depth map: (0.0f - left corner of pixel 0, 1.0 - right corner of pixel 0 and left corner of pixel 1) float depth value (value in distance map, represent depth in world)

◆ xf()

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

Member Data Documentation

◆ direction

Vector3f MR::DistanceMapToWorld::direction { Vector3f::plusZ() }

vector of depth direction

Note
typically it should be normalized and orthogonal to pixelXVec pixelYVec plane

◆ orgPoint

Vector3f MR::DistanceMapToWorld::orgPoint

world coordinates of distance map origin corner

◆ pixelXVec

Vector3f MR::DistanceMapToWorld::pixelXVec { Vector3f::plusX() }

vector in world space of pixel x positive direction length is equal to pixel size

Note
typically it should be orthogonal to pixelYVec

◆ pixelYVec

Vector3f MR::DistanceMapToWorld::pixelYVec { Vector3f::plusY() }

vector in world space of pixel y positive direction length is equal to pixel size

Note
typically it should be orthogonal to pixelXVec

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