59 operator AffineXf3f()
const
63 AffineXf3f
xf()
const {
return operator AffineXf3f(); }
65 Vector3f
xRange = Vector3f( 1.f, 0.f, 0.f );
66 Vector3f
yRange = Vector3f( 0.f, 1.f, 0.f );
86 std::pair<Vector3f,Vector2f> orgSizeFromMeshPart_(
const Matrix3f& rotation,
const MeshPart& mp,
bool presiceBox )
const;
87 void initFromSize_(
const AffineXf3f& worldOrientation,
const Vector2i&
resolution,
const Vector2f&
size );
100 const Vector2f& areaSize,
bool withSign =
false );
107 float offset,
bool withSign =
false );
111 float offset,
bool withSign =
false );
122 operator AffineXf3f()
const
126 AffineXf3f
xf()
const {
return operator AffineXf3f(); }
166 operator AffineXf3f()
const
170 AffineXf3f
xf()
const {
return operator AffineXf3f(); }
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:46
auto depth(const Box< V > &box)
returns size along z axis
Definition MRMesh/MRBox.h:261
Definition MRCameraOrientationPlugin.h:8
ImVec2 size(const ViewportRectangle &rect)
Definition MRViewport.h:32
Contours2< float > Contours2f
Definition MRMesh/MRMeshFwd.h:283
Structure with parameters to generate DistanceMap by Contours.
Definition MRDistanceMapParams.h:94
MRMESH_API ContourToDistanceMapParams(const Vector2i &resolution, const Vector2f &oriPoint, const Vector2f &areaSize, bool withSign=false)
Ctor, calculating pixelSize by areaSize & dmapSize.
MRMESH_API ContourToDistanceMapParams(float pixelSize, const Contours2f &contours, float offset, bool withSign=false)
Ctor, calculating resolution & oriPoint by contours box + offset.
AffineXf3f xf() const
Definition MRDistanceMapParams.h:126
Vector2i resolution
distance map size
Definition MRDistanceMapParams.h:129
Vector2f orgPoint
coordinates of origin area corner
Definition MRDistanceMapParams.h:130
ContourToDistanceMapParams()=default
Default ctor, make sure to fill all fields manually.
MRMESH_API ContourToDistanceMapParams(const Vector2i &resolution, const Box2f &box, bool withSign=false)
Ctor, calculating pixelSize & oriPoint by box parameters.
Vector2f toWorld(Vector2f point) const
Definition MRDistanceMapParams.h:116
MRMESH_API ContourToDistanceMapParams(const DistanceMapToWorld &toWorld)
MRMESH_API ContourToDistanceMapParams(const Vector2i &resolution, const Contours2f &contours, float offset, bool withSign=false)
Ctor, calculating pixelSize & oriPoint by contours box + offset.
Vector2f pixelSize
pixel size
Definition MRDistanceMapParams.h:128
bool withSign
allows calculate negative values of distance (inside closed and correctly oriented (CW) contours)
Definition MRDistanceMapParams.h:131
This structure store data to transform distance map to world coordinates.
Definition MRDistanceMapParams.h:136
AffineXf3f xf() const
Definition MRDistanceMapParams.h:170
DistanceMapToWorld()=default
Default ctor init all fields with zeros, make sure to fill them manually.
Vector3f orgPoint
world coordinates of distance map origin corner
Definition MRDistanceMapParams.h:173
MRMESH_API DistanceMapToWorld(const ContourToDistanceMapParams ¶ms)
Init fields by ContourToDistanceMapParams struct.
DistanceMapToWorld(const AffineXf3f &xf)
Converts from AffineXf3f.
Definition MRDistanceMapParams.h:147
Vector3f pixelXVec
Definition MRDistanceMapParams.h:177
Vector3f direction
Definition MRDistanceMapParams.h:184
Vector3f toWorld(float x, float y, float depth) const
Definition MRDistanceMapParams.h:160
Vector3f pixelYVec
Definition MRDistanceMapParams.h:181
MRMESH_API DistanceMapToWorld(const MeshToDistanceMapParams ¶ms)
Init fields by MeshToDistanceMapParams struct.
Definition MRDistanceMapParams.h:17
float minValue
Using of this parameter depends on useDistanceLimits.
Definition MRDistanceMapParams.h:80
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)
float maxValue
Using of this parameter depends on useDistanceLimits.
Definition MRDistanceMapParams.h:81
Vector3f direction
direction of intersection ray
Definition MRDistanceMapParams.h:67
Vector3f yRange
Cartesian range vector between distance map borders in Y direction.
Definition MRDistanceMapParams.h:66
void setDistanceLimits(float min, float max)
Definition MRDistanceMapParams.h:72
Vector2i resolution
resolution of distance map
Definition MRDistanceMapParams.h:83
MRMESH_API MeshToDistanceMapParams(const AffineXf3f &xf, const Vector2f &pixelSize, const Vector2i &resolution)
MRMESH_API MeshToDistanceMapParams(const Matrix3f &rotation, const Vector2i &resolution, const MeshPart &mp, bool usePreciseBoundingBox=false)
bool allowNegativeValues
allows to find intersections in backward to direction vector with negative values
Definition MRDistanceMapParams.h:79
Vector3f orgPoint
location of (0,0) pixel with value 0.f
Definition MRDistanceMapParams.h:68
Vector3f xRange
Cartesian range vector between distance map borders in X direction.
Definition MRDistanceMapParams.h:65
MRMESH_API MeshToDistanceMapParams(const Vector3f &direction, const Vector2i &resolution, const MeshPart &mp, bool usePreciseBoundingBox=false)
bool useDistanceLimits
out of limits intersections will be set to non-valid
Definition MRDistanceMapParams.h:78
MeshToDistanceMapParams()=default
default constructor. Manual params initialization is required:
AffineXf3f xf() const
Definition MRDistanceMapParams.h:63
MRMESH_API MeshToDistanceMapParams(const Vector3f &direction, const Vector2f &pixelSize, const MeshPart &mp, bool usePreciseBoundingBox=false)
MRMESH_API MeshToDistanceMapParams(const AffineXf3f &xf, const Vector2i &resolution, const Vector2f &size)