MeshLib C++ Docs
Loading...
Searching...
No Matches
MRAlignTextToMesh.h
Go to the documentation of this file.
1#pragma once
2
3#include "MRSymbolMeshFwd.h"
4#include "MRSymbolMesh.h"
5
6#include "MRMesh/MRExpected.h"
7#include "MRMesh/MRId.h"
8#include "MRMesh/MRVector3.h"
10#include "MRMesh/MRCurve.h"
11
12namespace MR
13{
14
15struct TextMeshAlignParams : SymbolMeshParams
16{
18 MeshTriPoint startPoint;
19
22 Vector2f pivotPoint{0.0f, 0.0f};
23
25 Vector3f direction;
26
28 const Vector3f* textNormal{nullptr};
29
31 float fontHeight{1.0f};
32
34 float surfaceOffset{1.0f};
35
37 float textMaximumMovement{2.5f};
38
40 bool fontBasedSizeCalc{ false };
41};
42
44MRSYMBOLMESH_API Expected<Mesh> alignTextToMesh( const Mesh& mesh, const TextMeshAlignParams& params );
45
47{
50
52 float pivotCurveTime = 0;
53
56 Vector2f pivotBoxPoint{0.0f, 0.0f};
57
58 // Font height, meters
59 float fontHeight{1.0f};
60
61 // Text mesh inside and outside offset of curve's surface
62 float surfaceOffset{1.0f};
63
64 // If true then size of each symbol will be calculated from font height, otherwise - on bounding box of the text
65 bool fontBasedSizeCalc{ false };
66
68 bool periodicCurve = false;
69
71 bool stretch = true;
72};
73
76MRSYMBOLMESH_API Expected<Mesh> bendTextAlongCurve( const CurveFunc& curve, const BendTextAlongCurveParams& params );
77
79MRSYMBOLMESH_API Expected<Mesh> bendTextAlongCurve( const CurvePoints& curve, const BendTextAlongCurveParams& params );
80
83 const MeshTriPoint & start, const SurfacePath& path, const MeshTriPoint & end, const BendTextAlongCurveParams& params );
84
87 const SurfacePath& path, const BendTextAlongCurveParams& params );
88
89} // namespace MR
#define MRSYMBOLMESH_API
Definition MRSymbolMeshFwd.h:12
Definition MRAlignTextToMesh.h:47
new unsafe ref bool periodicCurve
new unsafe ref float pivotCurveTime
new unsafe MR.SymbolMeshParams symbolMesh
new unsafe ref bool stretch
new unsafe ref MR.Vector2f pivotBoxPoint
Definition MRMeshTriPoint.h:23
Definition MRMesh/MRMesh.h:23
Definition MRSymbolMesh.h:22
Definition MRAlignTextToMesh.h:16
new unsafe ref MR.Vector2f pivotPoint
new unsafe ref float textMaximumMovement
new unsafe ref bool fontBasedSizeCalc
new unsafe ref MR.Vector3f direction
new unsafe MR.? ConstBox_Vector3f textNormal
new unsafe ref float fontHeight
new unsafe MR.MeshTriPoint startPoint
new unsafe ref float surfaceOffset
MR_BIND_IGNORE auto end(const BitSet &)
Definition MRMesh/MRBitSet.h:382
Definition MRCameraOrientationPlugin.h:8
MRSYMBOLMESH_API Expected< Mesh > bendTextAlongCurve(const CurveFunc &curve, const BendTextAlongCurveParams &params)
MRSYMBOLMESH_API Expected< Mesh > bendTextAlongSurfacePath(const Mesh &mesh, const MeshTriPoint &start, const SurfacePath &path, const MeshTriPoint &end, const BendTextAlongCurveParams &params)
Creates symbol mesh and deforms it along given surface path: start->path->end.
MRSYMBOLMESH_API Expected< Mesh > alignTextToMesh(const Mesh &mesh, const TextMeshAlignParams &params)
Creates symbol mesh and aligns it to given surface.