MeshLib Documentation
Loading...
Searching...
No Matches
MREmbedTerrainStructure.h
Go to the documentation of this file.
1#pragma once
2#include "MRMeshFwd.h"
3#include "MRMesh.h"
4#include "MRBitSet.h"
5#include "MRExpected.h"
6
7namespace MR
8{
9
10// Parameters of structure embedding in terrain
12{
13 // angle of fill cone (mound)
14 float fillAngle = 0.0f;
15 // angle of cut cone (pit)
16 float cutAngle = 0.0f;
17 // min angle precision of basin expansion
18 float minAnglePrecision = PI_F / 9.0f; // 20 deg
19 // optional out new faces of embedded structure
20 FaceBitSet* outStructFaces{ nullptr };
21 // optional out new faces of fill part
22 FaceBitSet* outFillFaces{ nullptr };
23 // optional out new faces of cut part
24 FaceBitSet* outCutFaces{ nullptr };
25 // optional out map new terrain faces to old terrain faces
26 FaceMap* new2oldFaces{ nullptr };
27};
28
29// Returns terrain mesh with structure embedded to it, or error string
30// terrain - mesh with +Z normal (not-closed mesh is expected)
31// structure - mesh with one open contour and +Z normal, that will be embedded in terrain
32[[nodiscard]] MRMESH_API Expected<Mesh> embedStructureToTerrain( const Mesh& terrain, const Mesh& structure,
33 const EmbeddedStructureParameters& params );
34
35}
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:46
Definition MRCameraOrientationPlugin.h:8
tl::expected< T, E > Expected
Definition MRExpected.h:58
MRMESH_API Expected< Mesh > embedStructureToTerrain(const Mesh &terrain, const Mesh &structure, const EmbeddedStructureParameters &params)
Definition MREmbedTerrainStructure.h:12
float cutAngle
Definition MREmbedTerrainStructure.h:16
FaceBitSet * outFillFaces
Definition MREmbedTerrainStructure.h:22
FaceMap * new2oldFaces
Definition MREmbedTerrainStructure.h:26
FaceBitSet * outStructFaces
Definition MREmbedTerrainStructure.h:20
float fillAngle
Definition MREmbedTerrainStructure.h:14
float minAnglePrecision
Definition MREmbedTerrainStructure.h:18
FaceBitSet * outCutFaces
Definition MREmbedTerrainStructure.h:24
Definition MRMesh/MRMesh.h:23