MeshLib C++ Docs
Loading...
Searching...
No Matches
MRHoleFillPlan.h
Go to the documentation of this file.
1#pragma once
2#include <cassert>
3#include <vector>
4
5namespace MR
6{
9
10
15{
17};
18
22{
24 int item = 0;
26 bool sym = false;
27
29 [[nodiscard]] int encode() const
30 {
31 assert( item >= 0 );
32 return -( 2 * item + int( sym ) + 1 );
33 }
34
36 [[nodiscard]] static FillHoleItemEdge decode( int code )
37 {
38 assert( code < 0 );
39 const int c = -( code + 1 );
40 return { .item = c >> 1, .sym = ( c & 1 ) != 0 };
41 }
42};
43
46{
47 std::vector<FillHoleItem> items;
51 int numTris = 0;
52};
53
54}
int encode() const
encodes this edge in a negative code
Definition MRHoleFillPlan.h:29
int numTris
Definition MRHoleFillPlan.h:51
int edgeCode2
Definition MRHoleFillPlan.h:16
bool sym
take that edge in the opposite direction, so with the other origin
Definition MRHoleFillPlan.h:26
std::vector< FillHoleItem > items
Definition MRHoleFillPlan.h:47
int edgeCode1
Definition MRHoleFillPlan.h:16
int item
index of the item creating the edge
Definition MRHoleFillPlan.h:24
static FillHoleItemEdge decode(int code)
decodes a negative code back in the edge it denotes
Definition MRHoleFillPlan.h:36
only for bindings generation
Definition MRCameraOrientationPlugin.h:8
Definition MRHoleFillPlan.h:22
Definition MRHoleFillPlan.h:15
concise representation of proposed hole triangulation
Definition MRHoleFillPlan.h:46