MeshLib C++ Docs
Loading...
Searching...
No Matches
MRRegularGridMesh.h
Go to the documentation of this file.
1#pragma once
2
3#include "MRMeshFwd.h"
4#include "MRVector3.h"
6#include "MRExpected.h"
7#include <functional>
8
9namespace MR
10{
11
12// Lambda for validating grid lattice
13using RegularGridLatticeValidator = std::function<bool( size_t x, size_t y )>;
14// Lambda for getting lattice position
15using RegularGridLatticePositioner = std::function<Vector3f( size_t x, size_t y )>;
16// Lambda for validating mesh face
17using RegularGridMeshFaceValidator =
18 std::function<bool( size_t x0, size_t y0, size_t x1, size_t y1, size_t x2, size_t y2 )>;
19
20// Creates regular mesh with points in valid grid lattice
21MRMESH_API Expected<Mesh> makeRegularGridMesh( size_t width, size_t height,
22 const RegularGridLatticeValidator& validator,
23 const RegularGridLatticePositioner& positioner,
24 const RegularGridMeshFaceValidator& faceValidator = {},
25 ProgressCallback cb = {} );
26
27// Creates regular mesh from monotone (connects point with closed x, y neighbors) points
28MRMESH_API Expected<Mesh> makeRegularGridMesh( VertCoords pc, ProgressCallback cb = {} );
29}
#define MRMESH_API
Definition MRMeshFwd.h:80
auto width(const Box< V > &box)
returns size along x axis
Definition MRMesh/MRBox.h:354
auto height(const Box< V > &box)
returns size along y axis
Definition MRMesh/MRBox.h:361
Definition MRCameraOrientationPlugin.h:8
MRMESH_API Expected< Mesh > makeRegularGridMesh(size_t width, size_t height, const RegularGridLatticeValidator &validator, const RegularGridLatticePositioner &positioner, const RegularGridMeshFaceValidator &faceValidator={}, ProgressCallback cb={})