MeshLib
 
Loading...
Searching...
No Matches
MRDotNet/MROffset.h
Go to the documentation of this file.
1#pragma once
2#include "MRMeshFwd.h"
3
4#pragma managed( push, off )
5#include <MRMesh/MROffset.h>
6#pragma managed( pop )
7
9
10public enum class SignDetectionMode
11{
12 Unsigned,
13 OpenVDB,
17};
18
19public ref class OffsetParameters
20{
21public:
24 float voxelSize = 0.0f;
31 bool memoryEfficient = false;
32
33internal:
34 MR::OffsetParameters ToNative();
35};
36
37public ref class SharpOffsetParameters : public OffsetParameters
38{
39public:
41 float minNewVertDev = 1.0f / 25;
49
50internal:
52};
53
54public enum class GeneralOffsetMode
55{
56#ifndef MRMESH_NO_OPENVDB
57 Smooth,
58#endif
59 Standard,
61};
62
72
73public ref class Offset
74{
75public:
77 static float SuggestVoxelSize( MeshPart mp, float approxNumVoxels );
78#ifndef MRMESH_NO_OPENVDB
83 static Mesh^ OffsetMesh( MeshPart mp, float offset, OffsetParameters^ parameters );
87 static Mesh^ DoubleOffsetMesh( MeshPart mp, float offsetA, float offsetB, OffsetParameters^ parameters );
88#endif
91 static Mesh^ McOffsetMesh( MeshPart mp, float offset, OffsetParameters^ parameters );
95 static Mesh^ McShellMeshRegion( MeshPart mp, float offset, float voxelSize );
98 static Mesh^ SharpOffsetMesh( MeshPart mp, float offset, SharpOffsetParameters^ parameters );
100 static Mesh^ GeneralOffsetMesh( MeshPart mp, float offset, GeneralOffsetParameters^ parameters );
105 static Mesh^ ThickenMesh( Mesh^ mesh, float offset, GeneralOffsetParameters^ parameters );
106};
107
109
#define MR_DOTNET_NAMESPACE_BEGIN
Definition MRDotNet/MRMeshFwd.h:42
#define MR_DOTNET_NAMESPACE_END
Definition MRDotNet/MRMeshFwd.h:43
GeneralOffsetMode
Definition MRDotNet/MROffset.h:55
@ Sharpening
create mesh using standard marching cubes with additional sharpening implemented in MeshLib
@ Smooth
create mesh using dual marching cubes from OpenVDB library
@ Standard
create mesh using standard marching cubes implemented in MeshLib
SignDetectionMode
Definition MRDotNet/MROffset.h:11
@ OpenVDB
sign detection from OpenVDB library, which is good and fast if input geometry is closed
@ WindingRule
ray intersection counter, significantly slower than ProjectionNormal and does not support holes in me...
@ ProjectionNormal
the sign is determined based on pseudonormal in closest mesh point (unsafe in case of self-intersecti...
@ HoleWindingRule
computes winding number generalization with support of holes in mesh, slower than WindingRule
@ Unsigned
unsigned distance, useful for bidirectional Shell offset
allows the user to select in the parameters which offset algorithm to call
Definition MRDotNet/MROffset.h:65
GeneralOffsetMode mode
Definition MRDotNet/MROffset.h:67
represents a mesh, including topology (connectivity) information and point coordinates,
Definition MRDotNet/MRMesh.h:30
Definition MRDotNet/MROffset.h:20
SignDetectionMode signDetectionMode
determines the method to compute distance sign
Definition MRDotNet/MROffset.h:26
bool memoryEfficient
Definition MRDotNet/MROffset.h:31
float voxelSize
Definition MRDotNet/MROffset.h:24
Definition MRDotNet/MROffset.h:74
static Mesh SharpOffsetMesh(MeshPart mp, float offset, SharpOffsetParameters^ parameters)
static Mesh McShellMeshRegion(MeshPart mp, float offset, float voxelSize)
static Mesh OffsetMesh(MeshPart mp, float offset, OffsetParameters^ parameters)
static Mesh McOffsetMesh(MeshPart mp, float offset, OffsetParameters^ parameters)
static Mesh ThickenMesh(Mesh^ mesh, float offset, GeneralOffsetParameters^ parameters)
static Mesh GeneralOffsetMesh(MeshPart mp, float offset, GeneralOffsetParameters^ parameters)
Offsets mesh by converting it to voxels and back using one of three modes specified in the parameters...
static float SuggestVoxelSize(MeshPart mp, float approxNumVoxels)
computes size of a cubical voxel to get approximately given number of voxels during rasterization
static Mesh DoubleOffsetMesh(MeshPart mp, float offsetA, float offsetB, OffsetParameters^ parameters)
Definition MRDotNet/MROffset.h:38
float maxOldVertPosCorrection
Definition MRDotNet/MROffset.h:48
float maxNewRank3VertDev
maximal surface deviation to introduce new rank 3 vertex (on intersection of 3 planes),...
Definition MRDotNet/MROffset.h:45
float minNewVertDev
minimal surface deviation to introduce new vertex in a voxel, measured in voxelSize
Definition MRDotNet/MROffset.h:41
float maxNewRank2VertDev
maximal surface deviation to introduce new rank 2 vertex (on intersection of 2 planes),...
Definition MRDotNet/MROffset.h:43
allows the user to select in the parameters which offset algorithm to call
Definition MRMesh/MROffset.h:98
Definition MRMesh/MROffset.h:27
Definition MRMesh/MROffset.h:54
Definition MRDotNet/MRMesh.h:20