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{
13
14
16using RegularGridLatticeValidator = std::function<bool( size_t x, size_t y )>;
18using RegularGridLatticePositioner = std::function<Vector3f( size_t x, size_t y )>;
21 std::function<bool( size_t x0, size_t y0, size_t x1, size_t y1, size_t x2, size_t y2 )>;
22
25 const RegularGridLatticeValidator& validator,
26 const RegularGridLatticePositioner& positioner,
27 const RegularGridMeshFaceValidator& faceValidator = {},
28 ProgressCallback cb = {} );
29
31MRMESH_API Expected<Mesh> makeRegularGridMesh( VertCoords pc, ProgressCallback cb = {} );
32}
auto width(const Box< V > &box)
returns size along x axis
Definition MRBox.h:354
auto height(const Box< V > &box)
returns size along y axis
Definition MRBox.h:361
std::function< bool(size_t x, size_t y)> RegularGridLatticeValidator
Lambda for validating grid lattice.
Definition MRRegularGridMesh.h:16
MRMESH_API Expected< Mesh > makeRegularGridMesh(size_t width, size_t height, const RegularGridLatticeValidator &validator, const RegularGridLatticePositioner &positioner, const RegularGridMeshFaceValidator &faceValidator={}, ProgressCallback cb={})
Creates regular mesh with points in valid grid lattice.
std::function< Vector3f(size_t x, size_t y)> RegularGridLatticePositioner
Lambda for getting lattice position.
Definition MRRegularGridMesh.h:18
tl::expected< T, E > Expected
Definition MRExpected.h:31
std::function< bool(size_t x0, size_t y0, size_t x1, size_t y1, size_t x2, size_t y2)> RegularGridMeshFaceValidator
Lambda for validating mesh face.
Definition MRRegularGridMesh.h:20
only for bindings generation
Definition MRCameraOrientationPlugin.h:8