MeshLib C++ Docs
Loading...
Searching...
No Matches
MRMinimalSurface.h
Go to the documentation of this file.
1#pragma once
2
3#include <MRMesh/MRMeshFwd.h>
4#include <MRMesh/MRExpected.h>
6
7
8namespace MR::TPMS // Triply Periodic Minimal Surface
9{
10
11
13enum class Type : int
14{
17 Gyroid,
19
20 Count
21};
22MRVOXELS_API std::vector<std::string> getTypeNames();
23
30MRVOXELS_API FunctionVolume buildVolume( Type type, const Vector3f& size, float frequency, float resolution );
31
33MRVOXELS_API Expected<Mesh> build( Type type, const Vector3f& size, float frequency, float resolution, float iso, ProgressCallback cb = {} );
34
36MRVOXELS_API Expected<Mesh> fill( Type type, const Mesh& mesh, float frequency, float resolution, float iso, ProgressCallback cb = {} );
37
39MRVOXELS_API size_t getNumberOfVoxels( const Mesh& mesh, float frequency, float resolution );
40
42MRVOXELS_API size_t getNumberOfVoxels( const Vector3f& size, float frequency, float resolution );
43
47MRVOXELS_API float estimateIso( Type type, float targetDensity );
48
52MRVOXELS_API float estimateDensity( Type type, float targetIso );
53
54}
#define MRVOXELS_API
Definition MRVoxels/MRVoxelsFwd.h:13
std::function< bool(float)> ProgressCallback
Definition MRMesh/MRMeshFwd.h:728
Definition MRMinimalSurface.h:9
MRVOXELS_API float estimateDensity(Type type, float targetIso)
MRVOXELS_API Expected< Mesh > build(Type type, const Vector3f &size, float frequency, float resolution, float iso, ProgressCallback cb={})
Constructs TPMS level-set and then convert it to mesh.
MRVOXELS_API FunctionVolume buildVolume(Type type, const Vector3f &size, float frequency, float resolution)
MRVOXELS_API std::vector< std::string > getTypeNames()
MRVOXELS_API float estimateIso(Type type, float targetDensity)
MRVOXELS_API size_t getNumberOfVoxels(const Mesh &mesh, float frequency, float resolution)
Returns number of voxels that would be used to perform fillWithTPMS.
Type
Supported types of TPMS (Triply Periodic Minimal Surfaces)
Definition MRMinimalSurface.h:14
MRVOXELS_API Expected< Mesh > fill(Type type, const Mesh &mesh, float frequency, float resolution, float iso, ProgressCallback cb={})
Constructs TPMS-filling for the given mesh.
ImVec2 size(const ViewportRectangle &rect)
Definition MRViewport.h:29
tl::expected< T, E > Expected
Definition MRExpected.h:25
Definition MRMesh/MRMesh.h:23