MeshLib C++ Docs
Loading...
Searching...
No Matches
MRAlignContoursToMesh.h
Go to the documentation of this file.
1#pragma once
2#include "MRMeshFwd.h"
3#include "MRExpected.h"
4#include "MRId.h"
5#include "MRVector2.h"
6#include "MRVector3.h"
7#include "MRMeshTriPoint.h"
8#include "MRCurve.h"
9
10namespace MR
11{
12
15{
18
21 Vector2f pivotPoint{ 0.0f, 0.0f };
22
24 Vector3f xDirection;
25
28 const Vector3f* zDirection{ nullptr };
29
31 float extrusion{ 1.0f };
32
34 float maximumShift{ 2.5f };
35};
36
39
42{
44 float pivotCurveTime = 0;
45
48 Vector2f pivotBoxPoint{0.0f, 0.0f};
49
52
54 bool stretch = true;
55
57 float extrusion{ 1.0f };
58};
59
62
65MRMESH_API void addBaseToPlanarMesh( Mesh& mesh, float zOffset );
66
67}
#define MRMESH_API
Definition MRMeshFwd.h:80
Definition MRCameraOrientationPlugin.h:8
MRMESH_API void addBaseToPlanarMesh(Mesh &mesh, float zOffset)
MRMESH_API Expected< Mesh > alignContoursToMesh(const Mesh &mesh, const Contours2f &contours, const ContoursMeshAlignParams &params)
Creates planar mesh out of given contour and aligns it to given surface.
MRMESH_API Expected< Mesh > bendContoursAlongCurve(const Contours2f &contours, const BendContoursAlongCurveParams &params)
Converts contours in thick mesh, and deforms it along given path.
tl::expected< T, E > Expected
Definition MRExpected.h:28
Contours2< float > Contours2f
Definition MRMeshFwd.h:385
std::function< CurvePoint(float)> CurveFunc
curve given as a function: time -> point
Definition MRCurve.h:17
Parameters for aligning 2d contours along given curve.
Definition MRAlignContoursToMesh.h:42
float extrusion
Contours extrusion outside of curve level.
Definition MRAlignContoursToMesh.h:57
CurveFunc curve
converts (x in [0,1], pivotY) into position on curve
Definition MRAlignContoursToMesh.h:51
Vector2f pivotBoxPoint
Definition MRAlignContoursToMesh.h:48
bool stretch
stretch all contours along curve to fit in unit curve range
Definition MRAlignContoursToMesh.h:54
float pivotCurveTime
Position on the curve, where bounding box's pivot point is mapped.
Definition MRAlignContoursToMesh.h:44
Parameters for aligning 2d contours onto mesh surface.
Definition MRAlignContoursToMesh.h:15
const Vector3f * zDirection
Definition MRAlignContoursToMesh.h:28
float extrusion
Contours extrusion in +z and -z direction.
Definition MRAlignContoursToMesh.h:31
Vector3f xDirection
Represents 2d contours xDirection in mesh space.
Definition MRAlignContoursToMesh.h:24
float maximumShift
Maximum allowed shift along 'zDirection' for alignment.
Definition MRAlignContoursToMesh.h:34
Vector2f pivotPoint
Definition MRAlignContoursToMesh.h:21
MeshTriPoint meshPoint
Point coordinate on mesh, represent position of contours box 'pivotPoint' on mesh.
Definition MRAlignContoursToMesh.h:17
Definition MRMeshTriPoint.h:23
Definition MRMesh/MRMesh.h:23