MeshLib C++ Docs
Loading...
Searching...
No Matches
MRMeshC/MRVDBConversions.h
Go to the documentation of this file.
1#pragma once
2#include "MRVoxelsFwd.h"
3#include "MRAffineXf.h"
4
6
7// Conversion type
9{
10 MRMeshToVolumeSettingsTypeSigned, // only closed meshes can be converted with signed type
11 MRMeshToVolumeSettingsTypeUnsigned // this type leads to shell like iso-surfaces
13
14// Parameters structure for meshToVolume function
16{
17 MRMeshToVolumeSettingsType type; // Conversion type
18 float surfaceOffset; // the number of voxels around surface to calculate distance in (should be positive)
20 MRAffineXf3f worldXf; // mesh initial transform
21 MRAffineXf3f* outXf; // optional output: xf to original mesh (respecting worldXf)
24
26
27// eval min max value from FloatGrid
28MRMESHC_API void mrVdbConversionsEvalGridMinMax( const MRFloatGrid* grid, float* min, float* max );
29
30// convert mesh to volume in (0,0,0)-(dim.x,dim.y,dim.z) grid box
32
33// fills VdbVolume data from FloatGrid (does not fill voxels size, cause we expect it outside)
35
53
55
58
#define MR_EXTERN_C_BEGIN
Definition MRMeshC/MRMeshFwd.h:26
bool(* MRProgressCallback)(float)
Definition MRMeshC/MRMeshFwd.h:54
#define MR_EXTERN_C_END
Definition MRMeshC/MRMeshFwd.h:27
struct MRMesh MRMesh
Definition MRMeshC/MRMeshFwd.h:47
typedefMR_EXTERN_C_BEGIN struct MRString MRString
Definition MRMeshC/MRMeshFwd.h:32
#define MRMESHC_API
Definition MRMeshC/MRMeshFwd.h:19
MRMESHC_API void mrVdbConversionsEvalGridMinMax(const MRFloatGrid *grid, float *min, float *max)
MRMESHC_API MRMeshToVolumeSettings mrVdbConversionsMeshToVolumeSettingsNew(void)
MRMeshToVolumeSettingsType
Definition MRMeshC/MRVDBConversions.h:9
@ MRMeshToVolumeSettingsTypeSigned
Definition MRMeshC/MRVDBConversions.h:10
@ MRMeshToVolumeSettingsTypeUnsigned
Definition MRMeshC/MRVDBConversions.h:11
MRMESHC_API MRGridToMeshSettings mrVdbConversionsGridToMeshSettingsNew(void)
struct MRGridToMeshSettings MRGridToMeshSettings
parameters of OpenVDB Grid to Mesh conversion using Dual Marching Cubes algorithm
MRMESHC_API MRVdbVolume mrVdbConversionsFloatGridToVdbVolume(const MRFloatGrid *grid)
MRMESHC_API MRMesh * mrVdbConversionsGridToMesh(const MRFloatGrid *grid, const MRGridToMeshSettings *settings, MRString **errorStr)
converts OpenVDB Grid into mesh using Dual Marching Cubes algorithm
MRMESHC_API MRVdbVolume mrVdbConversionsMeshToVolume(const MRMesh *mesh, const MRMeshToVolumeSettings *settings, MRString **errorStr)
struct MRMeshToVolumeSettings MRMeshToVolumeSettings
typedefMR_EXTERN_C_BEGIN struct MRFloatGrid MRFloatGrid
Definition MRMeshC/MRVoxelsFwd.h:7
affine transformation: y = A*x + b, where A in VxV, and b in V
Definition MRMeshC/MRAffineXf.h:10
parameters of OpenVDB Grid to Mesh conversion using Dual Marching Cubes algorithm
Definition MRMeshC/MRVDBConversions.h:38
int maxFaces
if the mesh exceeds this number of faces, an error returns
Definition MRMeshC/MRVDBConversions.h:46
int maxVertices
if the mesh exceeds this number of vertices, an error returns
Definition MRMeshC/MRVDBConversions.h:48
MRProgressCallback cb
to receive progress and request cancellation
Definition MRMeshC/MRVDBConversions.h:51
MRVector3f voxelSize
the size of each voxel in the grid
Definition MRMeshC/MRVDBConversions.h:40
float isoValue
layer of grid with this value would be converted in mesh; isoValue can be negative only in level set ...
Definition MRMeshC/MRVDBConversions.h:42
float adaptivity
adaptivity - [0.0;1.0] ratio of combining small triangles into bigger ones (curvature can be lost on ...
Definition MRMeshC/MRVDBConversions.h:44
bool relaxDisorientedTriangles
Definition MRMeshC/MRVDBConversions.h:49
Definition MRMeshC/MRVDBConversions.h:16
MRMeshToVolumeSettingsType type
Definition MRMeshC/MRVDBConversions.h:17
MRVector3f voxelSize
Definition MRMeshC/MRVDBConversions.h:19
MRAffineXf3f * outXf
Definition MRMeshC/MRVDBConversions.h:21
MRProgressCallback cb
Definition MRMeshC/MRVDBConversions.h:22
MRAffineXf3f worldXf
Definition MRMeshC/MRVDBConversions.h:20
float surfaceOffset
Definition MRMeshC/MRVDBConversions.h:18
Definition MRMeshC/MRVoxelsFwd.h:12
three-dimensional vector of floats
Definition MRMeshC/MRVector3.h:9