MeshLib
 
Loading...
Searching...
No Matches
MRMesh/MRMeshFwd.h
Go to the documentation of this file.
1#pragma once
2
3#include "config.h"
4
6
7// Not-zero _ITERATOR_DEBUG_LEVEL in Microsoft STL greatly reduces the performance of STL containers.
8//
9// Pre-build binaries from MeshLib distribution are prepared with _ITERATOR_DEBUG_LEVEL=0,
10// and if you build MeshLib by yourself then _ITERATOR_DEBUG_LEVEL=0 is also selected see
11// 1) vcpkg/triplets/x64-windows-meshlib.cmake and
12// 2) MeshLib/source/common.props
13// Please note that all other modules (.exe, .dll, .lib) with MS STL calls in your application also need
14// to define exactly the same value of _ITERATOR_DEBUG_LEVEL to be operational after linking.
15//
16// If you deliberately would like to work with not zero _ITERATOR_DEBUG_LEVEL, then please define
17// additionally MR_ITERATOR_DEBUG_LEVEL with the same value to indicate that it is done intentionally
18// (and you are ok with up to 100x slowdown).
19//
20#if defined _MSC_VER
21 #if !defined _ITERATOR_DEBUG_LEVEL
22 #define _ITERATOR_DEBUG_LEVEL 0
23 #endif
24 #if !defined MR_ITERATOR_DEBUG_LEVEL
25 #define MR_ITERATOR_DEBUG_LEVEL 0
26 #endif
27 #if _ITERATOR_DEBUG_LEVEL != MR_ITERATOR_DEBUG_LEVEL
28 #error _ITERATOR_DEBUG_LEVEL is inconsistent with MeshLib
29 #endif
30#endif
31
32#include <array>
33#include <vector>
34#include <string>
35#include <parallel_hashmap/phmap_fwd_decl.h>
36#include <functional>
37
38#ifdef _WIN32
39# ifdef MRMESH_EXPORT
40# define MRMESH_API __declspec(dllexport)
41# else
42# define MRMESH_API __declspec(dllimport)
43# endif
44# define MRMESH_CLASS
45#else
46# define MRMESH_API __attribute__((visibility("default")))
47// to fix undefined reference to `typeinfo/vtable`
48// Also it's important to use this on any type for which `typeid` is used in multiple shared libraries, and then passed across library boundaries.
49// Otherwise on Mac the resulting typeids will incorrectly compare not equal.
50# define MRMESH_CLASS __attribute__((visibility("default")))
51#endif
52
53namespace MR
54{
55
56struct NoInit {};
57inline constexpr NoInit noInit;
58template <typename T> struct MRMESH_CLASS NoDefInit;
59
72
73MR_CANONICAL_TYPEDEFS( (template <typename T> class MRMESH_CLASS), Id,
75 ( UndirectedEdgeId, Id<UndirectedEdgeTag> )
78 ( PixelId, Id<PixelTag> )
79 ( VoxelId, Id<VoxelTag> )
80 ( RegionId, Id<RegionTag> )
81 ( NodeId, Id<NodeTag> )
82 ( ObjId, Id<ObjTag> )
83 ( TextureId, Id<TextureTag> )
84 ( GraphVertId, Id<GraphVertTag> )
85 ( GraphEdgeId, Id<GraphEdgeTag> )
86)
87
88template <typename T, typename I = size_t> class MRMESH_CLASS Buffer;
89struct PackMapping;
90
91class ViewportId;
92class ViewportMask;
93
97
98using EdgePath = std::vector<EdgeId>;
99using EdgeLoop = std::vector<EdgeId>;
100
102
103MR_CANONICAL_TYPEDEFS( (template <typename T> class MRMESH_CLASS), TaggedBitSet,
106 ( EdgeBitSet, TaggedBitSet<EdgeTag> )
107 ( UndirectedEdgeBitSet, TaggedBitSet<UndirectedEdgeTag> )
108 ( PixelBitSet, TaggedBitSet<PixelTag> )
109 ( VoxelBitSet, TaggedBitSet<VoxelTag> )
110 ( RegionBitSet, TaggedBitSet<RegionTag> )
111 ( NodeBitSet, TaggedBitSet<NodeTag> )
112 ( ObjBitSet, TaggedBitSet<ObjTag> )
113 ( TextureBitSet, TaggedBitSet<TextureTag> )
114 ( GraphVertBitSet, TaggedBitSet<GraphVertTag> )
115 ( GraphEdgeBitSet, TaggedBitSet<GraphEdgeTag> )
116)
117
118MR_CANONICAL_TYPEDEFS( (template <typename T> class MRMESH_CLASS), SetBitIteratorT,
120 ( FaceSetBitIterator, SetBitIteratorT<FaceBitSet> )
121 ( VertSetBitIterator, SetBitIteratorT<VertBitSet> )
122 ( EdgeSetBitIterator, SetBitIteratorT<EdgeBitSet> )
123 ( UndirectedEdgeSetBitIterator, SetBitIteratorT<UndirectedEdgeBitSet> )
124)
125
126struct Color;
127
128MR_CANONICAL_TYPEDEFS( (template <typename T> struct), MRMESH_CLASS Vector2,
129 ( Vector2b, Vector2<bool> )
130 ( Vector2i, Vector2<int> )
131 ( Vector2ll, Vector2<long long> )
132 ( Vector2f, Vector2<float> )
133 ( Vector2d, Vector2<double> )
134)
135
136MR_CANONICAL_TYPEDEFS( (template <typename T> struct), MRMESH_CLASS Vector3,
137 ( Vector3b, Vector3<bool> )
138 ( Vector3i, Vector3<int> )
139 ( Vector3ll, Vector3<long long> )
140 ( Vector3f, Vector3<float> )
141 ( Vector3d, Vector3<double> )
142)
143
144MR_CANONICAL_TYPEDEFS( (template <typename T> struct), Vector4,
145 ( Vector4b, Vector4<bool> )
146 ( Vector4i, Vector4<int> )
147 ( Vector4ll, Vector4<long long> )
148 ( Vector4f, Vector4<float> )
149 ( Vector4d, Vector4<double> )
150)
151
152MR_CANONICAL_TYPEDEFS( (template <typename T> struct), Matrix2,
153 ( Matrix2b, Matrix2<bool> )
154 ( Matrix2i, Matrix2<int> )
155 ( Matrix2ll, Matrix2<long long> )
156 ( Matrix2f, Matrix2<float> )
157 ( Matrix2d, Matrix2<double> )
158)
159
160MR_CANONICAL_TYPEDEFS( (template <typename T> struct), Matrix3,
161 ( Matrix3b, Matrix3<bool> )
162 ( Matrix3i, Matrix3<int> )
163 ( Matrix3ll, Matrix3<long long> )
164 ( Matrix3f, Matrix3<float> )
165 ( Matrix3d, Matrix3<double> )
166)
167
168MR_CANONICAL_TYPEDEFS( (template <typename T> struct), Matrix4,
169 ( Matrix4b, Matrix4<bool> )
170 ( Matrix4i, Matrix4<int> )
171 ( Matrix4ll, Matrix4<long long> )
172 ( Matrix4f, Matrix4<float> )
173 ( Matrix4d, Matrix4<double> )
174)
175
176MR_CANONICAL_TYPEDEFS( (template <typename T> struct), SymMatrix2,
177 ( SymMatrix2b, SymMatrix2<bool> )
178 ( SymMatrix2i, SymMatrix2<int> )
179 ( SymMatrix2ll, SymMatrix2<long long> )
180 ( SymMatrix2f, SymMatrix2<float> )
181 ( SymMatrix2d, SymMatrix2<double> )
182)
183
184MR_CANONICAL_TYPEDEFS( (template <typename T> struct), SymMatrix3,
186 ( SymMatrix3i, SymMatrix3<int> )
187 ( SymMatrix3ll, SymMatrix3<long long> )
188 ( SymMatrix3f, SymMatrix3<float> )
189 ( SymMatrix3d, SymMatrix3<double> )
190)
191
192MR_CANONICAL_TYPEDEFS( (template <typename T> struct), SymMatrix4,
193 ( SymMatrix4b, SymMatrix4<bool> )
194 ( SymMatrix4i, SymMatrix4<int> )
195 ( SymMatrix4ll, SymMatrix4<long long> )
196 ( SymMatrix4f, SymMatrix4<float> )
197 ( SymMatrix4d, SymMatrix4<double> )
198)
199
200MR_CANONICAL_TYPEDEFS( (template <typename V> struct), AffineXf,
202 ( AffineXf2d, AffineXf<Vector2<double>> )
203 ( AffineXf3f, AffineXf<Vector3<float>> )
204 ( AffineXf3d, AffineXf<Vector3<double>> )
205)
206template <typename T> using AffineXf2 = AffineXf<Vector2<T>>;
207template <typename T> using AffineXf3 = AffineXf<Vector3<T>>;
208
209MR_CANONICAL_TYPEDEFS( (template <typename T> struct), RigidXf3,
210 ( RigidXf3f, RigidXf3<float> )
211 ( RigidXf3d, RigidXf3<double> )
212)
213
214MR_CANONICAL_TYPEDEFS( (template <typename T> struct), RigidScaleXf3,
216 ( RigidScaleXf3d, RigidScaleXf3<double> )
217)
218
221
222MR_CANONICAL_TYPEDEFS( (template <typename T> struct), Sphere,
223 ( Sphere2f, Sphere<Vector2<float>> )
224 ( Sphere2d, Sphere<Vector2<double>> )
225 ( Sphere3f, Sphere<Vector3<float>> )
226 ( Sphere3d, Sphere<Vector3<double>> )
227)
228template <typename T> using Sphere2 = Sphere<Vector2<T>>;
229template <typename T> using Sphere3 = Sphere<Vector3<T>>;
230
231MR_CANONICAL_TYPEDEFS( (template <typename V> struct), Line,
232 ( Line2f, Line<Vector2<float>> )
233 ( Line2d, Line<Vector2<double>> )
234 ( Line3f, Line<Vector3<float>> )
235 ( Line3d, Line<Vector3<double>> )
236)
237template <typename T> using Line2 = Line<Vector2<T>>;
238template <typename T> using Line3 = Line<Vector3<T>>;
239
240MR_CANONICAL_TYPEDEFS( (template <typename V> struct), LineSegm,
241 ( LineSegm2f, LineSegm<Vector2<float>> )
242 ( LineSegm2d, LineSegm<Vector2<double>> )
243 ( LineSegm3f, LineSegm<Vector3<float>> )
244 ( LineSegm3d, LineSegm<Vector3<double>> )
245)
246template <typename T> using LineSegm2 = LineSegm<Vector2<T>>;
247template <typename T> using LineSegm3 = LineSegm<Vector3<T>>;
248
249MR_CANONICAL_TYPEDEFS( (template <typename T> struct), Parabola,
250 ( Parabolaf, Parabola<float> )
251 ( Parabolad, Parabola<double> )
252)
253
254MR_CANONICAL_TYPEDEFS( (template <typename T> class), BestFitParabola,
256 ( BestFitParabolad, BestFitParabola<double> )
257)
258
259MR_CANONICAL_TYPEDEFS( (template <typename T> class), Cylinder3,
261 ( Cylinder3d, Cylinder3<double> )
262)
263
264MR_CANONICAL_TYPEDEFS( (template <typename T> class), Cone3,
265 ( Cone3f, Cone3<float> )
266 ( Cone3d, Cone3<double> )
267)
268
269// No canonical typedefs here, because those ultimately boil to `std::vector`, which isn't under our control.
270template <typename V> using Contour = std::vector<V>;
271template <typename T> using Contour2 = Contour<Vector2<T>>;
272template <typename T> using Contour3 = Contour<Vector3<T>>;
273using Contour2d = Contour2<double>;
274using Contour2f = Contour2<float>;
275using Contour3d = Contour3<double>;
276using Contour3f = Contour3<float>;
277
278template <typename V> using Contours = std::vector<Contour<V>>;
279template <typename T> using Contours2 = Contours<Vector2<T>>;
280template <typename T> using Contours3 = Contours<Vector3<T>>;
281using Contours2d = Contours2<double>;
282using Contours2f = Contours2<float>;
283using Contours3d = Contours3<double>;
284using Contours3f = Contours3<float>;
285
286template <typename T> using Contour3 = Contour<Vector3<T>>;
287using Contour3d = Contour3<double>;
288using Contours3d = std::vector<Contour3d>;
289using Contour3f = Contour3<float>;
290using Contours3f = std::vector<Contour3f>;
291
292MR_CANONICAL_TYPEDEFS( (template <typename T> struct), Plane3,
293 ( Plane3f, Plane3<float> )
294 ( Plane3d, Plane3<double> )
295)
296
297MR_CANONICAL_TYPEDEFS( (template <typename V> struct), Box,
298 ( Box2i, Box<Vector2<int>> )
299 ( Box2ll, Box<Vector2<long long>> )
300 ( Box2f, Box<Vector2<float>> )
301 ( Box2d, Box<Vector2<double>> )
302 ( Box3i, Box<Vector3<int>> )
303 ( Box3ll, Box<Vector3<long long>> )
304 ( Box3f, Box<Vector3<float>> )
305 ( Box3d, Box<Vector3<double>> )
306)
307template <typename T> using Box2 = Box<Vector2<T>>;
308template <typename T> using Box3 = Box<Vector3<T>>;
309
310MR_CANONICAL_TYPEDEFS( (template <typename V> struct), QuadraticForm,
311 ( QuadraticForm2f, QuadraticForm<Vector2<float>> )
312 ( QuadraticForm2d, QuadraticForm<Vector2<double>> )
313 ( QuadraticForm3f, QuadraticForm<Vector3<float>> )
314 ( QuadraticForm3d, QuadraticForm<Vector3<double>> )
315)
316template <typename T> using QuadraticForm2 = QuadraticForm<Vector2<T>>;
317template <typename T> using QuadraticForm3 = QuadraticForm<Vector3<T>>;
318
319MR_CANONICAL_TYPEDEFS( (template <typename T> struct), Quaternion,
320 ( Quaternionf, Quaternion<float> )
321 ( Quaterniond, Quaternion<double> )
322)
323
324// No canonical typedefs because `std::array` is not under our control.
325template <typename T> using Triangle3 = std::array<Vector3<T>, 3>;
326using Triangle3i = Triangle3<int>;
327using Triangle3f = Triangle3<float>;
328using Triangle3d = Triangle3<double>;
329
330class PointAccumulator;
331
332MR_CANONICAL_TYPEDEFS( (template <typename T> struct), SegmPoint,
333 ( SegmPointf, SegmPoint<float> )
334 ( SegmPointd, SegmPoint<double> )
335)
336
337struct EdgePoint;
338struct EdgeSegment;
340using SurfacePath = std::vector<MeshEdgePoint>;
341using SurfacePaths = std::vector<SurfacePath>;
346struct EdgePointPair;
347class Laplacian;
348
349using VertPair = std::pair<VertId, VertId>;
350using FacePair = std::pair<FaceId, FaceId>;
351using EdgePair = std::pair<EdgeId, EdgeId>;
352using UndirectedEdgePair = std::pair<UndirectedEdgeId, UndirectedEdgeId>;
353
354MR_CANONICAL_TYPEDEFS( (template <typename T> struct), TriPoint,
355 ( TriPointf, TriPoint<float> )
356 ( TriPointd, TriPoint<double> )
357)
358
359struct PointOnFace;
360struct PointOnObject;
361struct MeshTriPoint;
364template <typename T> struct IntersectionPrecomputes;
365
366template <typename I> struct IteratorRange;
367
370using UVCoord = Vector2f;
371
373using ThreeVertIds = std::array<VertId, 3>;
374
376
377MR_CANONICAL_TYPEDEFS( (template <typename T, typename I> class MRMESH_CLASS), Vector,
380
381 ( Dipoles, Vector<Dipole, NodeId> )
382
385 ( EdgeMap, Vector<EdgeId, EdgeId> )
386 ( UndirectedEdgeMap, Vector<UndirectedEdgeId, UndirectedEdgeId> )
387 ( ObjMap, Vector<ObjId, ObjId> )
388
390 ( WholeEdgeMap, Vector<EdgeId, UndirectedEdgeId> )
391 ( UndirectedEdge2RegionMap, Vector<RegionId, UndirectedEdgeId> )
392 ( Face2RegionMap, Vector<RegionId, FaceId> )
393 ( Vert2RegionMap, Vector<RegionId, VertId> )
394
397 ( VertUVCoords, Vector<UVCoord, VertId> )
399
400 ( TexturePerFace, Vector<TextureId, FaceId> )
401 ( VertColors, Vector<Color, VertId> )
402 ( FaceColors, Vector<Color, FaceId> )
403 ( EdgeColors, Vector<Color, EdgeId> )
404 ( UndirectedEdgeColors, Vector<Color, UndirectedEdgeId> )
405
406 ( VertScalars, Vector<float, VertId> )
407 ( FaceScalars, Vector<float, FaceId> )
408 ( EdgeScalars, Vector<float, EdgeId> )
409 ( UndirectedEdgeScalars, Vector<float, UndirectedEdgeId> )
410)
411
412using VertPredicate = std::function<bool( VertId )>;
413using FacePredicate = std::function<bool( FaceId )>;
414using EdgePredicate = std::function<bool( EdgeId )>;
415using UndirectedEdgePredicate = std::function<bool( UndirectedEdgeId )>;
416
417using PreCollapseCallback = std::function<bool( EdgeId edgeToCollapse, const Vector3f& newEdgeOrgPos )>;
418using OnEdgeSplit = std::function<void( EdgeId e1, EdgeId e )>;
419
420template <typename T>
421[[nodiscard]] inline bool contains( const std::function<bool( Id<T> )> & pred, Id<T> id )
422{
423 return id.valid() && ( !pred || pred( id ) );
424}
425
426using VertMetric = std::function<float( VertId )>;
427using FaceMetric = std::function<float( FaceId )>;
428using EdgeMetric = std::function<float( EdgeId )>;
429using UndirectedEdgeMetric = std::function<float( UndirectedEdgeId )>;
430
431MR_CANONICAL_TYPEDEFS( (template <typename T, typename I> struct MRMESH_CLASS), BMap,
432 ( FaceBMap, BMap<FaceId, FaceId> )
433 ( VertBMap, BMap<VertId, VertId> )
434 ( EdgeBMap, BMap<EdgeId, EdgeId> )
435 ( UndirectedEdgeBMap, BMap<UndirectedEdgeId, UndirectedEdgeId> )
436 ( WholeEdgeBMap, BMap<EdgeId, UndirectedEdgeId> )
437)
438
439template <typename T, typename Hash = phmap::priv::hash_default_hash<T>, typename Eq = phmap::priv::hash_default_eq<T>>
440using HashSet = phmap::flat_hash_set<T, Hash, Eq>;
441template <typename T, typename Hash = phmap::priv::hash_default_hash<T>, typename Eq = phmap::priv::hash_default_eq<T>>
442using ParallelHashSet = phmap::parallel_flat_hash_set<T, Hash, Eq>;
443
444// No canonical typedefs because `phmap::...` is not under our control.
445using FaceHashSet = HashSet<FaceId>;
446using VertHashSet = HashSet<VertId>;
447using EdgeHashSet = HashSet<EdgeId>;
448
449template <typename K, typename V, typename Hash = phmap::priv::hash_default_hash<K>, typename Eq = phmap::priv::hash_default_eq<K>>
450using HashMap = phmap::flat_hash_map<K, V, Hash, Eq>;
451template <typename K, typename V, typename Hash = phmap::priv::hash_default_hash<K>, typename Eq = phmap::priv::hash_default_eq<K>>
452using ParallelHashMap = phmap::parallel_flat_hash_map<K, V, Hash, Eq>;
453
457using UndirectedEdgeHashMap = HashMap<UndirectedEdgeId, UndirectedEdgeId>;
459using WholeEdgeHashMap = HashMap<UndirectedEdgeId, EdgeId>;
460
461template <typename I> class UnionFind;
462template <typename T, typename I, typename P> class Heap;
463
474struct MeshOrPointsXf;
475struct MeshTexture;
476struct GridSettings;
477struct TriMesh;
478
479template<typename T> class UniqueThreadSafeOwner;
480
481class PolylineTopology;
482
483MR_CANONICAL_TYPEDEFS( (template<typename V> struct), Polyline,
484 ( Polyline2, Polyline<Vector2f> )
485 ( Polyline3, Polyline<Vector3f> )
486)
487
490 ( AABBTreePolyline3, AABBTreePolyline<Vector3f> )
491)
492
493template<typename T> struct IntersectionPrecomputes;
494template<typename T> struct IntersectionPrecomputes2;
495
496MR_CANONICAL_TYPEDEFS( (template<typename V> struct [[nodiscard]]), PolylineProjectionResult,
497 ( PolylineProjectionResult2, PolylineProjectionResult<Vector2f> )
498 ( PolylineProjectionResult3, PolylineProjectionResult<Vector3f> )
499)
500
501MR_CANONICAL_TYPEDEFS( (template<typename V> struct [[nodiscard]]), PolylineProjectionWithOffsetResult,
503 ( PolylineProjectionWithOffsetResult3, PolylineProjectionWithOffsetResult<Vector3f> )
504)
505
506class DistanceMap;
507
508using GcodeSource = std::vector<std::string>;
509
510class Object;
511class SceneRootObject;
512class VisualObject;
513class ObjectMeshHolder;
514class ObjectMesh;
516class ObjectPoints;
518class ObjectLines;
520class ObjectLabel;
521class ObjectGcode;
522class PointObject;
523class LineObject;
524class CircleObject;
525class PlaneObject;
526class SphereObject;
527class CylinderObject;
528class ConeObject;
529
530struct Image;
532
533#ifndef MRMESH_NO_OPENVDB
534class ObjectVoxels;
535
536struct OpenVdbFloatGrid;
537using FloatGrid = std::shared_ptr<OpenVdbFloatGrid>;
538#define MRMESH_IF_HAVE_OPENVDB(...) __VA_ARGS__
539#else
540#define MRMESH_IF_HAVE_OPENVDB(...)
541#endif
542
543MR_CANONICAL_TYPEDEFS( (template <typename T> struct), VoxelsVolumeMinMax,
544 ( SimpleVolume, VoxelsVolumeMinMax<std::vector<float>> )
545 ( SimpleVolumeU16, VoxelsVolumeMinMax<std::vector<uint16_t>> )
547 ( VdbVolume, VoxelsVolumeMinMax<FloatGrid> )
548 )
549)
550
551template <typename T>
552using VoxelValueGetter = std::function<T ( const Vector3i& )>;
553
554MR_CANONICAL_TYPEDEFS( (template <typename T> struct), VoxelsVolume,
555 ( FunctionVolume, VoxelsVolume<VoxelValueGetter<float>> )
556 ( FunctionVolumeU8, VoxelsVolume<VoxelValueGetter<uint8_t>> )
557)
558
559
560class HistoryAction;
567class ChangeMeshAction;
570class ChangeXfAction;
572class SwapRootAction;
573
574MR_CANONICAL_TYPEDEFS( (template <typename Tag> class MRMESH_CLASS), ColorMapAggregator,
575 ( VertColorMapAggregator, ColorMapAggregator<VertTag> )
576 ( UndirEdgeColorMapAggregator, ColorMapAggregator<UndirectedEdgeTag> )
577 ( FaceColorMapAggregator, ColorMapAggregator<FaceTag> )
578)
579
580template<typename T>
581class FewSmallest;
582
583class Graph;
584class WatershedGraph;
585
589typedef std::function<bool( float )> ProgressCallback;
590
591enum class FilterType : char
592{
593 Linear,
595};
596
597enum class WrapType : char
598{
599 Repeat,
600 Mirror,
601 Clamp
602};
603
605enum class Reorder : char
606{
607 None,
609 AABBTree
610};
611
612template <typename T>
613constexpr inline T sqr( T x ) noexcept { return x * x; }
614
615template <typename T>
616constexpr inline int sgn( T x ) noexcept { return x > 0 ? 1 : ( x < 0 ? -1 : 0 ); }
617
618template<typename...>
619inline constexpr bool dependent_false = false;
620
621template<class... Ts>
622struct overloaded : Ts... { using Ts::operator()...; };
623
624// explicit deduction guide (not needed as of C++20, but still needed in Clang)
625template<class... Ts>
626overloaded(Ts...) -> overloaded<Ts...>;
627
630
631namespace MeshBuilder
632{
633
634struct BuildSettings;
635struct Triangle;
636struct VertDuplication;
637
638} //namespace MeshBuilder
639
640} //namespace MR
641
642#ifdef __cpp_lib_unreachable
643# define MR_UNREACHABLE std::unreachable();
644# define MR_UNREACHABLE_NO_RETURN std::unreachable();
645#else
646# ifdef __GNUC__
647# define MR_UNREACHABLE __builtin_unreachable();
648# define MR_UNREACHABLE_NO_RETURN __builtin_unreachable();
649# else
650# define MR_UNREACHABLE { assert( false ); return {}; }
651# define MR_UNREACHABLE_NO_RETURN assert( false );
652# endif
653#endif
#define MR_CANONICAL_TYPEDEFS(type_, name_, aliases_)
Definition MRCanonicalTypedefs.h:23
List< Vector3f^> VertNormals
Definition MRDotNet/MRMeshFwd.h:98
List< Vector3f^> VertCoords
Definition MRDotNet/MRMeshFwd.h:95
int VertId
Definition MRDotNet/MRMeshFwd.h:51
List< VertId > VertMap
Definition MRDotNet/MRMeshFwd.h:84
List< Vector3f^> FaceNormals
Definition MRDotNet/MRMeshFwd.h:100
int FaceId
Definition MRDotNet/MRMeshFwd.h:53
int EdgeId
Definition MRDotNet/MRMeshFwd.h:52
List< FaceId > FaceMap
Definition MRDotNet/MRMeshFwd.h:87
#define MRMESH_CLASS
Definition MRMesh/MRMeshFwd.h:50
#define MRMESH_IF_HAVE_OPENVDB(...)
Definition MRMesh/MRMeshFwd.h:538
Contour
Definition MRObjectLabel.h:16
Definition MRDotNet/MRBitSet.h:39
Definition MRAABBTreeObjects.h:19
bounding volume hierarchy for point cloud structure
Definition MRAABBTreePoints.h:16
bounding volume hierarchy for line segments
Definition MRAABBTreePolyline.h:30
Definition MRAABBTree.h:16
Definition MRVisualObject.h:67
accumulates a number of (x,y) points to find the best-least-squares parabola approximating them
Definition MRBestFitParabola.h:12
container of bits
Definition MRMesh/MRBitSet.h:26
std::vector<V>-like container that is 1) resized without initialization of its elements,...
Definition MRBuffer.h:54
Undo action for ObjectMesh mesh change.
Definition MRChangeMeshAction.h:16
Undo action for ObjectMesh creases.
Definition MRChangeSelectionAction.h:111
Undo action for ObjectMesh edge selection.
Definition MRChangeSelectionAction.h:68
Undo action for ObjectMesh face selection.
Definition MRChangeSelectionAction.h:14
Undo action for ObjectMesh points only (not topology) change.
Definition MRChangeMeshAction.h:177
Undo action for ObjectMesh topology only (not points) change.
Definition MRChangeMeshAction.h:229
Definition MRChangeObjectAction.h:14
Undo action for ObjectPoints point selection.
Definition MRChangeSelectionAction.h:154
Definition MRChangeSceneAction.h:13
Definition MRChangeXfAction.h:13
Definition MRCircleObject.h:17
Class for aggregate several color map in one Color maps are aggregated according order.
Definition MRColorMapAggregator.h:17
Definition MRCombinedHistoryAction.h:12
Definition MRCone3.h:11
Definition MRConeObject.h:19
Definition MRCylinder3.h:12
Definition MRCylinderObject.h:18
Definition MRDistanceMap.h:24
the class stores some number of smallest elements from a larger number of candidates
Definition MRFewSmallest.h:14
mathematical graph consisting from vertices and undirected edges
Definition MRGraph.h:14
stores map from element id in[0, size) to T;
Definition MRMesh/MRMeshFwd.h:462
Definition MRHistoryAction.h:12
Abstract class for fast approximate computation of generalized winding number for a mesh (using its A...
Definition MRFastWindingNumber.h:12
Abstract class, computes the closest point on mesh to each of given points. Pure virtual functions mu...
Definition MRPointsToMeshProjector.h:12
Definition MRMesh/MRId.h:13
Definition MRLaplacian.h:32
Definition MRLineObject.h:12
Definition MRMesh/MRMeshOrPoints.h:17
Definition MRMesh/MRMeshTopology.h:18
Definition MRObjectDistanceMap.h:13
Definition MRObjectGcode.h:14
Definition MRObjectLabel.h:25
Definition MRObjectLinesHolder.h:19
Definition MRObjectLines.h:11
Definition MRObjectMeshHolder.h:30
Definition MRObjectMesh.h:11
Definition MRObjectPointsHolder.h:18
Definition MRObjectPoints.h:11
Definition MRObjectVoxels.h:17
named object in the data model
Definition MRObject.h:60
Definition MRPlaneObject.h:12
Class to accumulate points and make best line / plane approximation.
Definition MRBestFit.h:19
Definition MRPointObject.h:13
Definition MRPointToPlaneAligningTransform.h:20
Definition MRPointToPointAligningTransform.h:16
Definition MRPolylineTopology.h:15
Object that is parent of all scene.
Definition MRSceneRoot.h:11
iterator to enumerate all indices with set bits in BitSet class or its derivatives
Definition MRMesh/MRBitSet.h:217
Definition MRSphereObject.h:15
Definition MRSwapRootAction.h:13
container of bits representing specific indices (faces, verts or edges)
Definition MRMesh/MRBitSet.h:115
Simple union find data structure.
Definition MRUnionFind.h:16
Definition MRUniqueThreadSafeOwner.h:20
std::vector<T>-like container that requires specific indexing type,
Definition MRMesh/MRVector.h:19
Definition MRViewportId.h:16
stores mask of viewport unique identifiers
Definition MRViewportId.h:38
Visual Object.
Definition MRVisualObject.h:131
graphs representing rain basins on the mesh
Definition MRWatershedGraph.h:12
represents a 3-dimentional float-typed vector
Definition MRDotNet/MRVector3.h:8
bool contains(const TaggedBitSet< T > *bitset, Id< T > id)
Definition MRMesh/MRBitSet.h:203
std::function< bool(float)> ProgressCallback
Definition MRMesh/MRMeshFwd.h:589
@ None
special value not to limit path in one slice
Definition MRVoxelPath.h:33
Definition MRCameraOrientationPlugin.h:7
std::function< float(VertId)> VertMetric
Definition MRMesh/MRMeshFwd.h:426
phmap::parallel_flat_hash_map< K, V, Hash, Eq > ParallelHashMap
Definition MRMesh/MRMeshFwd.h:452
std::vector< EdgeId > EdgeLoop
Definition MRMesh/MRMeshFwd.h:99
std::vector< std::string > GcodeSource
Definition MRMesh/MRMeshFwd.h:508
WrapType
Definition MRMesh/MRMeshFwd.h:598
std::vector< SurfacePath > SurfacePaths
Definition MRMesh/MRMeshFwd.h:341
class MRMESH_CLASS UndirectedEdgeTag
Definition MRMesh/MRMeshFwd.h:61
constexpr T sqr(T x) noexcept
Definition MRMesh/MRMeshFwd.h:613
Cylinder3f
Definition MRMesh/MRMeshFwd.h:260
AABBTreePolyline2
Definition MRMesh/MRMeshFwd.h:489
Contour3< double > Contour3d
Definition MRMesh/MRMeshFwd.h:275
class MRMESH_CLASS ObjTag
Definition MRMesh/MRMeshFwd.h:68
Eq
Definition MRMesh/MRMeshFwd.h:439
std::function< bool(FaceId)> FacePredicate
Definition MRMesh/MRMeshFwd.h:413
Contour2< double > Contour2d
Definition MRMesh/MRMeshFwd.h:273
class MRMESH_CLASS NodeTag
Definition MRMesh/MRMeshFwd.h:67
HashSet< VertId > VertHashSet
Definition MRMesh/MRMeshFwd.h:446
std::function< bool(EdgeId)> EdgePredicate
Definition MRMesh/MRMeshFwd.h:414
Hash
Definition MRMesh/MRMeshFwd.h:439
Contour2< float > Contour2f
Definition MRMesh/MRMeshFwd.h:274
std::shared_ptr< OpenVdbFloatGrid > FloatGrid
Definition MRMesh/MRMeshFwd.h:537
Contours2< double > Contours2d
Definition MRMesh/MRMeshFwd.h:281
std::function< bool(UndirectedEdgeId)> UndirectedEdgePredicate
Definition MRMesh/MRMeshFwd.h:415
SurfacePaths PlaneSections
Definition MRMesh/MRMeshFwd.h:345
HashMap< VertId, VertId > VertHashMap
Definition MRMesh/MRMeshFwd.h:455
class MRMESH_CLASS VoxelTag
Definition MRMesh/MRMeshFwd.h:65
FilterType
Definition MRMesh/MRMeshFwd.h:592
SurfacePath IsoLine
Definition MRMesh/MRMeshFwd.h:342
Vector2f UVCoord
Definition MRMesh/MRMeshFwd.h:370
Triangle3< int > Triangle3i
Definition MRMesh/MRMeshFwd.h:326
MRMESH_CLASS Vector3b
Definition MRMesh/MRMeshFwd.h:137
std::vector< MeshEdgePoint > SurfacePath
Definition MRMesh/MRMeshFwd.h:340
HashMap< UndirectedEdgeId, EdgeId > WholeEdgeHashMap
mapping of whole edges: map[e]->f, map[e.sym()]->f.sym(), where only map[e] for even edges is stored
Definition MRMesh/MRMeshFwd.h:459
class MRMESH_CLASS FaceTag
Definition MRMesh/MRMeshFwd.h:62
class MRMESH_CLASS TextureTag
Definition MRMesh/MRMeshFwd.h:69
class MRMESH_CLASS PixelTag
Definition MRMesh/MRMeshFwd.h:64
Contours< Vector2< T > > Contours2
Definition MRMesh/MRMeshFwd.h:279
MRMESH_CLASS Vector3< double > Matrix2< double > Matrix4< double > SymMatrix3< double > AffineXf2f
Definition MRMesh/MRMeshFwd.h:201
SetBitIterator
Definition MRMesh/MRMeshFwd.h:119
overloaded(Ts...) -> overloaded< Ts... >
MRMESH_CLASS Vector3< double > Matrix2< double > Matrix4b
Definition MRMesh/MRMeshFwd.h:169
constexpr int sgn(T x) noexcept
Definition MRMesh/MRMeshFwd.h:616
Contours2< float > Contours2f
Definition MRMesh/MRMeshFwd.h:282
RigidScaleXf3f
Definition MRMesh/MRMeshFwd.h:215
std::function< float(EdgeId)> EdgeMetric
Definition MRMesh/MRMeshFwd.h:428
std::function< bool(EdgeId edgeToCollapse, const Vector3f &newEdgeOrgPos)> PreCollapseCallback
Definition MRMesh/MRMeshFwd.h:417
Contour< Vector2< T > > Contour2
Definition MRMesh/MRMeshFwd.h:271
SurfacePath PlaneSection
Definition MRMesh/MRMeshFwd.h:344
HashMap< FaceId, FaceId > FaceHashMap
Definition MRMesh/MRMeshFwd.h:454
std::function< float(FaceId)> FaceMetric
Definition MRMesh/MRMeshFwd.h:427
Triangle3< double > Triangle3d
Definition MRMesh/MRMeshFwd.h:328
Contour< Vector3< T > > Contour3
Definition MRMesh/MRMeshFwd.h:272
HashSet< FaceId > FaceHashSet
Definition MRMesh/MRMeshFwd.h:445
std::vector< EdgeId > EdgePath
Definition MRMesh/MRMeshFwd.h:98
class MRMESH_CLASS VertTag
Definition MRMesh/MRMeshFwd.h:63
std::pair< FaceId, FaceId > FacePair
Definition MRMesh/MRMeshFwd.h:350
constexpr NoInit noInit
Definition MRMesh/MRMeshFwd.h:57
HashSet< EdgeId > EdgeHashSet
Definition MRMesh/MRMeshFwd.h:447
std::pair< UndirectedEdgeId, UndirectedEdgeId > UndirectedEdgePair
Definition MRMesh/MRMeshFwd.h:352
Cone3f
Definition MRMesh/MRMeshFwd.h:265
BestFitParabolaf
Definition MRMesh/MRMeshFwd.h:255
Box2i
Definition MRMesh/MRMeshFwd.h:298
I
Definition MRMesh/MRMeshFwd.h:88
std::pair< EdgeId, EdgeId > EdgePair
Definition MRMesh/MRMeshFwd.h:351
std::function< void(EdgeId e1, EdgeId e)> OnEdgeSplit
Definition MRMesh/MRMeshFwd.h:418
std::function< float(UndirectedEdgeId)> UndirectedEdgeMetric
Definition MRMesh/MRMeshFwd.h:429
constexpr bool dependent_false
Definition MRMesh/MRMeshFwd.h:619
Triangle3< float > Triangle3f
Definition MRMesh/MRMeshFwd.h:327
SurfacePaths IsoLines
Definition MRMesh/MRMeshFwd.h:343
class MRMESH_CLASS EdgeTag
Definition MRMesh/MRMeshFwd.h:60
Contours3< float > Contours3f
Definition MRMesh/MRMeshFwd.h:284
std::vector< Contour< V > > Contours
Definition MRMesh/MRMeshFwd.h:278
Polyline2ProjectionWithOffsetResult
Definition MRMesh/MRMeshFwd.h:502
HashMap< EdgeId, EdgeId > EdgeHashMap
Definition MRMesh/MRMeshFwd.h:456
phmap::parallel_flat_hash_set< T, Hash, Eq > ParallelHashSet
Definition MRMesh/MRMeshFwd.h:442
MRMESH_CLASS Vector3< double > Matrix2b
Definition MRMesh/MRMeshFwd.h:153
std::pair< VertId, VertId > VertPair
Definition MRMesh/MRMeshFwd.h:349
Contour3< float > Contour3f
Definition MRMesh/MRMeshFwd.h:276
HashMap< UndirectedEdgeId, UndirectedEdgeId > UndirectedEdgeHashMap
Definition MRMesh/MRMeshFwd.h:457
Contours< Vector3< T > > Contours3
Definition MRMesh/MRMeshFwd.h:280
Contours3< double > Contours3d
Definition MRMesh/MRMeshFwd.h:283
class MRMESH_CLASS RegionTag
Definition MRMesh/MRMeshFwd.h:66
MRMESH_CLASS Vector3< double > Matrix2< double > Matrix4< double > SymMatrix3b
Definition MRMesh/MRMeshFwd.h:185
class MRMESH_CLASS GraphVertTag
Definition MRMesh/MRMeshFwd.h:70
phmap::flat_hash_map< K, V, Hash, Eq > HashMap
Definition MRMesh/MRMeshFwd.h:450
class MRMESH_CLASS GraphEdgeTag
Definition MRMesh/MRMeshFwd.h:71
Reorder
determines how points to be ordered
Definition MRMesh/MRMeshFwd.h:606
@ Lexicographically
the order is determined by lexicographical sorting by coordinates (optimal for uniform sampling)
Definition Triangulation.dox.py:1
Definition MRMesh/MRAffineXf.h:14
triangulations for all points, with easy access by VertId
Definition MRLocalTriangulations.h:48
flat map: I -> T
Definition MRBuffer.h:143
Box given by its min- and max- corners.
Definition MRMesh/MRBox.h:23
Definition MRCloudPartMapping.h:10
Definition MRColor.h:9
Definition MRDipole.h:11
two edge-points (e.g. representing collision point of two edges)
Definition MREdgePoint.h:50
encodes a point on an edge of mesh or of polyline
Definition MREdgePoint.h:11
Represents a segment on one edge.
Definition MREdgePoint.h:61
settings defining regular grid, where each quadrangular cell is split on two triangles in one of two ...
Definition MRGridSettings.h:11
Definition MRImage.h:15
Definition MRMesh/MRMeshFwd.h:494
Definition MRMesh/MRMeshFwd.h:364
Definition MRMesh/MRMeshFwd.h:366
Definition MRLineSegm.h:11
Definition MRLine.h:12
Definition MRMatrix2.h:13
Definition MRMesh/MRMatrix3.h:13
Definition MRMatrix4.h:14
Definition MRMeshIntersect.h:17
an object and its transformation to global space with other objects
Definition MRMesh/MRMeshOrPoints.h:97
Definition MRMesh/MRMeshPart.h:11
Definition MRMeshProject.h:18
Definition MRMeshTexture.h:13
Definition MRMesh/MRMeshTriPoint.h:23
Definition MRMesh/MRMesh.h:23
Definition MRNoDefInit.h:11
Definition MRMesh/MRMeshFwd.h:56
this class just hides very complex type of typedef openvdb::FloatGrid
Definition MRVDBFloatGrid.h:22
Definition MRBuffer.h:151
Represents quadratic function f(x) = a*x*x + b*x + c.
Definition MRParabola.h:11
Definition MRPartMapping.h:10
Definition MRPlane3.h:12
Definition MRMesh/MRPointCloud.h:16
Definition MRPointOnFace.h:11
Definition MRPointOnObject.h:16
Definition MRPolylineProject.h:15
Definition MRPolylineProject.h:53
Definition MRPolyline.h:18
Definition MRQuadraticForm.h:13
Definition MRQuaternion.h:13
Definition MRRigidScaleXf3.h:12
Definition MRRigidXf3.h:13
encodes a point inside a line segment using relative distance in [0,1]
Definition MRSegmPoint.h:12
describes a number of local triangulations of some points (e.g. assigned to a thread)
Definition MRLocalTriangulations.h:40
Definition MRSphere.h:9
Definition MRSymMatrix2.h:14
Definition MRSymMatrix3.h:15
Definition MRSymMatrix4.h:13
Definition MRTriMesh.h:13
encodes a point inside a triangle using barycentric coordinates
Definition MRTriPoint.h:14
Definition MRUnorientedTriangle.h:13
Definition MRVector2.h:18
Definition MRMesh/MRVector3.h:19
Definition MRVector4.h:13
Definition MRVoxelsVolume.h:51
represents a box in 3D space subdivided on voxels stored in T
Definition MRVoxelsVolume.h:37
Definition MRMesh/MRMeshFwd.h:622
Definition MRDotNet/MRMeshFwd.h:56