MeshLib
 
Loading...
Searching...
No Matches
MRRegularGridMesh.h
Go to the documentation of this file.
1#pragma once
2#include "MRMeshFwd.h"
3#include "MRMesh.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
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
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
29}
List< Vector3f^> VertCoords
Definition MRDotNet/MRMeshFwd.h:95
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:46
std::function< bool(float)> ProgressCallback
Definition MRMesh/MRMeshFwd.h:589
auto width(const Box< V > &box)
returns size along x axis
Definition MRMesh/MRBox.h:230
auto height(const Box< V > &box)
returns size along y axis
Definition MRMesh/MRBox.h:237
Definition MRCameraOrientationPlugin.h:7
std::function< bool(size_t x, size_t y)> RegularGridLatticeValidator
Definition MRRegularGridMesh.h:13
MRMESH_API Expected< Mesh > makeRegularGridMesh(size_t width, size_t height, const RegularGridLatticeValidator &validator, const RegularGridLatticePositioner &positioner, const RegularGridMeshFaceValidator &faceValidator={}, ProgressCallback cb={})
std::function< Vector3f(size_t x, size_t y)> RegularGridLatticePositioner
Definition MRRegularGridMesh.h:15
Vector3< float > Vector3f
Definition MRDotNet/MRMeshFwd.h:8
tl::expected< T, E > Expected
Definition MRExpected.h:49
std::function< bool(size_t x0, size_t y0, size_t x1, size_t y1, size_t x2, size_t y2)> RegularGridMeshFaceValidator
Definition MRRegularGridMesh.h:17