MeshLib
 
Loading...
Searching...
No Matches

Namespaces

namespace  AsyncObjectLoad
 
namespace  Cuda
 
namespace  detail
 
namespace  DistanceMapLoad
 
namespace  DistanceMapSave
 
namespace  Features
 
namespace  FixUndercuts
 
namespace  FloatGridComponents
 
namespace  GcodeLoad
 
namespace  ImageLoad
 
namespace  ImageSave
 
namespace  ImGuiMath
 
namespace  ImGuiMeasurementIndicators
 
namespace  LinesLoad
 
namespace  LinesSave
 
namespace  MeshBuilder
 Building topologies by triangles.
 
namespace  MeshComponents
 
namespace  MeshLoad
 
namespace  MeshSave
 
namespace  ObjectLoad
 
namespace  ObjectSave
 
namespace  PlanarTriangulation
 
namespace  PointCloudComponents
 
namespace  PointsLoad
 
namespace  PointsSave
 
namespace  PolylineComponents
 
namespace  RenderDimensions
 
namespace  RenderFeatures
 
namespace  RenderWrapObject
 
namespace  SceneLoad
 
namespace  SelfIntersections
 
namespace  StyleConsts
 
namespace  TriangulationHelpers
 
namespace  UI
 
namespace  VoxelsLoad
 
namespace  VoxelsSave
 

Classes

class  AABBTree
 
struct  AABBTreeNode
 
class  AABBTreePoints
 bounding volume hierarchy for point cloud structure More...
 
class  AABBTreePolyline
 bounding volume hierarchy for line segments More...
 
struct  ABBTreeTraits
 
class  AddCustomThemePlugin
 
class  AddPointActionPickerPoint
 
class  AddVisualProperties
 
struct  AffineXf
 
struct  AllLocalTriangulations
 triangulations for all points, with easy access by VertId More...
 
class  AlphaSortGL
 
class  AncillaryImGuiLabel
 Helper class that draws ImGui label. More...
 
struct  AncillaryLabel
 Helper class to manage ancillary labels used by plugins. More...
 
struct  AncillaryLines
 Helper class to manage ancillary visual lines used by plugins. More...
 
struct  AncillaryMesh
 Helper class to manage ancillary visual mesh used by plugins. More...
 
struct  AncillaryPoints
 Helper class to manage ancillary visual points used by plugins. More...
 
class  AngleMeasurementObject
 
class  AnyVisualizeMaskEnum
 
struct  ArcInterpolationParams
 
class  AsyncRequest
 
class  AsyncTimer
 
struct  BaseFitParams
 
struct  BaseRenderParams
 Common rendering parameters for meshes and UI. More...
 
struct  BaseShellParameters
 
struct  BaseTiffParameters
 
struct  BasicUiRenderTask
 IRenderObject::renderUi() can emit zero or more or more of those tasks. They are sorted by depth every frame. More...
 
class  BasinVolumeCalculator
 
struct  BindVertexAttribArraySettings
 
class  BitSet
 container of bits More...
 
struct  BMap
 flat map: I -> T More...
 
struct  BooleanInternalParameters
 Parameters will be useful if specified. More...
 
struct  BooleanParameters
 
struct  BooleanPreCutResult
 
struct  BooleanResult
 Structure contain boolean result. More...
 
struct  BooleanResultMapper
 Structure to map old mesh BitSets to new. More...
 
struct  BooleanResultPoints
 vertices and points representing mesh intersection result More...
 
class  BoundarySelectionWidget
 
struct  Box
 Box given by its min- and max- corners. More...
 
struct  BoxedLeaf
 
class  Buffer
 std::vector<V>-like container that is 1) resized without initialization of its elements, 2) much simplified: no push_back and many other methods More...
 
class  CameraOrientation
 
class  CaptureScreenshotMenuItem
 
class  CaptureScreenshotToClipBoardMenuItem
 
class  CaptureUIScreenshotMenuItem
 
class  ChangeActiveBoxAction
 
class  ChangeBoundarySelectionHistoryAction
 
class  ChangeColoringType
 
class  ChangeDualMarchingCubesAction
 Undo action for ObjectVoxels dual/standard marching cubes change. More...
 
class  ChangeFacesColorMapAction
 
class  ChangeGridAction
 
class  ChangeIsoAction
 Undo action for ObjectVoxels iso-value change. More...
 
class  ChangeLabelAction
 
class  ChangeLinesColorMapAction
 
class  ChangeMeshAction
 Undo action for ObjectMesh mesh change. More...
 
class  ChangeMeshCreasesAction
 Undo action for ObjectMesh creases. More...
 
class  ChangeMeshEdgeSelectionAction
 Undo action for ObjectMesh edge selection. More...
 
class  ChangeMeshFaceSelectionAction
 Undo action for ObjectMesh face selection. More...
 
class  ChangeMeshPointsAction
 Undo action for ObjectMesh points only (not topology) change. More...
 
class  ChangeMeshTopologyAction
 Undo action for ObjectMesh topology only (not points) change. More...
 
class  ChangeMeshUVCoordsAction
 Undo action for ObjectMeshHolder uvCoords change. More...
 
class  ChangeNameAction
 
class  ChangeObjectAction
 
class  ChangeObjectColorAction
 
class  ChangeObjectSelectedAction
 
class  ChangeObjectVisibilityAction
 
class  ChangePointActionPickerPoint
 
class  ChangePointCloudAction
 
class  ChangePointCloudNormalsAction
 
class  ChangePointCloudPointsAction
 
class  ChangePointPointSelectionAction
 Undo action for ObjectPoints point selection. More...
 
class  ChangePolylineAction
 Undo action for ObjectLines polyline change. More...
 
class  ChangePolylinePointsAction
 Undo action for ObjectLines points only (not topology) change. More...
 
class  ChangePolylineTopologyAction
 Undo action for ObjectLines topology only (not points) change. More...
 
class  ChangeSceneAction
 
class  ChangeSceneObjectsOrder
 
class  ChangeSurfaceAction
 
class  ChangeTextureAction
 
class  ChangeValue
 
class  ChangeVertsColorMapAction
 
class  ChangeVisualizePropertyAction
 
class  ChangeXfAction
 
class  ChangVoxelSelectionAction
 Undo action for ObjectVoxels face selection. More...
 
struct  CharPressedListener
 
class  CircleObject
 
struct  CloudPartMapping
 
class  CNCMachineSettings
 class with CNC machine emulation settings More...
 
struct  Color
 
class  ColorMapAggregator
 Class for aggregate several color map in one Color maps are aggregated according order. More...
 
class  ColorTheme
 
class  CombinedHistoryAction
 
class  CommandLoop
 
struct  ComputeSteepestDescentPathSettings
 
class  Cone3
 
class  Cone3Approximation
 
struct  Cone3ApproximationParams
 
struct  ConeFittingFunctor
 
class  ConeObject
 
class  Config
 
struct  ConnectionHolder
 
struct  ConstantCuspParams
 
struct  ContoursDistanceMapOffset
 Structure with parameters for optional offset in distanceMapFromContours function. More...
 
struct  ContoursDistanceMapOptions
 
struct  ContourToDistanceMapParams
 Structure with parameters to generate DistanceMap by Contours. More...
 
struct  CoordinateConverters
 this struct contains coordinate converters float-int-float More...
 
struct  CoordinateConverters2
 this struct contains coordinate converters float-int-float More...
 
class  CudaAccessor
 The purpose of this class is to access CUDA algorithms without explicit dependency on MRCuda. More...
 
struct  CursorEntranceListener
 class to subscribe on CursorEntranceSingal More...
 
struct  CustomButtonParameters
 
struct  CutMeshParameters
 Parameters of MR::cutMesh. More...
 
struct  CutMeshResult
 
class  Cylinder3
 
class  Cylinder3Approximation
 
class  CylinderObject
 
struct  DecimateParallelSettings
 Parameters structure for MR::decimateParallelMesh. More...
 
struct  DecimatePolylineResult
 Results of MR::decimateContour. More...
 
struct  DecimatePolylineSettings
 Parameters structure for MR::decimatePolyline. More...
 
struct  DecimateResult
 Results of MR::decimateMesh. More...
 
struct  DecimateSettings
 Parameters structure for MR::decimateMesh. More...
 
class  DefaultSplashWindow
 
struct  DeloneSettings
 
class  DemoPlugin
 
struct  DenoiseViaNormalsSettings
 
struct  DenseBox
 
struct  DetectTunnelSettings
 
struct  Dipole
 
class  DirectionWidget
 Widget for visualizing the direction. More...
 
struct  Directory
 
struct  DirectoryIterator
 iterator of directory items that will save any errors in (ec) instead of throwing exceptions More...
 
struct  DirectoryRecursive
 
struct  DirectoryRecursiveIterator
 recursive iterator of directory items that will save any errors in (ec) instead of throwing exceptions More...
 
struct  Dirty
 
class  DistanceMap
 
struct  DistanceMapToWorld
 This structure store data to transform distance map to world coordinates. More...
 
class  DistanceMeasurementObject
 
struct  DistanceVolumeParams
 
struct  DividePointCloudOptionalOutput
 
struct  DividePolylineParameters
 
struct  DragDropListener
 
struct  DrawButtonParams
 
struct  DrawListener
 
class  EdgePathsAStarBuilder
 
class  EdgePathsBuilderT
 the class is responsible for finding smallest metric edge paths on a mesh More...
 
struct  EdgePoint
 encodes a point on an edge of mesh or of polyline More...
 
struct  EdgePointPair
 two edge-points (e.g. representing collision point of two edges) More...
 
struct  EdgeSegment
 Represents a segment on one edge. More...
 
struct  EdgeTri
 edge from one mesh and triangle from another mesh More...
 
class  EmbeddedPython
 
struct  EmbeddedStructureParameters
 
class  EnumNeihbourFaces
 
class  EnumNeihbourVertices
 
struct  FaceDistancesSettings
 
struct  FaceFace
 
struct  FanRecord
 describes one fan of triangles around a point excluding the point More...
 
struct  FanRecordWithCenter
 describes one fan of triangles around a point including the point More...
 
class  FastWindingNumber
 
class  FeatureObject
 An interface class which allows feature objects to share setters and getters on their main properties, for convenient presentation in the UI. More...
 
struct  FeatureObjectProjectPointResult
 
struct  FeatureObjectSharedProperty
 
class  FewSmallest
 the class stores some number of smallest elements from a larger number of candidates More...
 
class  File
 the class to open C FILE handle and automatically close it in the destructor More...
 
struct  FileParameters
 
struct  FillHoleItem
 
struct  FillHoleMetric
 Holds metrics for fillHole and buildCylinderBetweenTwoHoles triangulation
. More...
 
struct  FillHoleParams
 Parameters structure for MR::fillHole
Structure has some options to control MR::fillHole. More...
 
struct  FindOverhangsSettings
 parameters for MR::findOverhangs More...
 
struct  FindOverlappingSettings
 
struct  FitBoxParams
 
class  FitDataMenuItem
 
struct  FitDataParams
 
class  FitSelectedObjectsMenuItem
 
class  FitSelectedPrimitivesMenuItem
 
class  FlowAggregator
 this class can track multiple flows and find in each mesh vertex the amount of water reached it More...
 
struct  FlowOrigin
 
class  FramebufferData
 
class  FrameCounter
 
class  FrameRedrawRequest
 class for requesting frame redraw in some time More...
 
class  FreeFormDeformer
 
class  GcodeProcessor
 
class  GcodeToolsLibrary
 
struct  GCommand
 
struct  GeneralOffsetParameters
 allows the user to select in the parameters which offset algorithm to call More...
 
class  GlBuffer
 
class  GLStaticHolder
 
class  GlTexture2
 
class  GlTexture3
 
class  Graph
 mathematical graph consisting from vertices and undirected edges More...
 
struct  GridSettings
 settings defining regular grid, where each quadrangular cell is split on two triangles in one of two ways More...
 
struct  GridToMeshSettings
 parameters of OpenVDB Grid to Mesh conversion using Dual Marching Cubes algorithm More...
 
class  HashToVectorMappingConverter
 
class  Heap
 stores map from element id in[0, size) to T; More...
 
class  Histogram
 
class  Historian
 
class  HistoryAction
 
class  HistoryStore
 This class stores history stack for undo/redo. More...
 
struct  HoleEdgePoint
 
struct  HoleFillPlan
 concise representation of proposed hole triangulation More...
 
struct  IConnectable
 
class  ICP
 
struct  ICPProperties
 
class  Id
 
class  Id< EdgeTag >
 
class  Id< VoxelTag >
 
class  IFastWindingNumber
 Abstract class for fast approximate computation of winding number for a mesh (using its AABB tree) More...
 
struct  Image
 
class  ImGuiImage
 
struct  ImproveSamplingSettings
 
struct  InflateSettings
 
struct  InterruptCloseListener
 
struct  IntersectionPrecomputes
 
struct  IntersectionPrecomputes2
 
class  InTreePathBuilder
 
struct  IOFilter
 
class  IPluginUpdate
 
class  IPointsToMeshProjector
 Abstract class, computes the closest point on mesh to each of given points. Pure virtual functions must be implemented. More...
 
class  IRenderObject
 
class  ISceneSelectionChange
 
class  ISceneStateCheck
 
struct  IsVisualizeMaskEnum
 
struct  IsVisualizeMaskEnum< DimensionsVisualizePropertyType >
 
struct  IsVisualizeMaskEnum< FeatureVisualizePropertyType >
 
struct  IsVisualizeMaskEnum< LabelVisualizePropertyType >
 
struct  IsVisualizeMaskEnum< LinesVisualizePropertyType >
 
struct  IsVisualizeMaskEnum< MeshVisualizePropertyType >
 
struct  IsVisualizeMaskEnum< PointsVisualizePropertyType >
 
struct  IsVisualizeMaskEnum< VisualizeMaskType >
 
struct  IteratorRange
 
class  ITransformControls
 
class  IViewerSettingsManager
 
struct  KeyDownListener
 
struct  KeyRepeatListener
 
struct  KeyUpListener
 
class  LambdaRibbonItem
 
class  Laplacian
 
struct  LaunchParams
 
struct  Line
 
struct  Line3Mesh
 
struct  LineInterpolationParams
 
class  LineObject
 
struct  LineSegm
 
class  Logger
 Make default spd logger. More...
 
class  LoggingStreambuf
 A custom streambuf that outputs things directly to the default spdlog logger. More...
 
struct  MakeDegenerateBandAroundRegionParams
 
struct  MarchingCubesParams
 
class  MarkedVoxelSlice
 
struct  Matrix
 
struct  Matrix2
 
struct  Matrix3
 
struct  Matrix4
 
class  MeasurementObject
 
class  Menu
 
struct  MenuItemCaptionSize
 
struct  MenuItemInfo
 
struct  MergeVolumePartSettings
 Parameters' structure for MR::mergeVolumePart. More...
 
struct  Mesh
 
struct  MeshApproxRelaxParams
 
class  MeshDiff
 
struct  MeshDistanceResult
 
struct  MeshEqualizeTriAreasParams
 
struct  MeshIntersectionResult
 
struct  MeshLoadSettings
 
struct  MeshMeshConverter
 
class  MeshModifier
 
struct  MeshNormals
 
class  MeshOrPoints
 
struct  MeshOrPointsXf
 an object and its transformation to global space with other objects More...
 
struct  MeshPart
 
struct  MeshProjectionResult
 
struct  MeshRelaxParams
 
struct  MeshSignedDistanceResult
 
struct  MeshTexture
 
struct  MeshToDistanceMapParams
 
struct  MeshToDistanceVolumeParams
 
class  MeshTopology
 
struct  MeshToVolumeParams
 
struct  MeshTriPoint
 
struct  MeshVoxelsConverter
 
struct  MetricToAStarPenalty
 
struct  ModelBaseRenderParams
 
struct  ModelRenderParams
 Mesh rendering parameters for primary rendering (as opposed to the picker). More...
 
class  MouseController
 
struct  MouseDownListener
 
struct  MouseMoveListener
 
struct  MouseScrollListener
 
struct  MouseUpListener
 
struct  MovementBuildBodyParams
 
class  MoveObjectByMouse
 
class  MoveObjectByMouseImpl
 
struct  MultiListener
 
struct  MultiMeshIntersectionResult
 
class  MultiwayICP
 
struct  MutexOwner
 
struct  NameTagClickListener
 
class  NextEdgeSameLeft
 
class  NextEdgeSameOrigin
 
struct  NoCtor
 
struct  NoCtor< T >
 
struct  NoDefInit
 
struct  NoInit
 
struct  NoiseSettings
 
struct  NoModelCheck
 
class  NormalsToPoints
 
struct  NoVisualRepresentationCheck
 
struct  NumSum
 
class  Object
 named object in the data model More...
 
class  ObjectChildrenHolder
 
class  ObjectDistanceMap
 
class  ObjectFactory
 
class  ObjectFactoryBase
 
class  ObjectGcode
 
class  ObjectLabel
 
class  ObjectLines
 
class  ObjectLinesHolder
 
class  ObjectMesh
 
class  ObjectMeshHolder
 
class  ObjectPoints
 
class  ObjectPointsHolder
 
class  ObjectTransformWidget
 
class  ObjectVoxels
 
struct  OffsetContourIndex
 
struct  OffsetContoursOrigins
 
struct  OffsetContoursParams
 
struct  OffsetContoursRestoreZParams
 Parameters of restoring Z coordinate of XY offset 3d contours. More...
 
struct  OffsetParameters
 
struct  OneMeshContour
 
struct  OneMeshIntersection
 
class  OpenDICOMsMenuItem
 
class  OpenDirectoryMenuItem
 
class  OpenFilesMenuItem
 
class  OpenRawVoxelsPlugin
 
struct  OpenVdbFloatGrid
 this class just hides very complex type of typedef openvdb::FloatGrid More...
 
struct  OutputFlows
 
struct  overloaded
 
struct  PackMapping
 
class  Palette
 Class to hold one dimension texture with value to UV mapping. More...
 
class  PalettePresets
 Class to save and load user palette presets. More...
 
struct  PartMapping
 
class  Pdf
 
struct  PdfParameters
 Parameters of document style. More...
 
struct  Plane3
 
class  PlaneAccumulator
 Class to accumulate planes to find then their crossing point. More...
 
class  PlaneObject
 
class  PlaneWidget
 
class  PluginCloseOnChangeMesh
 
class  PluginCloseOnChangePointCloud
 
class  PluginCloseOnSelectedObjectRemove
 
class  PluginUpdateOnChangeMeshPart
 
class  PluginUpdateOr
 
class  PointAccumulator
 Class to accumulate points and make best line / plane approximation. More...
 
struct  PointCloud
 
struct  PointCloudApproxRelaxParams
 
struct  PointCloudRelaxParams
 
struct  PointInAllSpaces
 
class  PointObject
 
struct  PointOnFace
 
struct  PointOnObject
 
struct  PointPair
 Stores a pair of points: one samples on the source and the closest to it on the target. More...
 
struct  PointPairs
 
struct  PointsLoadSettings
 
struct  PointsProjectionResult
 
struct  PointsToDistanceVolumeParams
 
struct  PointsToMeshParameters
 
class  PointsToMeshProjector
 Computes the closest point on mesh to each of given points on CPU. More...
 
class  PointToPlaneAligningTransform
 
class  PointToPointAligningTransform
 
struct  Polyline
 
struct  PolylineIntersectionResult2
 
struct  PolylineMaker
 simplifies construction of connected polyline in the topology More...
 
struct  PolylineProjectionResult
 
struct  PolylineProjectionWithOffsetResult
 
struct  PolylineSubdivideSettings
 
class  PolylineTopology
 
struct  PolylineTraits
 
struct  PolylineTraits< Vector2f >
 
struct  PolylineTraits< Vector3f >
 
class  PolylineUndirectedEdgeIterator
 
struct  PositionedText
 
struct  PostDrawListener
 
struct  PostFocusListener
 class to subscribe on PostFocusSingal More...
 
struct  PostRescaleListener
 
struct  PostResizeListener
 
class  PrecipitationSimulator
 the class models water increase in the terrain under the rain with constant precipitation More...
 
struct  PreciseCollisionResult
 
struct  PreciseVertCoords
 
struct  PreciseVertCoords2
 
struct  PreDrawListener
 
class  ProgressBar
 
struct  ProgressInterrupter
 
class  PythonExport
 
struct  PythonFunctionAdder
 
struct  QuadraticForm
 
class  QuadricApprox
 
class  QuadTextureVertexObject
 
struct  Quaternion
 
class  RadiusMeasurementObject
 
class  RangeCounter
 functor to calculate tile and leaf valid nodes count More...
 
class  RangeProcessor
 Class to use in tbb::parallel_reduce for openvdb::tree transformation. More...
 
class  RangeProcessorSingle
 Class to use in tbb::parallel_reduce for tree operations that do not require an output tree. More...
 
class  RangeProgress
 
struct  RangeSize
 
struct  RawTiffOutput
 
struct  RayOrigin
 
class  RecentFilesStore
 
class  RectIndexer
 a class for converting 2D integer coordinates into 1D linear coordinates and backward More...
 
class  RegisterRenderObjectConstructor
 
class  RegularMapMesher
 Class for making mesh from regular distance map. More...
 
struct  RelaxParams
 
struct  RemeshSettings
 
class  RemovePointActionPickerPoint
 
class  RenderAngleObject
 
class  RenderBufferRef
 
class  RenderDistanceObject
 
class  RenderLabelObject
 
class  RenderLinesObject
 
class  RenderMeshObject
 
class  RenderNameObject
 
class  RenderObjectBuffer
 
class  RenderObjectCombinator
 
class  RenderPointsObject
 
class  RenderRadiusObject
 
class  RenderResetDirtyComponent
 
class  RenderVolumeObject
 
class  ResetSceneMenuItem
 
struct  ResolveMeshDegenSettings
 
class  RestoringStreamsSink
 
class  RibbonButtonDrawer
 class for drawing ribbon menu buttons More...
 
class  RibbonFontManager
 
class  RibbonIcons
 
class  RibbonMenu
 
class  RibbonMenuItem
 
struct  RibbonMenuItemAdder
 
struct  RibbonMenuItemCall
 
class  RibbonMenuSearch
 
struct  RibbonNotification
 
class  RibbonNotifier
 
class  RibbonSceneRemoveSelected
 
class  RibbonSceneRename
 
class  RibbonSceneSelectAll
 
class  RibbonSceneShowOnlyNext
 
class  RibbonSceneShowOnlyPrev
 
class  RibbonSceneSortByName
 
class  RibbonSceneUnselectAll
 
struct  RibbonSchema
 
class  RibbonSchemaHolder
 
class  RibbonSchemaLoader
 
struct  RibbonTab
 
class  RingIterator
 
class  SaveObjectMenuItem
 
struct  SaveObjectSettings
 
class  SaveOnClosePlugin
 
class  SaveSceneAsMenuItem
 
class  SaveSceneMenuItem
 
class  SaveSelectedMenuItem
 
struct  SaveSettings
 determines how to save points/lines/mesh More...
 
class  SceneCache
 
struct  SceneColors
 
class  SceneRoot
 
class  SceneRootObject
 Object that is parent of all scene. More...
 
class  SceneSelectionChangeClose
 
class  SceneSelectionChangeRestart
 
class  SceneSettings
 
class  SceneStateAndCheck
 
class  SceneStateAtLeastCheck
 
class  SceneStateAtLeastCheck< N, ObjectT, NoModelCheck >
 
class  SceneStateAtLeastCheck< N, ObjectT, NoVisualRepresentationCheck >
 
class  SceneStateExactCheck
 
class  SceneStateExactCheck< N, ObjectT, NoModelCheck >
 
class  SceneStateExactCheck< N, ObjectT, NoVisualRepresentationCheck >
 
class  SceneStateOrCheck
 
class  SceneTextureGL
 
class  ScopeHistory
 
struct  SearchPathSettings
 Geo path search settings. More...
 
struct  SegmEndColors
 
struct  SegmentSegmentIntersectResult
 
struct  SegmPoint
 encodes a point inside a line segment using relative distance in [0,1] More...
 
class  SelectObjectByClick
 
class  SelectScreenLasso
 
class  SeparationPointStorage
 storage for points on voxel edges used in Marching Cubes algorithms More...
 
class  SetBitIteratorT
 iterator to enumerate all indices with set bits in BitSet class or its derivatives More...
 
class  SetViewportConfigPresetMenuItem
 
class  SetViewPresetMenuItem
 
struct  ShaderWarning
 
class  ShadowsGL
 
struct  SharpenMarchingCubesMeshSettings
 
struct  SharpOffsetParameters
 
class  ShiftTransformer
 functor for shifting voxels More...
 
class  ShortcutManager
 
struct  Signal
 
struct  SignedDistanceToMeshResult
 
struct  SimpleTimeRecord
 
struct  SkyPatch
 this class represents a portion of the sky, and its radiation More...
 
struct  SomeLocalTriangulations
 describes a number of local triangulations of some points (e.g. assigned to a thread) More...
 
struct  SortIntersectionsData
 
class  SpaceMouseController
 
struct  SpaceMouseDownListener
 class to subscribe on SpaceMouseDownSgnal More...
 
class  SpaceMouseHandler
 class to handle spacemouse More...
 
class  SpaceMouseHandlerHidapi
 
struct  SpaceMouseMoveListener
 class to subscribe on SpaceMouseMoveSignal More...
 
struct  SpaceMouseParameters
 
struct  SpaceMouseUpListener
 class to subscribe on SpaceMouseUpSignal More...
 
struct  SpacingSettings
 
struct  Sphere
 
class  SphereObject
 
struct  SphereParams
 
class  SplashWindow
 
class  StateBasePlugin
 
class  StateListenerPlugin
 
struct  StitchHolesParams
 Parameters structure for MR::buildCylinderBetweenTwoHoles
Structure has some options to control MR::buildCylinderBetweenTwoHoles. More...
 
struct  StopOnTrueCombiner
 
struct  SubdivideSettings
 
class  SurfaceContoursWidget
 
class  SurfaceContoursWidgetClearAction
 
class  SurfaceDistanceBuilder
 this class is responsible for iterative construction of distance map along the surface More...
 
class  SurfaceManipulationWidget
 widget for surface modifying @detail available 3 modes: add (move surface region in direction of normal) remove (move surface region in opposite direction to normal) relax (relax surface region) More...
 
class  SurfacePointWidget
 
class  SwapRootAction
 
struct  SymbolMeshParams
 
struct  SymMatrix2
 
struct  SymMatrix3
 
struct  SymMatrix4
 
class  TaggedBitSet
 container of bits representing specific indices (faces, verts or edges) More...
 
struct  TerminalVertex
 
struct  TextMeshAlignParams
 
struct  ThreadRootTimeRecord
 
struct  TiffParameters
 
class  Timer
 
struct  TimeRecord
 
class  Toolbar
 class to draw toolbar and toolbar customize windows More...
 
struct  ToolPathParams
 
struct  ToolPathResult
 
struct  TouchEndListener
 
class  TouchesController
 
struct  TouchMoveListener
 
class  TouchpadController
 
struct  TouchpadParameters
 
struct  TouchpadRotateGestureBeginListener
 class to subscribe on TouchpadRotateGestureBeginEvent More...
 
struct  TouchpadRotateGestureEndListener
 class to subscribe on TouchpadRotateGestureEndEvent More...
 
struct  TouchpadRotateGestureUpdateListener
 class to subscribe on TouchpadRotateGestureUpdateEvent More...
 
struct  TouchpadSwipeGestureBeginListener
 class to subscribe on TouchpadSwipeGestureBeginEvent More...
 
struct  TouchpadSwipeGestureEndListener
 class to subscribe on TouchpadSwipeGestureEndEvent More...
 
struct  TouchpadSwipeGestureUpdateListener
 class to subscribe on TouchpadSwipeGestureUpdateEvent More...
 
struct  TouchpadZoomGestureBeginListener
 class to subscribe on TouchpadZoomGestureBeginEvent More...
 
struct  TouchpadZoomGestureEndListener
 class to subscribe on TouchpadZoomGestureEndEvent More...
 
struct  TouchpadZoomGestureUpdateListener
 class to subscribe on TouchpadZoomGestureUpdateEvent More...
 
struct  TouchStartListener
 
class  TransformControls
 
struct  TransformedMesh
 just stores a mesh and its transformation to some fixed reference frame More...
 
struct  TriangleSegmentIntersectResult
 
struct  TriangulationParameters
 Parameters of point cloud triangulation. More...
 
struct  TriIntersectResult
 
struct  TriMesh
 
struct  TrimOptionalOutput
 
struct  TrimWithPlaneParams
 
struct  TriPoint
 encodes a point inside a triangle using barycentric coordinates More...
 
struct  TrivialMetricToPenalty
 the vertices in the queue are ordered by their metric from a start location More...
 
struct  UiRenderManager
 
struct  UiRenderParams
 
class  UndirectedEdgeIterator
 
struct  UndirectedEdgeUndirectedEdge
 
struct  UniformSamplingSettings
 
class  UnionFind
 Simple union find data structure. More...
 
struct  UniquePtr
 
class  UniqueTemporaryFolder
 
class  UniqueThreadSafeOwner
 
struct  UniteManyMeshesParams
 
struct  UnitInfo
 
struct  UnitToStringParams
 
struct  UnorientedTriangle
 
struct  VariableEdgeTri
 
class  Vector
 std::vector<T>-like container that requires specific indexing type, More...
 
struct  Vector2
 
struct  Vector3
 
struct  Vector4
 
struct  VectorTraits
 
struct  VectorTraits< ImVec2 >
 
struct  VectorTraits< ImVec4 >
 
struct  VectorTraits< Vector2< T > >
 
struct  VectorTraits< Vector3< T > >
 
struct  VectorTraits< Vector4< T > >
 
struct  VertDistance
 
struct  VertPathInfo
 information associated with each vertex by the paths builder More...
 
class  VertRenumber
 maps valid points to packed sequential indices More...
 
class  Viewer
 
class  ViewerEventQueue
 queue to ignore multiple mouse moves in one frame More...
 
class  ViewerPlugin
 
class  ViewerSettingsManager
 
class  ViewerSettingsPlugin
 
class  ViewerSetup
 
class  Viewport
 
class  ViewportGL
 
class  ViewportId
 
class  ViewportIterator
 iterates over all ViewportIds in given ViewportMask More...
 
struct  ViewportLinesWithColors
 
class  ViewportMask
 stores mask of viewport unique identifiers More...
 
class  ViewportParametersAction
 
struct  ViewportPointsWithColors
 
class  ViewportProperty
 
class  VisualObject
 Visual Object. More...
 
class  VolumeIndexer
 
struct  VolumeSegmentationParameters
 Parameters for volume segmentation. More...
 
class  VolumeSegmenter
 Class for voxels segmentation. More...
 
struct  VolumeToMeshByPartsSettings
 Parameters' structure for MR::volumeToMeshByParts. More...
 
struct  VoxelMetricParameters
 Parameters for building metric function. More...
 
struct  VoxelsVolume
 represents a box in 3D space subdivided on voxels stored in T More...
 
class  VoxelsVolumeAccessor
 helper class for generalized voxel volume data access More...
 
class  VoxelsVolumeAccessor< VdbVolume >
 
class  VoxelsVolumeAccessor< VoxelsVolume< std::vector< T > > >
 
class  VoxelsVolumeAccessor< VoxelsVolume< VoxelValueGetter< T > > >
 
class  VoxelsVolumeCachingAccessor
 helper class to preload voxel volume data More...
 
struct  VoxelTraits
 
struct  VoxelTraits< FloatGrid >
 
struct  VoxelTraits< std::vector< T > >
 
struct  VoxelTraits< VoxelValueGetter< T > >
 
class  WatershedGraph
 graphs representing rain basins on the mesh More...
 
class  WebRequest
 
struct  WeightedVertex
 
struct  Writer
 
class  XfBasedCache
 
struct  ZeroOnMove
 

Concepts

concept  Trivial
 
concept  AnyVisualizeMaskEnumType
 
concept  UnitEnum
 

Typedefs

using FileNamesStack = std::vector<std::filesystem::path>
 
using FaceTreeTraits3 = ABBTreeTraits<FaceId, Box3f>
 
template<typename V >
using LineTreeTraits = ABBTreeTraits<UndirectedEdgeId, Box<V>>
 
using LineTreeTraits2 = LineTreeTraits<Vector2f>
 
using LineTreeTraits3 = LineTreeTraits<Vector3f>
 
template<typename T >
using AABBTreeNodeId = typename AABBTreeNode<T>::NodeId
 
template<typename T >
using AABBTreeNodeVec = Vector<AABBTreeNode<T>, AABBTreeNodeId<T>>
 
using OneMeshContours = std::vector<OneMeshContour>
 Special data type for MR::cutMesh.
 
using PathMeshEdgePointCallback = std::function<void( const MeshEdgePoint& mep )>
 
template<class T , class E = std::string>
using Expected = tl::expected<T, E>
 
using VoidOrErrStr = Expected<void, std::string>
 return type for a void function that can produce an error string
 
using Dipoles = Vector<Dipole, AABBTree::NodeId>
 
using FeaturesPropertyTypesVariant = std::variant<float, Vector3f>
 
using HighPrecisionInt = boost::multiprecision::checked_int128_t
 
using Vector2hp = Vector2<HighPrecisionInt>
 
using Vector3hp = Vector3<HighPrecisionInt>
 
using Vector4hp = Vector4<HighPrecisionInt>
 
using Matrix3hp = Matrix3<HighPrecisionInt>
 
using Matrix4hp = Matrix4<HighPrecisionInt>
 
using HistoryStackFilter = std::function<bool( const std::shared_ptr<HistoryAction>& )>
 
using HistoryActionsVector = std::vector<std::shared_ptr<HistoryAction>>
 
using ContinuousContour = std::vector<VariableEdgeTri>
 
using ContinuousContours = std::vector<ContinuousContour>
 
using IOFilters = std::vector<IOFilter>
 
using ObjectPtr = std::shared_ptr<Object>
 
using IRenderObjectConstructorLambda = std::function<std::unique_ptr<IRenderObject>( const VisualObject& )>
 
using TrianglesRepetitions = std::array<int, 4>
 
using VoxelPointPositioner = std::function<Vector3f( const Vector3f&, const Vector3f&, float, float, float )>
 
using ConvertToIntVector = std::function<Vector3i(const Vector3f&)>
 float-to-int coordinate converter
 
using ConvertToFloatVector = std::function<Vector3f( const Vector3i& )>
 int-to-float coordinate converter
 
using TriangleCallback = std::function<ProcessOneResult( const Vector3f & p, FaceId f, const Vector3f & q, float distSq )>
 
using MultipleEdge = std::pair<VertId, VertId>
 finds multiple edges in the mesh
 
using EdgeId = Id<EdgeTag>
 
using UndirectedEdgeId = Id<UndirectedEdgeTag>
 
using FaceId = Id<FaceTag>
 
using VertId = Id<VertTag>
 
using PixelId = Id<PixelTag>
 
using VoxelId = Id<VoxelTag>
 
using RegionId = Id<RegionTag>
 
using ThreeVertIds = std::array<VertId, 3>
 three vertex ids describing a triangle topology
 
using Triangulation = Vector<ThreeVertIds, FaceId>
 mapping from FaceId to a triple of vertex indices
 
using EdgePath = std::vector<EdgeId>
 
using EdgeLoop = std::vector<EdgeId>
 
using FaceBitSet = TaggedBitSet<FaceTag>
 
using VertBitSet = TaggedBitSet<VertTag>
 
using EdgeBitSet = TaggedBitSet<EdgeTag>
 
using UndirectedEdgeBitSet = TaggedBitSet<UndirectedEdgeTag>
 
using PixelBitSet = TaggedBitSet<PixelTag>
 
using VoxelBitSet = TaggedBitSet<VoxelTag>
 
using SetBitIterator = SetBitIteratorT<BitSet>
 
using FaceSetBitIterator = SetBitIteratorT<FaceBitSet>
 
using VertSetBitIterator = SetBitIteratorT<VertBitSet>
 
using EdgeSetBitIterator = SetBitIteratorT<EdgeBitSet>
 
using UndirectedEdgeSetBitIterator = SetBitIteratorT<UndirectedEdgeBitSet>
 
using Vector2b = Vector2<bool>
 
using Vector2i = Vector2<int>
 
using Vector2ll = Vector2<long long>
 
using Vector2f = Vector2<float>
 
using Vector2d = Vector2<double>
 
using Vector3b = Vector3<bool>
 
using Vector3i = Vector3<int>
 
using Vector3ll = Vector3<long long>
 
using Vector3f = Vector3<float>
 
using Vector3d = Vector3<double>
 
using Vector4b = Vector4<bool>
 
using Vector4i = Vector4<int>
 
using Vector4ll = Vector4<long long>
 
using Vector4f = Vector4<float>
 
using Vector4d = Vector4<double>
 
using Matrix2b = Matrix2<bool>
 
using Matrix2i = Matrix2<int>
 
using Matrix2ll = Matrix2<long long>
 
using Matrix2f = Matrix2<float>
 
using Matrix2d = Matrix2<double>
 
using Matrix3b = Matrix3<bool>
 
using Matrix3i = Matrix3<int>
 
using Matrix3ll = Matrix3<long long>
 
using Matrix3f = Matrix3<float>
 
using Matrix3d = Matrix3<double>
 
using Matrix4b = Matrix4<bool>
 
using Matrix4i = Matrix4<int>
 
using Matrix4ll = Matrix4<long long>
 
using Matrix4f = Matrix4<float>
 
using Matrix4d = Matrix4<double>
 
using SymMatrix2b = SymMatrix2<bool>
 
using SymMatrix2i = SymMatrix2<int>
 
using SymMatrix2ll = SymMatrix2<long long>
 
using SymMatrix2f = SymMatrix2<float>
 
using SymMatrix2d = SymMatrix2<double>
 
using SymMatrix3b = SymMatrix3<bool>
 
using SymMatrix3i = SymMatrix3<int>
 
using SymMatrix3ll = SymMatrix3<long long>
 
using SymMatrix3f = SymMatrix3<float>
 
using SymMatrix3d = SymMatrix3<double>
 
using SymMatrix4b = SymMatrix4<bool>
 
using SymMatrix4i = SymMatrix4<int>
 
using SymMatrix4ll = SymMatrix4<long long>
 
using SymMatrix4f = SymMatrix4<float>
 
using SymMatrix4d = SymMatrix4<double>
 
template<typename T >
using AffineXf2 = AffineXf<Vector2<T>>
 
using AffineXf2f = AffineXf2<float>
 
using AffineXf2d = AffineXf2<double>
 
template<typename T >
using AffineXf3 = AffineXf<Vector3<T>>
 
using AffineXf3f = AffineXf3<float>
 
using AffineXf3d = AffineXf3<double>
 
template<typename T >
using Sphere2 = Sphere<Vector2<T>>
 
using Sphere2f = Sphere2<float>
 
using Sphere2d = Sphere2<double>
 
template<typename T >
using Sphere3 = Sphere<Vector3<T>>
 
using Sphere3f = Sphere3<float>
 
using Sphere3d = Sphere3<double>
 
template<typename T >
using Line2 = Line<Vector2<T>>
 
using Line2f = Line2<float>
 
using Line2d = Line2<double>
 
template<typename T >
using Line3 = Line<Vector3<T>>
 
using Line3f = Line3<float>
 
using Line3d = Line3<double>
 
template<typename T >
using LineSegm2 = LineSegm<Vector2<T>>
 
using LineSegm2f = LineSegm2<float>
 
using LineSegm2d = LineSegm2<double>
 
template<typename T >
using LineSegm3 = LineSegm<Vector3<T>>
 
using LineSegm3f = LineSegm3<float>
 
using LineSegm3d = LineSegm3<double>
 
using Cylinder3f = Cylinder3<float>
 
using Cylinder3d = Cylinder3<double>
 
using Cone3f = Cone3<float>
 
using Cone3d = Cone3<double>
 
template<typename V >
using Contour = std::vector<V>
 
template<typename T >
using Contour2 = Contour<Vector2<T>>
 
template<typename T >
using Contour3 = Contour<Vector3<T>>
 
using Contour2d = Contour2<double>
 
using Contour2f = Contour2<float>
 
using Contour3d = Contour3<double>
 
using Contour3f = Contour3<float>
 
template<typename V >
using Contours = std::vector<Contour<V>>
 
template<typename T >
using Contours2 = Contours<Vector2<T>>
 
template<typename T >
using Contours3 = Contours<Vector3<T>>
 
using Contours2d = Contours2<double>
 
using Contours2f = Contours2<float>
 
using Contours3d = Contours3<double>
 
using Contours3f = Contours3<float>
 
using Plane3f = Plane3<float>
 
using Plane3d = Plane3<double>
 
template<typename T >
using Box2 = Box<Vector2<T>>
 
using Box2i = Box2<int>
 
using Box2ll = Box2<long long>
 
using Box2f = Box2<float>
 
using Box2d = Box2<double>
 
template<typename T >
using Box3 = Box<Vector3<T>>
 
using Box3i = Box3<int>
 
using Box3ll = Box3<long long>
 
using Box3f = Box3<float>
 
using Box3d = Box3<double>
 
template<typename T >
using QuadraticForm2 = QuadraticForm<Vector2<T>>
 
using QuadraticForm2f = QuadraticForm2<float>
 
using QuadraticForm2d = QuadraticForm2<double>
 
template<typename T >
using QuadraticForm3 = QuadraticForm<Vector3<T>>
 
using QuadraticForm3f = QuadraticForm3<float>
 
using QuadraticForm3d = QuadraticForm3<double>
 
using Quaternionf = Quaternion<float>
 
using Quaterniond = Quaternion<double>
 
template<typename T >
using Triangle3 = std::array<Vector3<T>, 3>
 
using Triangle3i = Triangle3<int>
 
using Triangle3f = Triangle3<float>
 
using Triangle3d = Triangle3<double>
 
using SegmPointf = SegmPoint<float>
 
using SegmPointd = SegmPoint<double>
 
using MeshEdgePoint = EdgePoint
 
using SurfacePath = std::vector<MeshEdgePoint>
 
using SurfacePaths = std::vector<SurfacePath>
 
using IsoLine = SurfacePath
 
using IsoLines = SurfacePaths
 
using PlaneSection = SurfacePath
 
using PlaneSections = SurfacePaths
 
using TriPointf = TriPoint<float>
 
using TriPointd = TriPoint<double>
 
using UVCoord = Vector2f
 
using FaceMap = Vector<FaceId, FaceId>
 
using VertMap = Vector<VertId, VertId>
 
using EdgeMap = Vector<EdgeId, EdgeId>
 
using UndirectedEdgeMap = Vector<UndirectedEdgeId, UndirectedEdgeId>
 
using WholeEdgeMap = Vector<EdgeId, UndirectedEdgeId>
 mapping of whole edges: map[e]->f, map[e.sym()]->f.sym(), where only map[e] for even edges is stored
 
using UndirectedEdge2RegionMap = Vector<RegionId, UndirectedEdgeId>
 
using Face2RegionMap = Vector<RegionId, FaceId>
 
using Vert2RegionMap = Vector<RegionId, VertId>
 
using VertCoords = Vector<Vector3f, VertId>
 
using VertNormals = Vector<Vector3f, VertId>
 
using VertUVCoords = Vector<UVCoord, VertId>
 
using FaceNormals = Vector<Vector3f, FaceId>
 
using VertColors = Vector<Color, VertId>
 
using FaceColors = Vector<Color, FaceId>
 
using EdgeColors = Vector<Color, EdgeId>
 
using UndirectedEdgeColors = Vector<Color, UndirectedEdgeId>
 
using VertScalars = Vector<float, VertId>
 
using FaceScalars = Vector<float, FaceId>
 
using EdgeScalars = Vector<float, EdgeId>
 
using UndirectedEdgeScalars = Vector<float, UndirectedEdgeId>
 
using VertPredicate = std::function<bool( VertId )>
 
using FacePredicate = std::function<bool( FaceId )>
 
using EdgePredicate = std::function<bool( EdgeId )>
 
using UndirectedEdgePredicate = std::function<bool( UndirectedEdgeId )>
 
using VertMetric = std::function<float( VertId )>
 
using FaceMetric = std::function<float( FaceId )>
 
using EdgeMetric = std::function<float( EdgeId )>
 
using UndirectedEdgeMetric = std::function<float( UndirectedEdgeId )>
 
using FaceBMap = BMap<FaceId, FaceId>
 
using VertBMap = BMap<VertId, VertId>
 
using EdgeBMap = BMap<EdgeId, EdgeId>
 
using UndirectedEdgeBMap = BMap<UndirectedEdgeId, UndirectedEdgeId>
 
using WholeEdgeBMap = BMap<EdgeId, UndirectedEdgeId>
 
template<typename T , typename Hash = phmap::priv::hash_default_hash<T>, typename Eq = phmap::priv::hash_default_eq<T>>
using HashSet = phmap::flat_hash_set<T, Hash, Eq>
 
template<typename T , typename Hash = phmap::priv::hash_default_hash<T>, typename Eq = phmap::priv::hash_default_eq<T>>
using ParallelHashSet = phmap::parallel_flat_hash_set<T, Hash, Eq>
 
using FaceHashSet = HashSet<FaceId>
 
using VertHashSet = HashSet<VertId>
 
using EdgeHashSet = HashSet<EdgeId>
 
template<typename K , typename V , typename Hash = phmap::priv::hash_default_hash<K>, typename Eq = phmap::priv::hash_default_eq<K>>
using HashMap = phmap::flat_hash_map<K, V, Hash, Eq>
 
template<typename K , typename V , typename Hash = phmap::priv::hash_default_hash<K>, typename Eq = phmap::priv::hash_default_eq<K>>
using ParallelHashMap = phmap::parallel_flat_hash_map<K, V, Hash, Eq>
 
using FaceHashMap = HashMap<FaceId, FaceId>
 
using VertHashMap = HashMap<VertId, VertId>
 
using EdgeHashMap = HashMap<EdgeId, EdgeId>
 
using UndirectedEdgeHashMap = HashMap<UndirectedEdgeId, UndirectedEdgeId>
 
using WholeEdgeHashMap = HashMap<UndirectedEdgeId, EdgeId>
 mapping of whole edges: map[e]->f, map[e.sym()]->f.sym(), where only map[e] for even edges is stored
 
using Polyline2 = Polyline<Vector2f>
 
using Polyline3 = Polyline<Vector3f>
 
using AABBTreePolyline2 = AABBTreePolyline<Vector2f>
 
using AABBTreePolyline3 = AABBTreePolyline<Vector3f>
 
using PolylineProjectionResult2 = PolylineProjectionResult<Vector2f>
 
using PolylineProjectionResult3 = PolylineProjectionResult<Vector3f>
 
using Polyline2ProjectionWithOffsetResult = PolylineProjectionWithOffsetResult<Vector2f>
 
using PolylineProjectionWithOffsetResult3 = PolylineProjectionWithOffsetResult<Vector3f>
 
using GcodeSource = std::vector<std::string>
 
using SimpleVolume = VoxelsVolume<std::vector<float>>
 
using SimpleVolumeU16 = VoxelsVolume<std::vector<uint16_t>>
 
template<typename T >
using VoxelValueGetter = std::function<T ( const Vector3i& )>
 
using FunctionVolume = VoxelsVolume<VoxelValueGetter<float>>
 
using FunctionVolumeU8 = VoxelsVolume<VoxelValueGetter<uint8_t>>
 
using FloatGrid = std::shared_ptr<OpenVdbFloatGrid>
 
using VdbVolume = VoxelsVolume<FloatGrid>
 
using VertColorMapAggregator = ColorMapAggregator<VertTag>
 
using UndirEdgeColorMapAggregator = ColorMapAggregator<UndirectedEdgeTag>
 
using FaceColorMapAggregator = ColorMapAggregator<FaceTag>
 
using GraphVertId = Id<GraphVertTag>
 
using GraphEdgeId = Id<GraphEdgeTag>
 
using GraphVertBitSet = TaggedBitSet<GraphVertTag>
 
using GraphEdgeBitSet = TaggedBitSet<GraphEdgeTag>
 
typedef std::function< bool(float)> ProgressCallback
 
using Line3fMesh = Line3Mesh<float>
 
using Line3dMesh = Line3Mesh<double>
 
using MeshIntersectionCallback = std::function<bool(const MeshIntersectionResult &)>
 
using FillTriangleMetric = std::function<double( VertId, VertId, VertId )>
 
using FillEdgeMetric = std::function<double( VertId, VertId, VertId, VertId )>
 
using FillCombineMetric = std::function<double( double, double )>
 
using TriangleCornerNormals = std::array<Vector3f, 3>
 normals in three corner of a triangle
 
using MeshOrPointsId = Id<MeshOrPointsTag>
 
using IndexedPairs = Vector<PointPairs, MeshOrPointsId>
 
using OffsetContoursVertMap = std::vector<OffsetContoursOrigins>
 
using OffsetContoursVertMaps = std::vector<OffsetContoursVertMap>
 
using ContoursVariableOffset = std::function<float( int, int )>
 
using PickedPoint = std::variant<MeshTriPoint, EdgePoint, VertId, int>
 
using FoundPointCallback = std::function<void( VertId, const Vector3f& )>
 
using DecimatePolylineSettings2 = DecimatePolylineSettings<Vector2f>
 
using DecimatePolylineSettings3 = DecimatePolylineSettings<Vector3f>
 
template<typename V >
using FoundEdgeCallback = std::function<void( UndirectedEdgeId, const V& closestPt, float distSq )>
 
using FoundEdgeCallback2 = FoundEdgeCallback<Vector2f>
 
using FoundEdgeCallback3 = FoundEdgeCallback<Vector3f>
 
using RegularGridLatticeValidator = std::function<bool( size_t x, size_t y )>
 
using RegularGridLatticePositioner = std::function<Vector3f( size_t x, size_t y )>
 
using RegularGridMeshFaceValidator
 
using OrgRingIterator = RingIterator<NextEdgeSameOrigin>
 
using LeftRingIterator = RingIterator<NextEdgeSameLeft>
 
using SeparationPointSet = std::array<VertId, size_t( NeighborDir::Count )>
 
using SeparationPointMap = HashMap<size_t, SeparationPointSet>
 
using FolderCallback = std::function<void( const std::filesystem::path& tempFolderName )>
 this callback will be called before compression on serialization and after decompression on deserialization
 
using AllVisualizeProperties = std::vector<ViewportMask>
 
using VoxelsMetric = std::function<float( size_t from, size_t to )>
 
template<typename Volume >
using VolumePartBuilder = std::function<Expected<Volume, std::string> ( int begin, int end, std::optional<Vector3i>& offset )>
 
using Time = std::chrono::time_point<std::chrono::system_clock>
 
using DisabledWarnings = std::vector<ShaderWarning>
 
using TransformModesValidator = std::function<ControlBit( const Vector3f& center, const AffineXf3f& xf, ViewportId )>
 
using RenderDefaultUiObject = RenderObjectCombinator<RenderNameObject>
 
using RenderDimensionObject = RenderObjectCombinator<RenderDefaultUiObject, RenderResetDirtyComponent>
 
using MenuItemsList = std::vector<std::string>
 
using SplitCaptionInfo = std::vector<std::pair<std::string_view, float>>
 
using ItemMap = HashMap<std::string, MenuItemInfo>
 
using TabsGroupsMap = HashMap<std::string, std::vector<std::string>>
 
using GroupsItemsMap = TabsGroupsMap
 
using MenuItemsListMigration = std::function<void ( MenuItemsList& )>
 
using MenuItemsListMigrations = std::map<int, MenuItemsListMigration>
 
using ViewportRectangle = Box2f
 Viewport size.
 
using StatePlugin = StateListenerPlugin<>
 
using ViewerEventCallback = std::function<void()>
 
using VertPathInfoMap = HashMap<VertId, VertPathInfo>
 
using EdgePathsBuilder = EdgePathsBuilderT<TrivialMetricToPenalty>
 

Enumerations

enum class  Axis { X , Y , Z , Count }
 
enum class  BooleanOperation {
  BooleanOperation::InsideA , BooleanOperation::InsideB , BooleanOperation::OutsideA , BooleanOperation::OutsideB ,
  BooleanOperation::Union , BooleanOperation::Intersection , BooleanOperation::DifferenceBA , BooleanOperation::DifferenceAB ,
  BooleanOperation::Count
}
 
enum class  ConeFitterType { ApproximationPCM , HemisphereSearchFit , SpecificAxisFit }
 
enum class  FeaturePropertyKind {
  position , linearDimension , direction , angle ,
  other
}
 
enum class  ICPMethod { Combined = 0 , PointToPoint = 1 , PointToPlane = 2 }
 The method how to update transformation from point pairs. More...
 
enum class  ICPMode {
  RigidScale , AnyRigidXf , OrthogonalAxis , FixedAxis ,
  TranslationOnly
}
 The group of transformations, each with its own degrees of freedom. More...
 
enum class  ICPExitType {
  NotStarted , NotFoundSolution , MaxIterations , MaxBadIterations ,
  StopMsdReached
}
 
enum class  Side { Negative , Positive }
 
enum class  DepthFunction {
  Never = 0 , Less = 1 , Equal = 2 , Greater = 4 ,
  LessOrEqual = Less | Equal , GreaterOrEqual = Greater | Equal , NotEqual = Less | Greater , Always = Less | Equal | Greater ,
  Default = 8
}
 
enum  DecimateStrategy { MinimizeError , ShortestEdgeFirst }
 Defines the order of edge collapses inside Decimate algorithm. More...
 
enum class  UseAABBTree : char { No , Yes , YesIfAlreadyConstructed }
 
enum class  ProcessOneResult : bool { ProcessOneResult::StopProcessing = false , ProcessOneResult::ContinueProcessing = true }
 
enum class  FilterType : char { Linear , Discrete }
 
enum class  WrapType : char { Repeat , Mirror , Clamp }
 
enum class  Reorder : char { None , Lexicographically , AABBTree }
 determines how points to be ordered More...
 
enum class  OutEdge2 : signed char {
  OutEdge2::Invalid = -1 , OutEdge2::PlusY , OutEdge2::MinusY , OutEdge2::PlusX ,
  OutEdge2::MinusX , OutEdge2::Count
}
 
enum class  RelaxApproxType { Planar , Quadric }
 
enum class  RenderModelPassMask {
  Opaque = 1 << 0 , Transparent = 1 << 1 , VolumeRendering = 1 << 2 , NoDepthTest = 1 << 3 ,
  All
}
 Various passes of the 3D rendering. More...
 
enum class  NeighborDir { X , Y , Z , Count }
 
enum class  SignDetectionMode {
  Unsigned , OpenVDB , ProjectionNormal , WindingRule ,
  HoleWindingRule
}
 how to determine the sign of distances from a mesh More...
 
enum class  PathError { PathError::StartEndNotConnected , PathError::InternalError }
 
enum class  GeodesicPathApprox : char { GeodesicPathApprox::DijkstraBiDir , GeodesicPathApprox::DijkstraAStar , GeodesicPathApprox::FastMarching }
 the algorithm to compute approximately geodesic path More...
 
enum class  ExtremeEdgeType { ExtremeEdgeType::Ridge , ExtremeEdgeType::Gorge }
 
enum  AlignType { Left , Center , Right }
 
enum class  BypassDirection { Clockwise , CounterClockwise }
 
enum class  MoveType {
  None = -1 , FastLinear = 0 , Linear = 1 , ArcCW = 2 ,
  ArcCCW = 3
}
 
enum class  ArcPlane { None = -1 , XY = 17 , XZ = 18 , YZ = 19 }
 
enum class  NestedComponenetsMode { Remove , Merge , Union }
 
enum class  ColoringType {
  ColoringType::SolidColor , ColoringType::PrimitivesColorMap , ColoringType::FacesColorMap = PrimitivesColorMap , ColoringType::LinesColorMap = PrimitivesColorMap ,
  ColoringType::VertsColorMap
}
 
enum  DirtyFlags {
  DIRTY_NONE = 0x0000 , DIRTY_POSITION = 0x0001 , DIRTY_UV = 0x0002 , DIRTY_VERTS_RENDER_NORMAL = 0x0004 ,
  DIRTY_FACES_RENDER_NORMAL = 0x0008 , DIRTY_CORNERS_RENDER_NORMAL = 0x0010 , DIRTY_RENDER_NORMALS = DIRTY_VERTS_RENDER_NORMAL | DIRTY_FACES_RENDER_NORMAL | DIRTY_CORNERS_RENDER_NORMAL , DIRTY_SELECTION = 0x0020 ,
  DIRTY_TEXTURE = 0x0040 , DIRTY_PRIMITIVES = 0x0080 , DIRTY_FACE = DIRTY_PRIMITIVES , DIRTY_VERTS_COLORMAP = 0x0100 ,
  DIRTY_PRIMITIVE_COLORMAP = 0x0200 , DIRTY_FACES_COLORMAP = DIRTY_PRIMITIVE_COLORMAP , DIRTY_MESH = 0x03FF , DIRTY_BOUNDING_BOX = 0x0400 ,
  DIRTY_BORDER_LINES = 0x0800 , DIRTY_EDGES_SELECTION = 0x1000 , DIRTY_CACHES = DIRTY_BOUNDING_BOX , DIRTY_ALL = 0x1FFF
}
 
enum class  OutEdge : signed char {
  OutEdge::Invalid = -1 , OutEdge::PlusZ = 0 , OutEdge::MinusZ , OutEdge::PlusY ,
  OutEdge::MinusY , OutEdge::PlusX , OutEdge::MinusX , OutEdge::Count
}
 
enum class  QuarterBit : char {
  QuarterBit::LeftLeft = 0b1 , QuarterBit::LeftRight = 0b10 , QuarterBit::RightLeft = 0b100 , QuarterBit::RightRight = 0b1000 ,
  QuarterBit::All = 0b1111
}
 
enum  SlicePlane { YZ , ZX , XY , None }
 Plane of slice in which to find path. More...
 
enum class  FitMode { Visible , SelectedPrimitives , SelectedObjects , CustomObjectsList }
 
enum class  MouseButton { Left = 0 , Right = 1 , Middle = 2 , Count }
 
enum class  MouseMode {
  None , Rotation , Translation , Roll ,
  Count
}
 
enum class  NotificationType { Error , Warning , Info , Count }
 
enum class  ControlBit {
  None = 0 , RotX = 0x1 , RotY = 0x2 , RotZ = 0x4 ,
  RotMask = RotX | RotY | RotZ , MoveX = 0x8 , MoveY = 0x10 , MoveZ = 0x20 ,
  MoveMask = MoveX | MoveY | MoveZ , FullMask = RotMask | MoveMask
}
 
enum class  RibbonItemType { Button , ButtonWithDrop }
 
enum class  PathPreference { Geodesic , Convex , Concave }
 
enum  SpaceMouseButtons : int {
  SMB_NO = -1 , SMB_MENU , SMB_ESC , SMB_ENTER ,
  SMB_TAB , SMB_SHIFT , SMB_CTRL , SMB_ALT ,
  SMB_SPACE , SMB_DELETE , SMB_CUSTOM_1 , SMB_CUSTOM_2 ,
  SMB_CUSTOM_3 , SMB_CUSTOM_4 , SMB_CUSTOM_5 , SMB_CUSTOM_6 ,
  SMB_CUSTOM_7 , SMB_CUSTOM_8 , SMB_CUSTOM_9 , SMB_CUSTOM_10 ,
  SMB_CUSTOM_11 , SMB_CUSTOM_12 , SMB_FIT , SMB_TOP ,
  SMB_RIGHT , SMB_FRONT , SMB_ROLL_CW , SMB_LOCK_ROT ,
  SMB_BTN_V1 , SMB_BTN_V2 , SMB_BTN_V3 , SMB_ISO1 ,
  SMB_BUTTON_COUNT
}
 enumeration all spacemouse buttons More...
 
enum class  StatePluginTabs {
  Basic , Mesh , DistanceMap , PointCloud ,
  Selection , Voxels , Analysis , Test ,
  Other , Count
}
 
enum class  NoUnit { _count }
 
enum class  LengthUnit { mm , inches , _count }
 
enum class  AngleUnit { radians , degrees , _count }
 
enum class  PixelSizeUnit { pixels , _count }
 
enum class  RatioUnit { factor , percents , _count }
 
enum class  TimeUnit { seconds , milliseconds , _count }
 
enum class  MovementSpeedUnit { mmPerSecond , inchesPerSecond , _count }
 
enum class  AreaUnit { mm2 , inches2 , _count }
 
enum class  VolumeUnit { mm3 , inches3 , _count }
 
enum class  NumberStyle { normal , distributePrecision , exponential , maybeExponential }
 
enum class  DegreesMode { degrees , degreesMinutes , degreesMinutesSeconds }
 

Functions

template<typename T >
Vector3< T > to3dim (const Vector2< T > &v)
 
template<typename T >
Vector2< T > to2dim (const Vector3< T > &v)
 
template<typename T >
Matrix3< T > to3dim (const Matrix2< T > &m)
 
template<typename T >
Matrix2< T > to2dim (const Matrix3< T > &m)
 
template<typename T >
AffineXf3< T > to3dim (const AffineXf2< T > &xf)
 
template<typename T >
AffineXf2< T > to2dim (const AffineXf3< T > &xf)
 
int getNumNodes (int numLeaves)
 returns the number of nodes in the binary tree with given number of leaves
 
template<typename T >
AABBTreeNodeVec< T > makeAABBTreeNodeVec (Buffer< BoxedLeaf< T > > boxedLeaves)
 
MRMESH_API VoidOrErrStr addNoise (VertCoords &points, const VertBitSet &validVerts, NoiseSettings settings)
 
template<typename T >
AffineXf3< T > lookAt (const Vector3< T > &center, const Vector3< T > &eye, const Vector3< T > &up)
 computes rigid transformation xf
 
MRMESH_API Expected< Mesh, std::string > alignTextToMesh (const Mesh &mesh, const TextMeshAlignParams &params)
 
MRMESH_API void findAlphaShapeNeiTriangles (const PointCloud &cloud, VertId v, float radius, Triangulation &appendTris, std::vector< VertId > &neis, bool onlyLargerVids)
 if true then two other points must have larger ids (to avoid finding same triangles several times)
 
MRMESH_API Triangulation findAlphaShapeAllTriangles (const PointCloud &cloud, float radius)
 find all triangles of alpha-shape with negative alpha = -1/radius
 
MRMESH_API Mesh makeArrow (const Vector3f &base, const Vector3f &vert, const float &thickness=0.05f, const float &coneRadius=0.1f, const float coneSize=0.2f, const int qual=32)
 
MRMESH_API Mesh makeBasisAxes (const float &size=1.0f, const float &thickness=0.05f, const float &coneRadius=0.1f, const float coneSize=0.2f, const int qual=32)
 
MRMESH_API std::string encode64 (const std::uint8_t *data, size_t size)
 encodes binary data into textual Base64 format
 
MRMESH_API std::vector< std::uint8_t > decode64 (const std::string &val)
 decodes Base64 format into binary data
 
MRMESH_API double computeBasinVolume (const Mesh &mesh, const FaceBitSet &faces, float level)
 
MRMESH_API void accumulatePoints (PointAccumulator &accum, const std::vector< Vector3f > &points, const AffineXf3f *xf=nullptr)
 Adds in existing PointAccumulator all given points.
 
MRMESH_API void accumulateWeighedPoints (PointAccumulator &accum, const std::vector< Vector3f > &points, const std::vector< float > &weights, const AffineXf3f *xf=nullptr)
 Adds in existing PointAccumulator all given weighed points.
 
MRMESH_API void accumulateFaceCenters (PointAccumulator &accum, const MeshPart &mp, const AffineXf3f *xf=nullptr)
 Adds in existing PointAccumulator all mesh face centers with the weight equal to face area.
 
MRMESH_API void accumulateLineCenters (PointAccumulator &accum, const Polyline3 &pl, const AffineXf3f *xf=nullptr)
 Adds in existing PointAccumulator all line centers with the weight equal to the length line.
 
MRMESH_API void accumulatePoints (PointAccumulator &accum, const PointCloud &pc, const AffineXf3f *xf=nullptr)
 Adds in existing PointAccumulator all points from the cloud with weight 1.
 
MRMESH_API bool operator== (const BitSet &a, const BitSet &b)
 compare that two bit sets have the same set bits (they can be equal even if sizes are distinct but last bits are off)
 
template<typename T >
bool operator== (const TaggedBitSet< T > &a, const TaggedBitSet< T > &b)
 
template<typename T , typename U >
void operator== (const TaggedBitSet< T > &a, const TaggedBitSet< U > &b)=delete
 prohibit comparison of unrelated sets
 
template<typename T >
std::function< bool(Id< T >)> makePredicate (const TaggedBitSet< T > *bitset)
 
template<typename T >
std::function< bool(Id< T >)> makePredicate (const TaggedBitSet< T > &bitset)
 
template<typename T >
bool contains (const TaggedBitSet< T > *bitset, Id< T > id)
 
template<typename T >
bool contains (const TaggedBitSet< T > &bitset, Id< T > id)
 
template<typename T >
bool operator== (const SetBitIteratorT< T > &a, const SetBitIteratorT< T > &b)
 
template<typename T >
bool operator!= (const SetBitIteratorT< T > &a, const SetBitIteratorT< T > &b)
 
auto begin (const BitSet &a)
 
auto end (const BitSet &)
 
template<typename T >
auto begin (const TaggedBitSet< T > &a)
 
template<typename T >
auto end (const TaggedBitSet< T > &)
 
template<typename T >
Vector< int, Id< T > > makeVectorWithSeqNums (const TaggedBitSet< T > &bs)
 creates a Vector where for each set bit of input bitset its sequential number starting from 0 is returned; and -1 for reset bits
 
template<typename T >
HashMap< Id< T >, int > makeHashMapWithSeqNums (const TaggedBitSet< T > &bs)
 creates a HashMap where for each set bit of input bitset its sequential number starting from 0 is returned
 
BitSet operator& (const BitSet &a, const BitSet &b)
 
BitSet operator| (const BitSet &a, const BitSet &b)
 
BitSet operator^ (const BitSet &a, const BitSet &b)
 
BitSet operator- (const BitSet &a, const BitSet &b)
 
template<typename T >
TaggedBitSet< T > operator& (const TaggedBitSet< T > &a, const TaggedBitSet< T > &b)
 
template<typename T >
TaggedBitSet< T > operator| (const TaggedBitSet< T > &a, const TaggedBitSet< T > &b)
 
template<typename T >
TaggedBitSet< T > operator^ (const TaggedBitSet< T > &a, const TaggedBitSet< T > &b)
 
template<typename T >
TaggedBitSet< T > operator- (const TaggedBitSet< T > &a, const TaggedBitSet< T > &b)
 
template<typename IndexType , typename F >
void BitSetParallelForAll (IndexType begin, IndexType end, F f)
 
template<typename BS , typename F >
void BitSetParallelForAll (const BS &bs, F f)
 
template<typename BS , typename F >
void BitSetParallelForAllRanged (const BS &bs, F f)
 
template<typename BS , typename F >
bool BitSetParallelForAllRanged (const BS &bs, F f, ProgressCallback progressCb, size_t reportProgressEveryBit=1024)
 
template<typename BS , typename F >
bool BitSetParallelForAll (const BS &bs, F f, ProgressCallback progressCb, size_t reportProgressEveryBit=1024)
 
template<typename BS , typename F , typename ... Cb>
auto BitSetParallelFor (const BS &bs, F f, Cb &&... cb)
 
template<typename BS , typename F , typename ... Cb>
auto BitSetParallelForReset (const BS &bs, F f, Cb &&... cb)
 
MRMESH_API Expected< Mesh, std::string > doBooleanOperation (Mesh &&meshACut, Mesh &&meshBCut, const std::vector< EdgePath > &cutEdgesA, const std::vector< EdgePath > &cutEdgesB, BooleanOperation operation, const AffineXf3f *rigidB2A=nullptr, BooleanResultMapper *mapper=nullptr, bool mergeAllNonIntersectingComponents=false, const BooleanInternalParameters &intParams={})
 
template<typename T >
std::array< Vector3< T >, 8 > getCorners (const Box< Vector3< T > > &box)
 returns all corners of given box
 
template<typename T >
std::array< Vector2< T >, 4 > getCorners (const Box< Vector2< T > > &box)
 
template<typename V >
Box< V > transformed (const Box< V > &box, const AffineXf< V > &xf)
 find the tightest box enclosing this one after transformation
 
template<typename V >
Box< V > transformed (const Box< V > &box, const AffineXf< V > *xf)
 this version returns input box as is if pointer to transformation is null
 
template<typename V >
auto width (const Box< V > &box)
 returns size along x axis
 
template<typename V >
auto height (const Box< V > &box)
 returns size along y axis
 
template<typename V >
auto depth (const Box< V > &box)
 returns size along z axis
 
template<typename T , typename I >
getAt (const Buffer< T, I > &bmap, I key)
 given some buffer map and a key, returns the value associated with the key, or default value if key is invalid
 
template<typename T , typename I >
auto begin (const Buffer< T, I > &a)
 
template<typename T , typename I >
auto begin (Buffer< T, I > &a)
 
template<typename T , typename I >
auto end (const Buffer< T, I > &a)
 
template<typename T , typename I >
auto end (Buffer< T, I > &a)
 
MRMESH_API std::optional< VertMapfindSmallestCloseVertices (const Mesh &mesh, float closeDist, const ProgressCallback &cb={})
 
MRMESH_API std::optional< VertMapfindSmallestCloseVertices (const PointCloud &cloud, float closeDist, const ProgressCallback &cb={})
 
MRMESH_API std::optional< VertMapfindSmallestCloseVertices (const VertCoords &points, float closeDist, const VertBitSet *valid=nullptr, const ProgressCallback &cb={})
 
MRMESH_API std::optional< VertMapfindSmallestCloseVerticesUsingTree (const VertCoords &points, float closeDist, const AABBTreePoints &tree, const VertBitSet *valid, const ProgressCallback &cb={})
 
MRMESH_API std::optional< VertBitSetfindCloseVertices (const Mesh &mesh, float closeDist, const ProgressCallback &cb={})
 finds all close vertices, where for each vertex there is another one located within given distance
 
MRMESH_API std::optional< VertBitSetfindCloseVertices (const PointCloud &cloud, float closeDist, const ProgressCallback &cb={})
 finds all close vertices, where for each vertex there is another one located within given distance
 
MRMESH_API std::optional< VertBitSetfindCloseVertices (const VertCoords &points, float closeDist, const VertBitSet *valid=nullptr, const ProgressCallback &cb={})
 finds all close vertices, where for each vertex there is another one located within given distance
 
MRMESH_API VertBitSet findCloseVertices (const VertMap &smallestMap)
 finds all close vertices, where for each vertex there is another one located within given distance; smallestMap is the result of findSmallestCloseVertices function call
 
MRMESH_API EdgeHashMap findTwinEdgeHashMap (const Mesh &mesh, float closeDist)
 finds a mapping from an edge to a twin edge in given mesh (each twin edge will be present either in key or in the value of returned map)
 
MRMESH_API EdgeBitSet findTwinEdges (const Mesh &mesh, float closeDist)
 finds all twin edges in the mesh
 
MRMESH_API EdgeBitSet findTwinEdges (const EdgeHashMap &emap)
 finds all twin edges from given map
 
MRMESH_API UndirectedEdgeBitSet findTwinUndirectedEdges (const Mesh &mesh, float closeDist)
 finds all twin edges in the mesh
 
MRMESH_API UndirectedEdgeBitSet findTwinUndirectedEdges (const EdgeHashMap &emap)
 finds all twin edges from given map
 
bool operator== (const Color &a, const Color &b)
 
bool operator!= (const Color &a, const Color &b)
 
Color operator+ (const Color &a, const Color &b)
 
Color operator- (const Color &a, const Color &b)
 
Color operator* (float a, const Color &b)
 
Color operator* (const Color &b, float a)
 
Color operator/ (const Color &b, float a)
 
template<typename V >
Box< V > computeBoundingBox (const Vector< V, VertId > &points, const VertBitSet &region, const AffineXf< V > *toWorld=nullptr)
 
template<typename V >
Box< V > computeBoundingBox (const Vector< V, VertId > &points, const VertBitSet *region=nullptr, const AffineXf< V > *toWorld=nullptr)
 
template<typename T , typename R = T>
calcOrientedArea (const Contour2< T > &contour)
 
template<typename T , typename R = T>
Vector3< R > calcOrientedArea (const Contour3< T > &contour)
 
template<typename To , typename From >
To copyContour (const From &from)
 copy double-contour to float-contour, or vice versa
 
template<typename To , typename From >
To copyContours (const From &from)
 copy double-contours to float-contours, or vice versa
 
MRMESH_API void subdivideLoneContours (Mesh &mesh, const OneMeshContours &contours, FaceMap *new2oldMap=nullptr)
 
MRMESH_API OneMeshContours getOneMeshIntersectionContours (const Mesh &meshA, const Mesh &meshB, const ContinuousContours &contours, bool getMeshAIntersections, const CoordinateConverters &converters, const AffineXf3f *rigidB2A=nullptr)
 
MRMESH_API Expected< OneMeshContour, PathErrorconvertMeshTriPointsToMeshContour (const Mesh &mesh, const std::vector< MeshTriPoint > &meshTriPoints, SearchPathSettings searchSettings={}, std::vector< int > *pivotIndices=nullptr)
 Makes continuous contour by mesh tri points, if first and last meshTriPoint is the same, makes closed contour.
 
MRMESH_API Expected< OneMeshContour, PathErrorconvertMeshTriPointsToClosedContour (const Mesh &mesh, const std::vector< MeshTriPoint > &meshTriPoints, SearchPathSettings searchSettings={}, std::vector< int > *pivotIndices=nullptr)
 Makes closed continuous contour by mesh tri points, note that first and last meshTriPoint should not be same.
 
MRMESH_API OneMeshContour convertSurfacePathWithEndsToMeshContour (const Mesh &mesh, const MeshTriPoint &start, const SurfacePath &surfacePath, const MeshTriPoint &end)
 Converts SurfacePath to OneMeshContours.
 
MRMESH_API OneMeshContours convertSurfacePathsToMeshContours (const Mesh &mesh, const std::vector< SurfacePath > &surfacePaths)
 Converts SurfacePaths to OneMeshContours.
 
MRMESH_API CutMeshResult cutMesh (Mesh &mesh, const OneMeshContours &contours, const CutMeshParameters &params={})
 Cuts mesh by given contours.
 
MRMESH_API std::vector< EdgePathcutMeshWithPlane (Mesh &mesh, const Plane3f &plane, FaceMap *mapNew2Old=nullptr)
 Simple cut mesh by plane.
 
MRMESH_API std::vector< FaceBitSetseparateClosedContour (const Mesh &mesh, const std::vector< Vector3f > &contour, const PathMeshEdgePointCallback &cb={})
 
MRMESH_API void stitchContours (MeshTopology &topology, const EdgePath &c0, const EdgePath &c1)
 
MRMESH_API EdgeLoop cutAlongEdgeLoop (MeshTopology &topology, const EdgeLoop &c0)
 
MRMESH_API EdgeLoop cutAlongEdgeLoop (Mesh &mesh, const EdgeLoop &c0)
 
MRMESH_API Mesh makeConvexHull (const VertCoords &points, const VertBitSet &validPoints)
 
MRMESH_API Mesh makeConvexHull (const Mesh &in)
 
MRMESH_API Mesh makeConvexHull (const PointCloud &in)
 
MRMESH_API Mesh makeCube (const Vector3f &size=Vector3f::diagonal(1.0f), const Vector3f &base=Vector3f::diagonal(-0.5f))
 
MRMESH_API Mesh makeParallelepiped (const Vector3f side[3], const Vector3f &base)
 
MRMESH_API Mesh makeCylinder (float radius=0.1f, float length=1.0f, int resolution=16)
 
MRMESH_API Mesh makeOpenCylinder (float radius=1, float z1=-1, float z2=1, int numCircleSegments=16)
 
MRMESH_API Mesh makeOpenCone (float radius=1, float zApex=0, float zBase=1, int numCircleSegments=16)
 
MRMESH_API Mesh makeCylinderAdvanced (float radius0=0.1f, float radius1=0.1f, float start_angle=0.0f, float arc_size=2.0f *PI_F, float length=1.0f, int resolution=16)
 
MRMESH_API Mesh makeCone (float radius0=0.1f, float length=1.0f, int resolution=32)
 
MRMESH_API std::filesystem::path findPathWithExtension (const std::filesystem::path &pathWithoutExtension)
 given file name without final extension, finds in the same folder an existing file with same stem and any extension
 
DirectoryIterator begin (const Directory &sd)
 
std::filesystem::directory_iterator end (const Directory &)
 
bool operator!= (const DirectoryIterator &a, const std::filesystem::directory_iterator &b)
 
DirectoryRecursiveIterator begin (const DirectoryRecursive &sd)
 
std::filesystem::recursive_directory_iterator end (const DirectoryRecursive &)
 
bool operator!= (const DirectoryRecursiveIterator &a, const std::filesystem::recursive_directory_iterator &b)
 
MRMESH_API DistanceMap combineXYderivativeMaps (std::pair< DistanceMap, DistanceMap > XYderivativeMaps)
 fill another distance map pair with gradients across X and Y axes of the argument map
 
MRMESH_API DistanceMap computeDistanceMap (const MeshPart &mp, const MeshToDistanceMapParams &params, ProgressCallback cb={}, std::vector< MeshTriPoint > *outSamples=nullptr)
 
MRMESH_API DistanceMap computeDistanceMapD (const MeshPart &mp, const MeshToDistanceMapParams &params, ProgressCallback cb={}, std::vector< MeshTriPoint > *outSamples=nullptr)
 
MRMESH_API DistanceMap distanceMapFromContours (const Polyline2 &contours, const ContourToDistanceMapParams &params, const ContoursDistanceMapOptions &options={})
 Computes distance of 2d contours according ContourToDistanceMapParams.
 
MRMESH_API void distanceMapFromContours (DistanceMap &distMap, const Polyline2 &polyline, const ContourToDistanceMapParams &params, const ContoursDistanceMapOptions &options={})
 Computes distance of 2d contours according ContourToDistanceMapParams.
 
MRMESH_API std::vector< Vector3fedgePointsFromContours (const Polyline2 &polyline, float pixelSize, float threshold)
 
MRMESH_API Polyline2 distanceMapTo2DIsoPolyline (const DistanceMap &distMap, float isoValue)
 
MRMESH_API Polyline2 distanceMapTo2DIsoPolyline (const DistanceMap &distMap, const ContourToDistanceMapParams &params, float isoValue)
 iso-lines are created in real space ( plane OXY with parameters according ContourToDistanceMapParams )
 
MRMESH_API std::pair< Polyline2, AffineXf3fdistanceMapTo2DIsoPolyline (const DistanceMap &distMap, const AffineXf3f &xf, float isoValue, bool useDepth=false)
 
MRMESH_API Polyline2 distanceMapTo2DIsoPolyline (const DistanceMap &distMap, float pixelSize, float isoValue)
 
MRMESH_API Polyline2 polylineOffset (const Polyline2 &polyline, float pixelSize, float offset)
 constructs an offset contour for given polyline
 
MRMESH_API Polyline2 contourUnion (const Polyline2 &contoursA, const Polyline2 &contoursB, const ContourToDistanceMapParams &params, float offsetInside=0)
 computes the union of the shapes bounded by input 2d contours
 
MRMESH_API Polyline2 contourIntersection (const Polyline2 &contoursA, const Polyline2 &contoursB, const ContourToDistanceMapParams &params, float offsetInside=0.f)
 computes the intersection of the shapes bounded by input 2d contours
 
MRMESH_API Polyline2 contourSubtract (const Polyline2 &contoursA, const Polyline2 &contoursB, const ContourToDistanceMapParams &params, float offsetInside=0.f)
 computes the difference between the shapes bounded by contoursA and the shapes bounded by contoursB
 
MRMESH_API Expected< MeshdistanceMapToMesh (const DistanceMap &distMap, const AffineXf3f &toWorld, ProgressCallback cb={})
 converts distance map into mesh and applies a transformation to all points
 
MRMESH_API VoidOrErrStr saveDistanceMapToImage (const DistanceMap &distMap, const std::filesystem::path &filename, float threshold=1.f/255)
 
MRMESH_API Expected< DistanceMapconvertImageToDistanceMap (const Image &image, float threshold=1.f/255)
 
MRMESH_API Expected< DistanceMaploadDistanceMapFromImage (const std::filesystem::path &filename, float threshold=1.f/255)
 
bool operator== (const UndirectedEdgeIterator &a, const UndirectedEdgeIterator &b)
 
bool operator!= (const UndirectedEdgeIterator &a, const UndirectedEdgeIterator &b)
 
IteratorRange< UndirectedEdgeIteratorundirectedEdges (const MeshTopology &topology)
 
MRMESH_API bool same (const MeshTopology &topology, const EdgePoint &lhs, const EdgePoint &rhs)
 returns true if two edge-points are equal considering different representations
 
MRMESH_API Expected< Mesh, std::string > embedStructureToTerrain (const Mesh &terrain, const Mesh &structure, const EmbeddedStructureParameters &params)
 
MRMESH_API VertScalars computeSpaceDistances (const Mesh &mesh, const PointOnFace &start, float range)
 
MRMESH_API VertBitSet findNeighborVerts (const Mesh &mesh, const PointOnFace &start, float range)
 
MRMESH_API void expand (const MeshTopology &topology, FaceBitSet &region, int hops=1)
 adds to the region all faces within given number of hops (stars) from the initial region boundary
 
MRMESH_API FaceBitSet expand (const MeshTopology &topology, FaceId f, int hops)
 returns the region of all faces within given number of hops (stars) from the initial face
 
MRMESH_API void expand (const MeshTopology &topology, VertBitSet &region, int hops=1)
 
MRMESH_API VertBitSet expand (const MeshTopology &topology, VertId v, int hops)
 returns the region of all vertices within given number of hops (stars) from the initial vertex
 
MRMESH_API void shrink (const MeshTopology &topology, FaceBitSet &region, int hops=1)
 removes from the region all faces within given number of hops (stars) from the initial region boundary
 
MRMESH_API void shrink (const MeshTopology &topology, VertBitSet &region, int hops=1)
 removes from the region all vertices within given number of hops (stars) from the initial region boundary
 
MRMESH_API FaceBitSet expandFaces (const MeshTopology &topology, const FaceBitSet &region, const UndirectedEdgeBitSet *stopEdges=nullptr)
 
MRMESH_API FaceBitSet shrinkFaces (const MeshTopology &topology, const FaceBitSet &region, const UndirectedEdgeBitSet *stopEdges=nullptr)
 
MRMESH_API FaceBitSet getBoundaryFaces (const MeshTopology &topology, const FaceBitSet &region)
 returns faces from given region that have at least one neighbor face with shared edge not from the region
 
template<class E >
auto unexpected (E &&e)
 
std::string stringOperationCanceled ()
 Common operation canceled line for all.
 
auto unexpectedOperationCanceled ()
 Returns Expected error with stringOperationCanceled()
 
MRMESH_API IsoLines extractIsolines (const MeshTopology &topology, const VertMetric &vertValues, const FaceBitSet *region=nullptr)
 extracts all iso-lines from given scalar field and iso-value=0
 
MRMESH_API bool hasAnyIsoline (const MeshTopology &topology, const VertMetric &vertValues, const FaceBitSet *region=nullptr)
 quickly returns true if extractIsolines produce not-empty set for the same arguments
 
MRMESH_API IsoLines extractIsolines (const MeshTopology &topology, const VertScalars &vertValues, float isoValue, const FaceBitSet *region=nullptr)
 extracts all iso-lines from given scalar field and iso-value
 
MRMESH_API bool hasAnyIsoline (const MeshTopology &topology, const VertScalars &vertValues, float isoValue, const FaceBitSet *region=nullptr)
 quickly returns true if extractIsolines produce not-empty set for the same arguments
 
MRMESH_API PlaneSections extractPlaneSections (const MeshPart &mp, const Plane3f &plane)
 extracts all plane sections of given mesh
 
MRMESH_API bool hasAnyPlaneSection (const MeshPart &mp, const Plane3f &plane)
 quickly returns true if extractPlaneSections produce not-empty set for the same arguments
 
MRMESH_API PlaneSections extractXYPlaneSections (const MeshPart &mp, float zLevel)
 
MRMESH_API bool hasAnyXYPlaneSection (const MeshPart &mp, float zLevel)
 quickly returns true if extractXYPlaneSections produce not-empty set for the same arguments
 
MRMESH_API PlaneSection trackSection (const MeshPart &mp, const MeshTriPoint &start, MeshTriPoint &end, const Vector3f &direction, float distance)
 
MRMESH_API Contour2f planeSectionToContour2f (const Mesh &mesh, const PlaneSection &section, const AffineXf3f &meshToPlane)
 converts PlaneSections in 2D contours by computing coordinate of each point, applying given xf to it, and retaining only x and y
 
MRMESH_API Contours2f planeSectionsToContours2f (const Mesh &mesh, const PlaneSections &sections, const AffineXf3f &meshToPlane)
 
MRMESH_API std::optional< FaceScalarscalcFaceDistances (const MeshTopology &topology, const EdgeMetric &metric, const FaceBitSet &starts, const FaceDistancesSettings &settings={})
 
MRMESH_API void calcDipoles (Dipoles &dipoles, const AABBTree &tree, const Mesh &mesh)
 calculates dipoles for given mesh and AABB-tree
 
MRMESH_API FILE * fopen (const std::filesystem::path &filename, const char *mode)
 this version of fopen unlike std::fopen supports unicode file names on Windows
 
MRMESH_API FaceBitSet fillContourLeft (const MeshTopology &topology, const EdgePath &contour)
 
MRMESH_API FaceBitSet fillContourLeft (const MeshTopology &topology, const std::vector< EdgePath > &contours)
 
MRMESH_API FaceBitSet fillContourLeftByGraphCut (const MeshTopology &topology, const EdgePath &contour, const EdgeMetric &metric)
 Fills region located to the left from given contour, by minimizing the sum of metric over the boundary.
 
MRMESH_API FaceBitSet fillContourLeftByGraphCut (const MeshTopology &topology, const std::vector< EdgePath > &contours, const EdgeMetric &metric)
 Fills region located to the left from given contours, by minimizing the sum of metric over the boundary.
 
MRMESH_API FaceBitSet segmentByGraphCut (const MeshTopology &topology, const FaceBitSet &source, const FaceBitSet &sink, const EdgeMetric &metric)
 Finds segment that divide mesh on source and sink (source included, sink excluded), by minimizing the sum of metric over the boundary.
 
MRMESH_API VoidOrErrStr fillContours2D (Mesh &mesh, const std::vector< EdgeId > &holeRepresentativeEdges)
 fill holes with border in same plane (i.e. after cut by plane)
 
MRMESH_API AffineXf3f getXfFromOxyPlane (const Contours3f &contours)
 
MRMESH_API AffineXf3f getXfFromOxyPlane (const Mesh &mesh, const std::vector< EdgePath > &paths)
 
MRMESH_API void filterCreaseEdges (const Mesh &mesh, UndirectedEdgeBitSet &creaseEdges, float critLength, bool filterComponents=true, bool filterBranches=false)
 
MRMESH_API size_t heapBytes (const FloatGrid &grid)
 returns the amount of heap memory occupied by grid
 
MRMESH_API FloatGrid resampled (const FloatGrid &grid, float voxelScale, ProgressCallback cb={})
 resample this grid to fit voxelScale
 
MRMESH_API FloatGrid resampled (const FloatGrid &grid, const Vector3f &voxelScale, ProgressCallback cb={})
 resample this grid to fit voxelScale
 
MRMESH_API FloatGrid cropped (const FloatGrid &grid, const Box3i &box, ProgressCallback cb={})
 returns cropped grid
 
MRMESH_API float getValue (const FloatGrid &grid, const Vector3i &p)
 returns the value at given voxel
 
MRMESH_API void setValue (FloatGrid &grid, const VoxelBitSet &region, float value)
 
MRMESH_API void setLevelSetType (FloatGrid &grid)
 sets type of this grid as LEVEL SET (for normal flipping)
 
MRMESH_API FloatGrid operator+= (FloatGrid &a, const FloatGrid &b)
 
MRMESH_API FloatGrid operator-= (FloatGrid &a, const FloatGrid &b)
 
MRMESH_API FloatGrid operator*= (FloatGrid &a, const FloatGrid &b)
 
MRMESH_API std::vector< Vector3ffindBestFreeformDeformation (const Box3f &box, const std::vector< Vector3f > &source, const std::vector< Vector3f > &target, const Vector3i &resolution=Vector3i::diagonal(2))
 
template<typename T >
Vector2< T > unfoldOnPlane (const Vector3< T > &b, const Vector3< T > &c, const Vector2< T > &d, bool toLeftFrom0d)
 
template<typename T >
shortestPathInQuadrangle (const Vector3< T > &a, const Vector3< T > &b, const Vector3< T > &c, const Vector3< T > &d)
 
template<typename T >
bool isUnfoldQuadrangleConvex (const Vector3< T > &a, const Vector3< T > &b, const Vector3< T > &c, const Vector3< T > &d)
 
MRMESH_API bool reducePathViaVertex (const Mesh &mesh, const MeshTriPoint &start, VertId v, const MeshTriPoint &end, SurfacePath &outPath, std::vector< Vector2f > &tmp, SurfacePath &cachePath)
 
MRMESH_API int reducePath (const Mesh &mesh, const MeshTriPoint &start, SurfacePath &path, const MeshTriPoint &end, int maxIter=5)
 
MRMESH_API Expected< std::shared_ptr< Object >, std::string > deserializeObjectTreeFromGltf (const std::filesystem::path &file, ProgressCallback callback={})
 
MRMESH_API VoidOrErrStr serializeObjectTreeToGltf (const Object &root, const std::filesystem::path &file, ProgressCallback callback={})
 
MRMESH_API std::optional< VertBitSetverticesGridSampling (const MeshPart &mp, float voxelSize, const ProgressCallback &cb={})
 
MRMESH_API std::optional< VertBitSetpointGridSampling (const PointCloud &cloud, float voxelSize, const ProgressCallback &cb={})
 
template<typename T >
size_t heapBytes (const std::vector< T > &vec)
 returns the amount of memory given vector occupies on heap
 
template<typename T >
size_t heapBytes (const std::unique_ptr< T > &ptr)
 returns the amount of memory this smart pointer and its pointed object own together on heap
 
template<typename T >
size_t heapBytes (const std::shared_ptr< T > &ptr)
 returns the amount of memory this smart pointer and its pointed object own together on heap
 
MRMESH_API std::pair< bool, int > filterHistoryActionsVector (HistoryActionsVector &historyVector, HistoryStackFilter filteringCondition, size_t firstRedoIndex=0, bool deepFiltering=true)
 Remove actions from history actions vector that match the condition.
 
MRMESH_API size_t getNumActivePairs (const PointPairs &pairs)
 computes the number of active pairs
 
MRMESH_API NumSum getSumSqDistToPoint (const PointPairs &pairs)
 computes the number of active pairs and the sum of squared distances between points
 
MRMESH_API NumSum getSumSqDistToPlane (const PointPairs &pairs)
 computes the number of active pairs and the sum of squared deviation from points to target planes
 
float getMeanSqDistToPoint (const PointPairs &pairs)
 computes root-mean-square deviation between points
 
float getMeanSqDistToPlane (const PointPairs &pairs)
 computes root-mean-square deviation from points to target planes
 
MRMESH_API std::string getICPStatusInfo (int iterations, ICPExitType exitType)
 returns status info string
 
void updatePointPairs (PointPairs &pairs, const MeshOrPointsXf &src, const MeshOrPointsXf &tgt, float cosTreshold, float distThresholdSq, bool mutualClosest)
 in each pair updates the target data and performs basic filtering (activation)
 
size_t deactivateFarPairs (PointPairs &pairs, float maxDistSq)
 reset active bit if pair distance is further than maxDistSq
 
Id< VoxelTagoperator+ (Id< VoxelTag > id, size_t a)
 
Id< VoxelTagoperator- (Id< VoxelTag > id, size_t a)
 
template<typename T >
Id< T > operator+ (Id< T > id, int a)
 
template<typename T >
Id< T > operator+ (Id< T > id, unsigned int a)
 
template<typename T >
Id< T > operator- (Id< T > id, int a)
 
constexpr FaceId operator""_f (unsigned long long i) noexcept
 
constexpr VertId operator""_v (unsigned long long i) noexcept
 
constexpr EdgeId operator""_e (unsigned long long i) noexcept
 
constexpr UndirectedEdgeId operator""_ue (unsigned long long i) noexcept
 
MRMESH_API bool improveSampling (const PointCloud &cloud, VertBitSet &samples, const ImproveSamplingSettings &settings)
 
MRMESH_API bool isInnerShellVert (const MeshPart &mp, const Vector3f &shellPoint, Side side, float maxAbsDistSq=FLT_MAX)
 
MRMESH_API VertBitSet findInnerShellVerts (const MeshPart &mp, const Mesh &shell, Side side, float maxAbsDistSq=FLT_MAX)
 
MRMESH_API FaceBitSet findInnerShellFacesWithSplits (const MeshPart &mp, Mesh &shell, Side side)
 
template<typename T >
std::optional< Line3< T > > intersection (const Plane3< T > &plane1, const Plane3< T > &plane2, T errorLimit=std::numeric_limits< T >::epsilon() *T(20))
 
template<typename T >
std::optional< Vector3< T > > intersection (const Plane3< T > &plane, const Line3< T > &line, T errorLimit=std::numeric_limits< T >::epsilon() *T(20))
 
template<typename T >
std::optional< Vector3< T > > intersection (const Line3< T > &line1, const Line3< T > &line2, T errorLimit=std::numeric_limits< T >::epsilon() *T(20))
 
std::optional< Vector2fintersection (const LineSegm2f &segm1, const LineSegm2f &segm2)
 
template<typename T >
std::optional< T > distanceSq (const Plane3< T > &plane1, const Plane3< T > &plane2, T errorLimit=std::numeric_limits< T >::epsilon() *T(20))
 
template<typename T >
std::optional< T > distance (const Plane3< T > &plane1, const Plane3< T > &plane2, T errorLimit=std::numeric_limits< T >::epsilon() *T(20))
 
template<typename T >
std::optional< T > distance (const Plane3< T > &plane, const Line3< T > &line, T errorLimit=std::numeric_limits< T >::epsilon() *T(20))
 
template<typename T >
LineSegm3< T > closestPoints (const Line3< T > &line1, const Line3< T > &line2)
 
template<typename T >
LineSegm3< T > closestPoints (const Line3< T > &ln, const LineSegm3< T > &ls)
 
template<typename T >
LineSegm3< T > closestPoints (const Line3< T > &line, const Box3< T > &box)
 finds the closest points between a line and a box wireframe (not solid) in 3D
 
template<typename V >
auto intersection (const Line< V > &line, const Sphere< V > &sphere)
 
MRMESH_API ContinuousContours orderIntersectionContours (const MeshTopology &topologyA, const MeshTopology &topologyB, const PreciseCollisionResult &intersections)
 
MRMESH_API std::vector< int > detectLoneContours (const ContinuousContours &contours)
 
MRMESH_API void removeLoneDegeneratedContours (const MeshTopology &edgesTopology, OneMeshContours &faceContours, OneMeshContours &edgeContours)
 
MRMESH_API void removeLoneContours (ContinuousContours &contours)
 
template<typename T >
void findMaxVectorDim (int &dimX, int &dimY, int &dimZ, const Vector3< T > &dir)
 finds index of maximum axis and stores it into dimZ
 
template<typename T >
void findMaxVectorDim (int &dimX, int &dimY, const Vector2< T > &dir)
 finds index of maximum axis and stores it into dimY
 
IOFilters operator| (const IOFilters &a, const IOFilters &b)
 
MRMESH_API std::vector< size_t > splitByLines (const char *data, size_t size)
 
MRMESH_API Expected< Buffer< char >, std::string > readCharBuffer (std::istream &in)
 
template<typename T >
VoidOrErrStr parseTextCoordinate (const std::string_view &str, Vector3< T > &v, Vector3< T > *n=nullptr, Color *c=nullptr)
 
template<typename T >
VoidOrErrStr parseObjCoordinate (const std::string_view &str, Vector3< T > &v, Vector3< T > *c=nullptr)
 
template<typename T >
VoidOrErrStr parsePtsCoordinate (const std::string_view &str, Vector3< T > &v, Color &c)
 
VoidOrErrStr parseFirstNum (const std::string_view &str, int &num)
 
VoidOrErrStr parsePolygon (const std::string_view &str, VertId *vertId, int *numPoints)
 
template<typename T >
VoidOrErrStr parseAscCoordinate (const std::string_view &str, Vector3< T > &v, Vector3< T > *n=nullptr, Color *c=nullptr)
 
template<typename T >
VoidOrErrStr parseSingleNumber (const std::string_view &str, T &num)
 
MRMESH_API std::unique_ptr< IRenderObjectcreateRenderObject (const VisualObject &visObj, const std::type_index &type)
 
template<typename ObjectType >
std::unique_ptr< IRenderObjectcreateRenderObject (const VisualObject &visObj)
 
template<typename RenderObjType >
IRenderObjectConstructorLambda makeRenderObjectConstructor ()
 
bool isNanFast (float f)
 quickly tests whether given float is not-a-number
 
template<typename I >
begin (const IteratorRange< I > &range)
 
template<typename I >
end (const IteratorRange< I > &range)
 
template<typename V >
bool operator== (const LineSegm< V > &a, const LineSegm< V > &b)
 
template<typename V >
closestPointOnLineSegm (const V &pt, const LineSegm< V > &l)
 
template<typename V >
bool doSegmentsIntersect (const LineSegm< V > &x, const LineSegm< V > &y, typename V::ValueType *xPos=nullptr, typename V::ValueType *yPos=nullptr)
 
template<typename V >
bool doSegmentLineIntersect (const LineSegm< V > &x, const Line< V > &y, typename V::ValueType *xPos=nullptr, typename V::ValueType *yPos=nullptr)
 
MRMESH_API std::optional< AllLocalTriangulationsuniteLocalTriangulations (const std::vector< SomeLocalTriangulations > &in, const ProgressCallback &progress={})
 
MRMESH_API Vector3f computeNormal (const AllLocalTriangulations &triangs, const VertCoords &points, VertId v)
 compute normal at point by averaging neighbor triangle normals weighted by triangle's angle at the point
 
MRMESH_API void orientLocalTriangulations (AllLocalTriangulations &triangs, const VertCoords &coords, const VertBitSet &region, const VertNormals &targetDir)
 orient neighbors around each point in
 
MRMESH_API void orientLocalTriangulations (AllLocalTriangulations &triangs, const VertCoords &coords, const VertBitSet &region, const std::function< Vector3f(VertId)> &targetDir)
 
MRMESH_API bool autoOrientLocalTriangulations (const PointCloud &pointCloud, AllLocalTriangulations &triangs, const VertBitSet &region, ProgressCallback progress={}, Triangulation *outRep3=nullptr, Triangulation *outRep2=nullptr)
 orient neighbors around each point in
 
MRMESH_API TrianglesRepetitions computeTrianglesRepetitions (const AllLocalTriangulations &triangs)
 computes statistics about the number of triangle repetitions in local triangulations
 
MRMESH_API std::vector< UnorientedTrianglefindRepeatedUnorientedTriangles (const AllLocalTriangulations &triangs, int repetitions)
 from local triangulations returns all unoriented triangles with given number of repetitions each in [1,3]
 
MRMESH_API Triangulation findRepeatedOrientedTriangles (const AllLocalTriangulations &triangs, int repetitions)
 from local triangulations returns all oriented triangles with given number of repetitions each in [1,3]
 
MRMESH_API void findRepeatedOrientedTriangles (const AllLocalTriangulations &triangs, Triangulation *outRep3, Triangulation *outRep2)
 optional output with all oriented triangles that appear in exactly two local triangulations
 
MRMESH_API void setupLoggerByDefault ()
 
MRMESH_API void redirectSTDStreamsToLogger ()
 
MRMESH_API void printStacktraceOnCrash ()
 Print stacktrace on application crash.
 
MRMESH_API Mesh makePlane ()
 
MRMESH_API AffineXf3d makeRigidXf (const MeshPart &mp, const AffineXf3d &meshXf)
 
MRMESH_API AffineXf3f makeRigidXf (const MeshPart &mp, const AffineXf3f &meshXf)
 
MRMESH_API Mesh makeSphere (const SphereParams &params)
 creates a mesh of sphere with irregular triangulation
 
MRMESH_API Mesh makeUVSphere (float radius=1.0, int horisontalResolution=16, int verticalResolution=16)
 creates a mesh of sphere with regular triangulation (parallels and meridians)
 
EdgeId mapEdge (const WholeEdgeMap &map, EdgeId src)
 given input edge (src), converts its id using given map
 
EdgeId mapEdge (const WholeEdgeHashMap &map, EdgeId src)
 given input edge (src), converts its id using given map
 
UndirectedEdgeId mapEdge (const UndirectedEdgeBMap &map, UndirectedEdgeId src)
 given input edge (src), converts its id using given map
 
MRMESH_API UndirectedEdgeBitSet mapEdges (const WholeEdgeMap &map, const UndirectedEdgeBitSet &src)
 given input bit-set (src), converts each id corresponding to set bit using given map, and sets its bit in the resulting bit set
 
MRMESH_API UndirectedEdgeBitSet mapEdges (const WholeEdgeHashMap &map, const UndirectedEdgeBitSet &src)
 given input bit-set (src), converts each id corresponding to set bit using given map, and sets its bit in the resulting bit set
 
MRMESH_API UndirectedEdgeBitSet mapEdges (const UndirectedEdgeBMap &map, const UndirectedEdgeBitSet &src)
 given input bit-set (src), converts each id corresponding to set bit using given map, and sets its bit in the resulting bit set
 
template<typename ValueT , typename IndexT >
void mapNewToOldVector (const Vector< ValueT, Id< IndexT > > &oldData, const Vector< Id< IndexT >, Id< IndexT > > &newToOld, Vector< ValueT, Id< IndexT > > &newData)
 
template<typename ValueT , typename IndexT >
void mapOldToNewVector (const Vector< ValueT, Id< IndexT > > &oldData, const Vector< Id< IndexT >, Id< IndexT > > &newToOld, Vector< ValueT, Id< IndexT > > &newData)
 
MRMESH_API Vector3f voxelPositionerLinear (const Vector3f &pos0, const Vector3f &pos1, float v0, float v1, float iso)
 
MRMESH_API Expected< MeshmarchingCubes (const SimpleVolume &volume, const MarchingCubesParams &params={})
 
MRMESH_API Expected< TriMeshmarchingCubesAsTriMesh (const SimpleVolume &volume, const MarchingCubesParams &params={})
 
MRMESH_API Expected< MeshmarchingCubes (const VdbVolume &volume, const MarchingCubesParams &params={})
 
MRMESH_API Expected< TriMeshmarchingCubesAsTriMesh (const VdbVolume &volume, const MarchingCubesParams &params={})
 
MRMESH_API Expected< MeshmarchingCubes (const FunctionVolume &volume, const MarchingCubesParams &params={})
 
MRMESH_API Expected< TriMeshmarchingCubesAsTriMesh (const FunctionVolume &volume, const MarchingCubesParams &params={})
 
template<typename T >
void decomposeMatrix3 (const Matrix3< T > &m, Matrix3< T > &rotation, Matrix3< T > &scaling)
 Decomposes matrix into rotation and scaling matrices.
 
template<typename T >
bool isRigid (const Matrix3< T > &m)
 Returns true if matrix scale is identity.
 
MRMESH_API BooleanResult boolean (const Mesh &meshA, const Mesh &meshB, BooleanOperation operation, const AffineXf3f *rigidB2A, BooleanResultMapper *mapper=nullptr, ProgressCallback cb={})
 Performs CSG operation on two meshes.
 
MRMESH_API BooleanResult boolean (Mesh &&meshA, Mesh &&meshB, BooleanOperation operation, const AffineXf3f *rigidB2A, BooleanResultMapper *mapper=nullptr, ProgressCallback cb={})
 
MRMESH_API BooleanResult boolean (const Mesh &meshA, const Mesh &meshB, BooleanOperation operation, const BooleanParameters &params={})
 
MRMESH_API BooleanResult boolean (Mesh &&meshA, Mesh &&meshB, BooleanOperation operation, const BooleanParameters &params={})
 
MRMESH_API Expected< BooleanResultPoints, std::string > getBooleanPoints (const Mesh &meshA, const Mesh &meshB, BooleanOperation operation, const AffineXf3f *rigidB2A=nullptr)
 Returns the points of mesh boolean's result mesh.
 
MRMESH_API TransformedMeshoperator+= (TransformedMesh &a, const TransformedMesh &b)
 union operation on two meshes
 
MRMESH_API TransformedMeshoperator-= (TransformedMesh &a, const TransformedMesh &b)
 difference operation on two meshes
 
MRMESH_API TransformedMeshoperator*= (TransformedMesh &a, const TransformedMesh &b)
 intersection operation on two meshes
 
MRMESH_API void straightenBoundary (Mesh &mesh, EdgeId bd, float minNeiNormalsDot, float maxTriAspectRatio, FaceBitSet *newFaces=nullptr)
 
MRMESH_API std::vector< FaceFacefindCollidingTriangles (const MeshPart &a, const MeshPart &b, const AffineXf3f *rigidB2A=nullptr, bool firstIntersectionOnly=false)
 finds all pairs of colliding triangles from two meshes or two mesh regions
 
MRMESH_API std::pair< FaceBitSet, FaceBitSetfindCollidingTriangleBitsets (const MeshPart &a, const MeshPart &b, const AffineXf3f *rigidB2A=nullptr)
 the same as findCollidingTriangles, but returns one bite set per mesh with colliding triangles
 
MRMESH_API Expected< std::vector< FaceFace > > findSelfCollidingTriangles (const MeshPart &mp, ProgressCallback cb={}, const Face2RegionMap *regionMap=nullptr)
 finds all pairs of colliding triangles from one mesh or a region
 
MRMESH_API Expected< FaceBitSetfindSelfCollidingTrianglesBS (const MeshPart &mp, ProgressCallback cb={}, const Face2RegionMap *regionMap=nullptr)
 the same findSelfCollidingTriangles but returns the union of all self-intersecting faces
 
MRMESH_API bool isInside (const MeshPart &a, const MeshPart &b, const AffineXf3f *rigidB2A=nullptr)
 checks that arbitrary mesh part A is inside of closed mesh part B
 
MRMESH_API bool isNonIntersectingInside (const MeshPart &a, const MeshPart &b, const AffineXf3f *rigidB2A=nullptr)
 checks that arbitrary mesh part A is inside of closed mesh part B The version of isInside without collision check; it is user's responsibility to guarantee that the meshes don't collide
 
bool operator== (const EdgeTri &a, const EdgeTri &b)
 
MRMESH_API PreciseCollisionResult findCollidingEdgeTrisPrecise (const MeshPart &a, const MeshPart &b, ConvertToIntVector conv, const AffineXf3f *rigidB2A=nullptr, bool anyIntersection=false)
 finds all pairs of colliding edges from one mesh and triangle from another mesh
 
MRMESH_API std::vector< EdgeTrifindCollidingEdgeTrisPrecise (const Mesh &a, const std::vector< EdgeId > &edgesA, const Mesh &b, const std::vector< FaceId > &facesB, ConvertToIntVector conv, const AffineXf3f *rigidB2A=nullptr)
 finds all intersections between every given edge from A and given triangles from B
 
MRMESH_API std::vector< EdgeTrifindCollidingEdgeTrisPrecise (const Mesh &a, const std::vector< FaceId > &facesA, const Mesh &b, const std::vector< EdgeId > &edgesB, ConvertToIntVector conv, const AffineXf3f *rigidB2A=nullptr)
 finds all intersections between every given triangle from A and given edge from B
 
MRMESH_API ConvertToIntVector getToIntConverter (const Box3d &box)
 creates converter from Vector3f to Vector3i in Box range (int diapason is mapped to box range)
 
MRMESH_API ConvertToFloatVector getToFloatConverter (const Box3d &box)
 creates converter from Vector3i to Vector3f in Box range (int diapason is mapped to box range)
 
MRMESH_API CoordinateConverters getVectorConverters (const MeshPart &a, const MeshPart &b, const AffineXf3f *rigidB2A=nullptr)
 creates simple converters from Vector3f to Vector3i and back in mesh parts area range
 
MRMESH_API DecimateResult decimateMesh (Mesh &mesh, const DecimateSettings &settings={})
 Collapse edges in mesh region according to the settings.
 
MRMESH_API QuadraticForm3f computeFormAtVertex (const MeshPart &mp, VertId v, float stabilizer)
 Computes quadratic form at given vertex of the initial surface before decimation.
 
MRMESH_API Vector< QuadraticForm3f, VertIdcomputeFormsAtVertices (const MeshPart &mp, float stabilizer)
 Computes quadratic forms at every vertex of mesh part before decimation.
 
MRMESH_API bool resolveMeshDegenerations (Mesh &mesh, const ResolveMeshDegenSettings &settings={})
 Resolves degenerate triangles in given mesh.
 
MRMESH_API bool resolveMeshDegenerations (Mesh &mesh, int maxIters, float maxDeviation=0, float maxAngleChange=PI_F/3, float criticalAspectRatio=10000)
 
MRMESH_API bool remesh (Mesh &mesh, const RemeshSettings &settings)
 
MRMESH_API DecimateResult decimateParallelMesh (Mesh &mesh, const DecimateParallelSettings &settings={})
 Collapse edges in mesh region according to the settings.
 
MRMESH_API void deleteTargetFaces (Mesh &obj, const Vector3f &targetCenter)
 deletes object faces with normals pointed to the target geometry center
 
MRMESH_API void deleteTargetFaces (Mesh &obj, const Mesh &target)
 
MRMESH_API bool checkDeloneQuadrangle (const Vector3d &a, const Vector3d &b, const Vector3d &c, const Vector3d &d, double maxAngleChange=DBL_MAX)
 
MRMESH_API bool checkDeloneQuadrangle (const Vector3f &a, const Vector3f &b, const Vector3f &c, const Vector3f &d, float maxAngleChange=FLT_MAX)
 converts arguments in double and calls above function
 
MRMESH_API bool checkDeloneQuadrangleInMesh (const Mesh &mesh, EdgeId edge, const DeloneSettings &settings={}, float *deviationSqAfterFlip=nullptr)
 squared surface deviation after flip is written here (at least when the function returns false)
 
MRMESH_API bool bestQuadrangleDiagonal (const Vector3f &a, const Vector3f &b, const Vector3f &c, const Vector3f &d)
 
MRMESH_API int makeDeloneEdgeFlips (Mesh &mesh, const DeloneSettings &settings={}, int numIters=1, ProgressCallback progressCallback={})
 
MRMESH_API void makeDeloneOriginRing (Mesh &mesh, EdgeId e, const DeloneSettings &settings={})
 improves mesh triangulation in a ring of vertices with common origin and represented by edge e
 
MRMESH_API VertId findDirMax (const Vector3f &dir, const MeshPart &mp, UseAABBTree u=UseAABBTree::Yes)
 
MRMESH_API MeshDistanceResult findDistance (const MeshPart &a, const MeshPart &b, const AffineXf3f *rigidB2A=nullptr, float upDistLimitSq=FLT_MAX)
 computes minimal distance between two meshes or two mesh regions
 
MRMESH_API MeshSignedDistanceResult findSignedDistance (const MeshPart &a, const MeshPart &b, const AffineXf3f *rigidB2A=nullptr, float upDistLimitSq=FLT_MAX)
 computes minimal distance between two meshes
 
MRMESH_API float findMaxDistanceSqOneWay (const MeshPart &a, const MeshPart &b, const AffineXf3f *rigidB2A=nullptr, float maxDistanceSq=FLT_MAX)
 returns the maximum of the squared distances from each B-mesh vertex to A-mesh
 
MRMESH_API float findMaxDistanceSq (const MeshPart &a, const MeshPart &b, const AffineXf3f *rigidB2A=nullptr, float maxDistanceSq=FLT_MAX)
 returns the squared Hausdorff distance between two meshes, that is the maximum of squared distances from each mesh vertex to the other mesh (in both directions)
 
MRMESH_API void processCloseTriangles (const MeshPart &mp, const Triangle3f &t, float rangeSq, const TriangleCallback &call)
 
MRMESH_API MeshTopology topologyFromEigen (const Eigen::MatrixXi &F)
 constructs mesh topology from N*3 matrix of vertex indices
 
MRMESH_API Mesh meshFromEigen (const Eigen::MatrixXd &V, const Eigen::MatrixXi &F)
 constructs mesh from M*3 matrix of coordinates and N*3 matrix of vertex indices
 
MRMESH_API void pointsFromEigen (const Eigen::MatrixXd &V, const VertBitSet &selection, VertCoords &points)
 replace selected points with the values from V
 
MRMESH_API void topologyToEigen (const MeshTopology &topology, Eigen::MatrixXi &F)
 converts valid faces from mesh topology into N*3 matrix of vertex indices
 
MRMESH_API void meshToEigen (const Mesh &mesh, Eigen::MatrixXd &V, Eigen::MatrixXi &F)
 converts mesh into M*3 matrix of coordinates and N*3 matrix of vertex indices
 
MRMESH_API void makeDegenerateBandAroundRegion (Mesh &mesh, const FaceBitSet &region, const MakeDegenerateBandAroundRegionParams &params={})
 Create a band of degenerate faces along the border of the specified region and the rest of the mesh.
 
MRMESH_API void buildCylinderBetweenTwoHoles (Mesh &mesh, EdgeId a, EdgeId b, const StitchHolesParams &params={})
 Stitches two holes in Mesh
.
 
MRMESH_API bool buildCylinderBetweenTwoHoles (Mesh &mesh, const StitchHolesParams &params={})
 this version finds holes in the mesh by itself and returns false if they are not found
 
MRMESH_API void fillHole (Mesh &mesh, EdgeId a, const FillHoleParams &params={})
 Fills hole in mesh
.
 
MRMESH_API HoleFillPlan getHoleFillPlan (const Mesh &mesh, EdgeId e, const FillHoleParams &params={})
 
MRMESH_API HoleFillPlan getPlanarHoleFillPlan (const Mesh &mesh, EdgeId e)
 
MRMESH_API void executeHoleFillPlan (Mesh &mesh, EdgeId a0, HoleFillPlan &plan, FaceBitSet *outNewFaces=nullptr)
 quickly triangulates the face or hole to the left of (e) given the plan (quickly compared to fillHole function)
 
MRMESH_API VertId fillHoleTrivially (Mesh &mesh, EdgeId a, FaceBitSet *outNewFaces=nullptr)
 Triangulates face of hole in mesh trivially
.
 
MRMESH_API EdgeId extendHole (Mesh &mesh, EdgeId a, const Plane3f &plane, FaceBitSet *outNewFaces=nullptr)
 
MRMESH_API EdgeId extendHole (Mesh &mesh, EdgeId a, std::function< Vector3f(const Vector3f &)> getVertPos, FaceBitSet *outNewFaces=nullptr)
 
MRMESH_API EdgeId buildBottom (Mesh &mesh, EdgeId a, Vector3f dir, float holeExtension, FaceBitSet *outNewFaces=nullptr)
 
MRMESH_API EdgeId makeDegenerateBandAroundHole (Mesh &mesh, EdgeId a, FaceBitSet *outNewFaces=nullptr)
 
MRMESH_API bool makeBridge (MeshTopology &topology, EdgeId a, EdgeId b, FaceBitSet *outNewFaces=nullptr)
 
MRMESH_API EdgeId makeBridgeEdge (MeshTopology &topology, EdgeId a, EdgeId b)
 
MRMESH_API int duplicateMultiHoleVertices (Mesh &mesh)
 Duplicates all vertices having more than two boundary edges (and returns the number of duplications);.
 
MRMESH_API Expected< std::vector< MultipleEdge >, std::string > findMultipleEdges (const MeshTopology &topology, ProgressCallback cb={})
 
bool hasMultipleEdges (const MeshTopology &topology)
 
MRMESH_API void fixMultipleEdges (Mesh &mesh, const std::vector< MultipleEdge > &multipleEdges)
 resolves given multiple edges, but splitting all but one edge in each group
 
MRMESH_API void fixMultipleEdges (Mesh &mesh)
 finds and resolves multiple edges
 
MRMESH_API Expected< FaceBitSet, std::string > findDegenerateFaces (const MeshPart &mp, float criticalAspectRatio=FLT_MAX, ProgressCallback cb={})
 finds faces having aspect ratio >= criticalAspectRatio
 
MRMESH_API Expected< UndirectedEdgeBitSet, std::string > findShortEdges (const MeshPart &mp, float criticalLength, ProgressCallback cb={})
 finds edges having length <= criticalLength
 
MRMESH_API VertBitSet findNRingVerts (const MeshTopology &topology, int n, const VertBitSet *region=nullptr)
 finds vertices in region with complete ring of N edges
 
MRMESH_API bool isEdgeBetweenDoubleTris (const MeshTopology &topology, EdgeId e)
 returns true if the edge e has both left and right triangular faces and the degree of dest( e ) is 2
 
MRMESH_API EdgeId eliminateDoubleTris (MeshTopology &topology, EdgeId e, FaceBitSet *region=nullptr)
 
MRMESH_API void eliminateDoubleTrisAround (MeshTopology &topology, VertId v, FaceBitSet *region=nullptr)
 
MRMESH_API bool isDegree3Dest (const MeshTopology &topology, EdgeId e)
 returns true if the destination of given edge has degree 3 and 3 incident triangles
 
MRMESH_API EdgeId eliminateDegree3Dest (MeshTopology &topology, EdgeId e, FaceBitSet *region=nullptr)
 
MRMESH_API int eliminateDegree3Vertices (MeshTopology &topology, VertBitSet &region, FaceBitSet *fs=nullptr)
 
MRMESH_API EdgeId isVertexRepeatedOnHoleBd (const MeshTopology &topology, VertId v)
 
MRMESH_API VertBitSet findRepeatedVertsOnHoleBd (const MeshTopology &topology)
 returns set bits for all vertices present on the boundary of a hole several times;
 
MRMESH_API FaceBitSet findHoleComplicatingFaces (const Mesh &mesh)
 
template<typename T >
bool contains (const std::function< bool(Id< T >)> &pred, Id< T > id)
 
template<typename T >
constexpr T sqr (T x) noexcept
 
template<typename T >
constexpr int sgn (T x) noexcept
 
template<class... Ts>
 overloaded (Ts...) -> overloaded< Ts... >
 
MRMESH_API std::optional< MeshIntersectionResultrayMeshIntersect (const MeshPart &meshPart, const Line3f &line, float rayStart=0.0f, float rayEnd=FLT_MAX, const IntersectionPrecomputes< float > *prec=nullptr, bool closestIntersect=true, const FacePredicate &validFaces={})
 
MRMESH_API std::optional< MeshIntersectionResultrayMeshIntersect (const MeshPart &meshPart, const Line3d &line, double rayStart=0.0, double rayEnd=DBL_MAX, const IntersectionPrecomputes< double > *prec=nullptr, bool closestIntersect=true, const FacePredicate &validFaces={})
 
MRMESH_API std::optional< MultiMeshIntersectionResultrayMultiMeshAnyIntersect (const std::vector< Line3fMesh > &lineMeshes, float rayStart=0.0f, float rayEnd=FLT_MAX)
 
MRMESH_API std::optional< MultiMeshIntersectionResultrayMultiMeshAnyIntersect (const std::vector< Line3dMesh > &lineMeshes, double rayStart=0.0, double rayEnd=DBL_MAX)
 Same as rayMultiMeshAnyIntersectF, but use double precision.
 
MRMESH_API void rayMeshIntersectAll (const MeshPart &meshPart, const Line3f &line, MeshIntersectionCallback callback, float rayStart=0.0f, float rayEnd=FLT_MAX, const IntersectionPrecomputes< float > *prec=nullptr)
 
MRMESH_API void rayMeshIntersectAll (const MeshPart &meshPart, const Line3d &line, MeshIntersectionCallback callback, double rayStart=0.0, double rayEnd=DBL_MAX, const IntersectionPrecomputes< double > *prec=nullptr)
 Same as rayMeshIntersectAllF, but use double precision.
 
MRMESH_API void xyPlaneMeshIntersect (const MeshPart &meshPart, float zLevel, FaceBitSet *fs, UndirectedEdgeBitSet *ues, VertBitSet *vs)
 
MRMESH_API std::optional< MeshIntersectionResultrayInsideIntersect (const Mesh &mesh, VertId v)
 returns the nearest intersection between the mesh and the ray from given vertex along minus normal (inside the mesh)
 
MRMESH_API VertScalars computeThicknessAtVertices (const Mesh &mesh)
 returns the distance from each vertex along minus normal to the nearest mesh intersection (or FLT_MAX if no intersection found)
 
MRMESH_API double calcCombinedFillMetric (const Mesh &mesh, const FaceBitSet &filledRegion, const FillHoleMetric &metric)
 Computes combined metric after filling a hole.
 
MRMESH_API FillHoleMetric getCircumscribedMetric (const Mesh &mesh)
 
MRMESH_API FillHoleMetric getPlaneFillMetric (const Mesh &mesh, EdgeId e)
 
MRMESH_API FillHoleMetric getPlaneNormalizedFillMetric (const Mesh &mesh, EdgeId e)
 
MRMESH_API FillHoleMetric getComplexStitchMetric (const Mesh &mesh)
 
MRMESH_API FillHoleMetric getEdgeLengthFillMetric (const Mesh &mesh)
 Simple metric minimizing the sum of all edge lengths.
 
MRMESH_API FillHoleMetric getEdgeLengthStitchMetric (const Mesh &mesh)
 
MRMESH_API FillHoleMetric getVerticalStitchMetric (const Mesh &mesh, const Vector3f &upDir)
 
MRMESH_API FillHoleMetric getComplexFillMetric (const Mesh &mesh, EdgeId e)
 
MRMESH_API FillHoleMetric getParallelPlaneFillMetric (const Mesh &mesh, EdgeId e, const Plane3f *plane=nullptr)
 This metric minimizes summary projection of new edges to plane normal, (try do produce edges parallel to plane)
 
MRMESH_API FillHoleMetric getMaxDihedralAngleMetric (const Mesh &mesh)
 
MRMESH_API FillHoleMetric getUniversalMetric (const Mesh &mesh)
 
MRMESH_API FillHoleMetric getMinTriAngleMetric (const Mesh &mesh)
 This metric maximizes the minimal angle among all faces in the triangulation.
 
MRMESH_API FillHoleMetric getMinAreaMetric (const Mesh &mesh)
 
MRMESH_API FaceNormals computePerFaceNormals (const Mesh &mesh)
 returns a vector with face-normal in every element for valid mesh faces
 
MRMESH_API void computePerFaceNormals4 (const Mesh &mesh, Vector4f *faceNormals, size_t size)
 fills buffer with face-normals as Vector4f for valid mesh faces
 
MRMESH_API VertNormals computePerVertNormals (const Mesh &mesh)
 returns a vector with vertex normals in every element for valid mesh vertices
 
MRMESH_API VertNormals computePerVertPseudoNormals (const Mesh &mesh)
 
MRMESH_API MeshNormals computeMeshNormals (const Mesh &mesh)
 computes both per-face and per-vertex normals more efficiently then just calling both previous functions
 
MRMESH_API Vector< TriangleCornerNormals, FaceIdcomputePerCornerNormals (const Mesh &mesh, const UndirectedEdgeBitSet *creases)
 
MRMESH_API std::optional< MeshOrPointsgetMeshOrPoints (const VisualObject *obj)
 constructs MeshOrPoints from ObjectMesh or ObjectPoints, otherwise returns nullopt
 
MRMESH_API Expected< std::vector< FaceBitSet > > findOverhangs (const Mesh &mesh, const FindOverhangsSettings &settings)
 Find face regions that might create overhangs.
 
MRMESH_API MeshProjectionResult findProjection (const Vector3f &pt, const MeshPart &mp, float upDistLimitSq=FLT_MAX, const AffineXf3f *xf=nullptr, float loDistLimitSq=0, FaceId skipFace={})
 computes the closest point on mesh (or its region) to given point
 
MRMESH_API MeshProjectionResult findProjectionSubtree (const Vector3f &pt, const MeshPart &mp, const AABBTree &tree, float upDistLimitSq=FLT_MAX, const AffineXf3f *xf=nullptr, float loDistLimitSq=0, FaceId skipFace={})
 computes the closest point on mesh (or its region) to given point
 
MRMESH_API std::optional< SignedDistanceToMeshResultfindSignedDistance (const Vector3f &pt, const MeshPart &mp, float upDistLimitSq=FLT_MAX, float loDistLimitSq=0)
 computes the closest point on mesh (or its region) to given point, and finds the distance with sign to it (positive - outside, negative - inside the mesh)
 
MRMESH_API bool relax (Mesh &mesh, const MeshRelaxParams &params={}, ProgressCallback cb={})
 
MRMESH_API Vector3f vertexPosEqualNeiAreas (const Mesh &mesh, VertId v, bool noShrinkage)
 
MRMESH_API bool equalizeTriAreas (Mesh &mesh, const MeshEqualizeTriAreasParams &params={}, ProgressCallback cb={})
 
MRMESH_API bool relaxKeepVolume (Mesh &mesh, const MeshRelaxParams &params={}, ProgressCallback cb={})
 
MRMESH_API bool relaxApprox (Mesh &mesh, const MeshApproxRelaxParams &params={}, ProgressCallback cb={})
 
MRMESH_API void removeSpikes (Mesh &mesh, int maxIterations, float minSumAngle, const VertBitSet *region=nullptr)
 applies at most given number of relaxation iterations the spikes detected by given threshold
 
MRMESH_API void smoothRegionBoundary (Mesh &mesh, const FaceBitSet &regionFaces, int numIters=4)
 
MRMESH_API void hardSmoothTetrahedrons (Mesh &mesh, const VertBitSet *region=nullptr)
 move all region vertices with exactly three neighbor vertices in the center of the neighbors
 
MRMESH_API void replicateZ (Mesh &m, const Mesh &target)
 adjusts z-coordinates of (m) vertices to make adjusted (m) similar to (target)
 
MRMESH_API int subdivideMesh (Mesh &mesh, const SubdivideSettings &settings={})
 
MRMESH_API Expected< SimpleVolume, std::string > meshToDistanceVolume (const MeshPart &mp, const MeshToDistanceVolumeParams &params={})
 makes SimpleVolume filled with (signed or unsigned) distances from Mesh with given settings
 
MRMESH_API Expected< FunctionVolumemeshToDistanceFunctionVolume (const MeshPart &mp, const MeshToDistanceVolumeParams &params={})
 makes FunctionVolume representing (signed or unsigned) distances from Mesh with given settings
 
MRMESH_API Expected< SimpleVolume, std::string > meshRegionToIndicatorVolume (const Mesh &mesh, const FaceBitSet &region, float offset, const DistanceVolumeParams &params)
 
MRMESH_API PointCloud meshToPointCloud (const Mesh &mesh, bool saveNormals=true, const VertBitSet *verts=nullptr)
 
template<typename T , typename I >
Vector< T, I > rearrangeVectorByMap (const Vector< T, I > &oldVector, const BMap< I, I > &map)
 
MRMESH_API void loadMeshDll ()
 
MRMESH_API FaceBitSet subdivideWithPlane (Mesh &mesh, const Plane3f &plane, FaceHashMap *new2Old=nullptr, float eps=0, std::function< void(EdgeId, EdgeId, float)> onEdgeSplitCallback=nullptr)
 
MRMESH_API void trimWithPlane (Mesh &mesh, const Plane3f &plane, UndirectedEdgeBitSet *outCutEdges=nullptr, FaceHashMap *new2Old=nullptr, float eps=0, std::function< void(EdgeId, EdgeId, float)> onEdgeSplitCallback=nullptr)
 trim mesh by plane
 
MRMESH_API void trimWithPlane (Mesh &mesh, const Plane3f &plane, std::vector< EdgeLoop > *outCutContours, FaceHashMap *new2Old=nullptr, float eps=0, std::function< void(EdgeId, EdgeId, float)> onEdgeSplitCallback=nullptr)
 trim mesh by plane
 
MRMESH_API void trimWithPlane (Mesh &mesh, const TrimWithPlaneParams &params, const TrimOptionalOutput &optOut={})
 trim mesh by plane
 
MRMESH_API Expected< std::shared_ptr< Object >, std::string > fromSceneMison (const std::filesystem::path &path, std::string *loadWarn=nullptr, ProgressCallback callback={})
 
MRMESH_API Expected< std::shared_ptr< Object >, std::string > fromSceneMison (std::istream &in, std::string *loadWarn=nullptr, ProgressCallback callback={})
 
MRMESH_API Mesh makeMovementBuildBody (const Contours3f &body, const Contours3f &trajectory, const MovementBuildBodyParams &params={})
 
MRMESH_API void denoiseNormals (const Mesh &mesh, FaceNormals &normals, const Vector< float, UndirectedEdgeId > &v, float gamma)
 
MRMESH_API void updateIndicator (const Mesh &mesh, Vector< float, UndirectedEdgeId > &v, const FaceNormals &normals, float beta, float gamma)
 
MRMESH_API void updateIndicatorFast (const MeshTopology &topology, Vector< float, UndirectedEdgeId > &v, const FaceNormals &normals, float beta, float gamma)
 
MRMESH_API VoidOrErrStr meshDenoiseViaNormals (Mesh &mesh, const DenoiseViaNormalsSettings &settings={})
 
MRMESH_API std::string_view toString (DimensionsVisualizePropertyType value)
 
bool objectHasSelectableChildren (const MR::Object &object)
 
MRMESH_API float suggestVoxelSize (const MeshPart &mp, float approxNumVoxels)
 computes size of a cubical voxel to get approximately given number of voxels during rasterization
 
MRMESH_API Expected< MeshoffsetMesh (const MeshPart &mp, float offset, const OffsetParameters &params={})
 
MRMESH_API Expected< MeshdoubleOffsetMesh (const MeshPart &mp, float offsetA, float offsetB, const OffsetParameters &params={})
 
MRMESH_API Expected< MeshmcOffsetMesh (const MeshPart &mp, float offset, const OffsetParameters &params={}, Vector< VoxelId, FaceId > *outMap=nullptr)
 
MRMESH_API Expected< MeshmcShellMeshRegion (const Mesh &mesh, const FaceBitSet &region, float offset, const BaseShellParameters &params, Vector< VoxelId, FaceId > *outMap=nullptr)
 
MRMESH_API Expected< MeshsharpOffsetMesh (const MeshPart &mp, float offset, const SharpOffsetParameters &params={})
 
MRMESH_API Expected< MeshgeneralOffsetMesh (const MeshPart &mp, float offset, const GeneralOffsetParameters &params)
 Offsets mesh by converting it to voxels and back using one of three modes specified in the parameters.
 
MRMESH_API Expected< MeshthickenMesh (const Mesh &mesh, float offset, const GeneralOffsetParameters &params={})
 
MRMESH_API Expected< MeshoffsetPolyline (const Polyline3 &polyline, float offset, const OffsetParameters &params={})
 
MRMESH_API Expected< Contours2foffsetContours (const Contours2f &contours, float offset, const OffsetContoursParams &params={})
 offsets 2d contours in plane
 
MRMESH_API Expected< Contours2foffsetContours (const Contours2f &contours, ContoursVariableOffset offset, const OffsetContoursParams &params={})
 offsets 2d contours in plane
 
MRMESH_API Expected< Contours3foffsetContours (const Contours3f &contours, float offset, const OffsetContoursParams &params={}, const OffsetContoursRestoreZParams &zParmas={})
 offsets 3d contours in XY plane
 
MRMESH_API Expected< Contours3foffsetContours (const Contours3f &contours, ContoursVariableOffset offset, const OffsetContoursParams &params={}, const OffsetContoursRestoreZParams &zParmas={})
 offsets 3d contours in XY plane
 
template<typename GredT >
void translateToZero (GredT &grid)
 
template<typename GridT >
RangeSize calculateRangeSize (const GridT &grid)
 
MRMESH_API FaceBMap getOptimalFaceOrdering (const Mesh &mesh)
 
MRMESH_API VertBMap getVertexOrdering (const FaceBMap &faceMap, const MeshTopology &topology)
 
MRMESH_API UndirectedEdgeBMap getEdgeOrdering (const FaceBMap &faceMap, const MeshTopology &topology)
 
MRMESH_API Expected< FaceBitSet, std::string > findOverlappingTris (const MeshPart &mp, const FindOverlappingSettings &settings)
 finds all triangles that have oppositely oriented close triangle in the mesh
 
template<typename I , typename F >
void ParallelFor (I begin, I end, F &&f)
 executes given function f for each span element [begin, end)
 
template<typename I , typename F >
bool ParallelFor (I begin, I end, F &&f, ProgressCallback cb, size_t reportProgressEvery=1024)
 executes given function f for each span element [begin, end)
 
template<typename T , typename ... F>
auto ParallelFor (const std::vector< T > &v, F &&... f)
 executes given function f for each vector element in parallel threads
 
template<typename T , typename I , typename ... F>
auto ParallelFor (const Vector< T, I > &v, F &&... f)
 executes given function f for each vector element in parallel threads
 
template<typename T >
std::pair< T, T > parallelMinMax (const std::vector< T > &vec, const T *topExcluding=nullptr)
 
template<typename T , typename I >
auto parallelMinMaxArg (const Vector< T, I > &vec, const T *topExcluding=nullptr)
 
MRMESH_API Expected< MeshpartialOffsetMesh (const MeshPart &mp, float offset, const GeneralOffsetParameters &params={})
 
MRMESH_API VertBitSet findHalfSpacePoints (const PointCloud &pc, const Plane3f &plane)
 
MRMESH_API PointCloud divideWithPlane (const PointCloud &points, const Plane3f &plane, const DividePointCloudOptionalOutput &optOut={})
 
MRMESH_API std::optional< VertNormalsmakeUnorientedNormals (const PointCloud &pointCloud, float radius, const ProgressCallback &progress={})
 Makes normals for valid points of given point cloud by directing them along the normal (in one of two sides arbitrary) of best plane through the neighbours.
 
MRMESH_API std::optional< VertNormalsmakeUnorientedNormals (const PointCloud &pointCloud, const AllLocalTriangulations &triangs, const ProgressCallback &progress={})
 Makes normals for valid points of given point cloud by directing them along the normal (in one of two sides arbitrary) of best plane through the neighbours \triangs triangulation neighbours of each point.
 
MRMESH_API std::optional< VertNormalsmakeUnorientedNormals (const PointCloud &pointCloud, const Buffer< VertId > &closeVerts, int numNei, const ProgressCallback &progress={})
 Makes normals for valid points of given point cloud by directing them along the normal (in one of two sides arbitrary) of best plane through the neighbours.
 
MRMESH_API bool orientNormals (const PointCloud &pointCloud, VertNormals &normals, float radius, const ProgressCallback &progress={})
 Select orientation of given normals to make directions of close points consistent;.
 
MRMESH_API bool orientNormals (const PointCloud &pointCloud, VertNormals &normals, const AllLocalTriangulations &triangs, const ProgressCallback &progress={})
 Select orientation of given normals to make directions of close points consistent;.
 
MRMESH_API bool orientNormals (const PointCloud &pointCloud, VertNormals &normals, const Buffer< VertId > &closeVerts, int numNei, const ProgressCallback &progress={})
 Select orientation of given normals to make directions of close points consistent;.
 
MRMESH_API std::optional< VertNormalsmakeOrientedNormals (const PointCloud &pointCloud, float radius, const ProgressCallback &progress={})
 Makes normals for valid points of given point cloud; directions of close points are selected to be consistent;.
 
MRMESH_API std::optional< VertNormalsmakeOrientedNormals (const PointCloud &pointCloud, AllLocalTriangulations &triangs, const ProgressCallback &progress={})
 Makes normals for valid points of given point cloud; directions of close points are selected to be consistent; \triangs triangulation neighbours of each point, which are oriented during the call as well.
 
MRMESH_API VertNormals makeNormals (const PointCloud &pointCloud, int avgNeighborhoodSize=48)
 Makes consistent normals for valid points of given point cloud.
 
MRMESH_API float findAvgPointsRadius (const PointCloud &pointCloud, int avgPoints, int samples=1024)
 Finds the radius of ball, so on average that ball contained avgPoints excluding the central point.
 
MRMESH_API bool dilateRegion (const PointCloud &pointCloud, VertBitSet &region, float dilation, ProgressCallback cb={}, const AffineXf3f *xf=nullptr)
 expands the region on given euclidian distance. returns false if callback also returns false
 
MRMESH_API bool erodeRegion (const PointCloud &pointCloud, VertBitSet &region, float erosion, ProgressCallback cb={}, const AffineXf3f *xf=nullptr)
 shrinks the region on given euclidian distance. returns false if callback also returns false
 
MRMESH_API bool relax (PointCloud &pointCloud, const PointCloudRelaxParams &params={}, ProgressCallback cb={})
 
MRMESH_API bool relaxKeepVolume (PointCloud &pointCloud, const PointCloudRelaxParams &params={}, ProgressCallback cb={})
 
MRMESH_API bool relaxApprox (PointCloud &pointCloud, const PointCloudApproxRelaxParams &params={}, ProgressCallback cb={})
 
MRMESH_API std::optional< MeshtriangulatePointCloud (const PointCloud &pointCloud, const TriangulationParameters &params={}, ProgressCallback progressCb={})
 Creates mesh from given point cloud according params Returns empty optional if was interrupted by progress bar.
 
MRMESH_API MR::Vector3f pickedPointToVector3 (const VisualObject *object, const PickedPoint &point)
 
MRMESH_API PickedPoint pointOnObjectToPickedPoint (const VisualObject *object, const PointOnObject &pos)
 
MRMESH_API bool isPickedPointValid (const VisualObject *object, const PickedPoint &point)
 
MRMESH_API void findPointsInBall (const PointCloud &pointCloud, const Vector3f &center, float radius, const FoundPointCallback &foundCallback, const AffineXf3f *xf=nullptr)
 
MRMESH_API void findPointsInBall (const Mesh &mesh, const Vector3f &center, float radius, const FoundPointCallback &foundCallback, const AffineXf3f *xf=nullptr)
 
MRMESH_API void findPointsInBall (const AABBTreePoints &tree, const Vector3f &center, float radius, const FoundPointCallback &foundCallback, const AffineXf3f *xf=nullptr)
 
MRMESH_API PointsProjectionResult findProjectionOnPoints (const Vector3f &pt, const PointCloud &pc, float upDistLimitSq=FLT_MAX, const AffineXf3f *xf=nullptr, float loDistLimitSq=0, VertPredicate skipCb={})
 computes the closest point on point cloud to given point
 
MRMESH_API void findFewClosestPoints (const Vector3f &pt, const PointCloud &pc, FewSmallest< PointsProjectionResult > &res, float upDistLimitSq=FLT_MAX, const AffineXf3f *xf=nullptr, float loDistLimitSq=0)
 finds a number of the closest points in the cloud (as configured in
 
MRMESH_API Buffer< VertIdfindNClosestPointsPerPoint (const PointCloud &pc, int numNei, const ProgressCallback &progress={})
 finds given number of closest points (excluding itself) to each valid point in the cloud;
 
MRMESH_API Expected< SimpleVolumepointsToDistanceVolume (const PointCloud &cloud, const PointsToDistanceVolumeParams &params)
 makes SimpleVolume filled with signed distances to points with normals
 
MRMESH_API Expected< VertColorscalcAvgColors (const PointCloud &cloud, const VertColors &colors, const VertCoords &tgtPoints, const VertBitSet &tgtVerts, float sigma, const ProgressCallback &cb={})
 
MRMESH_API Expected< MeshpointsToMeshFusion (const PointCloud &cloud, const PointsToMeshParameters &params)
 
MRMESH_API std::vector< EdgePointPairfindCollidingEdgePairs (const Polyline2 &a, const Polyline2 &b, const AffineXf2f *rigidB2A=nullptr, bool firstIntersectionOnly=false)
 finds all pairs of colliding edges from two 2d polylines
 
MRMESH_API std::vector< UndirectedEdgeUndirectedEdgefindCollidingEdges (const Polyline2 &a, const Polyline2 &b, const AffineXf2f *rigidB2A=nullptr, bool firstIntersectionOnly=false)
 finds all pairs of colliding edges from two 2d polylines
 
MRMESH_API std::pair< UndirectedEdgeBitSet, UndirectedEdgeBitSetfindCollidingEdgesBitsets (const Polyline2 &a, const Polyline2 &b, const AffineXf2f *rigidB2A=nullptr)
 finds bitset per polyline with colliding edges
 
MRMESH_API std::vector< EdgePointPairfindSelfCollidingEdgePairs (const Polyline2 &polyline)
 finds all pairs of colliding edges from 2d polyline
 
MRMESH_API std::vector< UndirectedEdgeUndirectedEdgefindSelfCollidingEdges (const Polyline2 &polyline)
 finds all pairs of colliding edges from 2d polyline
 
MRMESH_API UndirectedEdgeBitSet findSelfCollidingEdgesBS (const Polyline2 &polyline)
 finds the union of all self-intersecting edges
 
MRMESH_API bool isInside (const Polyline2 &a, const Polyline2 &b, const AffineXf2f *rigidB2A=nullptr)
 checks that arbitrary 2d polyline A is inside of closed 2d polyline B
 
MRMESH_API bool isPointInsidePolyline (const Polyline2 &polyline, const Vector2f &point)
 detect if given point is inside polyline, by counting ray intersections
 
MRMESH_API std::optional< PolylineIntersectionResult2rayPolylineIntersect (const Polyline2 &polyline, const Line2f &line, float rayStart=0, float rayEnd=FLT_MAX, const IntersectionPrecomputes2< float > *prec=nullptr, bool closestIntersect=true)
 
MRMESH_API std::optional< PolylineIntersectionResult2rayPolylineIntersect (const Polyline2 &polyline, const Line2d &line, double rayStart=0, double rayEnd=DBL_MAX, const IntersectionPrecomputes2< double > *prec=nullptr, bool closestIntersect=true)
 
MRMESH_API DecimatePolylineResult decimatePolyline (Polyline2 &polyline, const DecimatePolylineSettings2 &settings={})
 Collapse edges in the polyline according to the settings.
 
MRMESH_API DecimatePolylineResult decimatePolyline (Polyline3 &polyline, const DecimatePolylineSettings3 &settings={})
 
MRMESH_API DecimatePolylineResult decimateContour (Contour2f &contour, const DecimatePolylineSettings2 &settings={})
 Collapse edges in the contour according to the settings.
 
MRMESH_API DecimatePolylineResult decimateContour (Contour3f &contour, const DecimatePolylineSettings3 &settings={})
 
MRMESH_API PolylineProjectionResult2 findProjectionOnPolyline2 (const Vector2f &pt, const Polyline2 &polyline, float upDistLimitSq=FLT_MAX, AffineXf2f *xf=nullptr, float loDistLimitSq=0)
 computes the closest point on polyline to given point
 
MRMESH_API PolylineProjectionResult3 findProjectionOnPolyline (const Vector3f &pt, const Polyline3 &polyline, float upDistLimitSq=FLT_MAX, AffineXf3f *xf=nullptr, float loDistLimitSq=0)
 computes the closest point on polyline to given point
 
MRMESH_API PolylineProjectionResult3 findProjectionOnPolyline (const Line3f &ln, const Polyline3 &polyline, float upDistLimitSq=FLT_MAX, AffineXf3f *xf=nullptr, float loDistLimitSq=0)
 computes the closest point on polyline to given straight line
 
MRMESH_API Polyline2ProjectionWithOffsetResult findProjectionOnPolyline2WithOffset (const Vector2f &pt, const Polyline2 &polyline, const Vector< float, UndirectedEdgeId > &offsetPerEdge, float upDistLimit=FLT_MAX, AffineXf2f *xf=nullptr, float loDistLimit=0)
 computes the closest point on polyline to given point, respecting each edge offset
 
MRMESH_API PolylineProjectionWithOffsetResult3 findProjectionOnPolylineWithOffset (const Vector3f &pt, const Polyline3 &polyline, const Vector< float, UndirectedEdgeId > &offsetPerEdge, float upDistLimit=FLT_MAX, AffineXf3f *xf=nullptr, float loDistLimit=0)
 computes the closest point on polyline to given point, respecting each edge offset
 
MRMESH_API void findEdgesInBall (const Polyline2 &polyline, const Vector2f &center, float radius, const FoundEdgeCallback2 &foundCallback, AffineXf2f *xf=nullptr)
 Finds all edges of given polyline that cross or touch given ball (center, radius)
 
MRMESH_API void findEdgesInBall (const Polyline3 &polyline, const Vector3f &center, float radius, const FoundEdgeCallback3 &foundCallback, AffineXf3f *xf=nullptr)
 Finds all edges of given polyline that cross or touch given ball (center, radius)
 
MRMESH_API void findMeshEdgesInBall (const Mesh &mesh, const AABBTreePolyline3 &tree, const Vector3f &center, float radius, const FoundEdgeCallback3 &foundCallback, AffineXf3f *xf=nullptr)
 Finds all edges of given mesh edges (specified by the tree) that cross or touch given ball (center, radius)
 
MRMESH_API PolylineProjectionResult3 findProjectionOnMeshEdges (const Vector3f &pt, const Mesh &mesh, const AABBTreePolyline3 &tree, float upDistLimitSq=FLT_MAX, AffineXf3f *xf=nullptr, float loDistLimitSq=0)
 computes the closest point on the mesh edges (specified by the tree) to given point
 
MRMESH_API PolylineProjectionResult3 findProjectionOnMeshEdges (const Line3f &ln, const Mesh &mesh, const AABBTreePolyline3 &tree, float upDistLimitSq=FLT_MAX, AffineXf3f *xf=nullptr, float loDistLimitSq=0)
 computes the closest point on the mesh edges (specified by the tree) to given straight line
 
template<typename V >
bool relax (Polyline< V > &polyline, const RelaxParams &params={}, ProgressCallback cb={})
 
template<typename V >
bool relaxKeepArea (Polyline< V > &polyline, const RelaxParams &params={}, ProgressCallback cb={})
 
MRMESH_API int subdividePolyline (Polyline2 &polyline, const PolylineSubdivideSettings &settings={})
 
MRMESH_API int subdividePolyline (Polyline3 &polyline, const PolylineSubdivideSettings &settings={})
 
MRMESH_API EdgeBitSet subdividePolylineWithPlane (Polyline3 &polyline, const Plane3f &plane, std::function< void(EdgeId, EdgeId, float)> onEdgeSplitCallback=nullptr)
 
MRMESH_API void dividePolylineWithPlane (Polyline3 &polyline, const Plane3f &plane, const DividePolylineParameters &params={})
 
MRMESH_API std::vector< EdgeSegmentextractSectionsFromPolyline (const Polyline3 &polyline, const Plane3f &plane, float eps)
 
MRMESH_API void positionVertsSmoothly (Mesh &mesh, const VertBitSet &verts, Laplacian::EdgeWeights edgeWeightsType=Laplacian::EdgeWeights::Cotan, const VertBitSet *fixedSharpVertices=nullptr)
 
MRMESH_API void positionVertsSmoothlySharpBd (Mesh &mesh, const VertBitSet &verts, const Vector< Vector3f, VertId > *vertShifts=nullptr)
 
MRMESH_API void positionVertsWithSpacing (Mesh &mesh, const SpacingSettings &settings)
 Moves given vertices to make the distances between them as specified.
 
MRMESH_API void inflate (Mesh &mesh, const VertBitSet &verts, const InflateSettings &settings)
 
MRMESH_API void vertMapsComposition (VertMap &a2b, const VertMap &b2c)
 updates a2b map to a2c map using b2c map
 
MRMESH_API VertMap vertMapsComposition (const VertMap &a2b, const VertMap &b2c)
 returns map a2c from a2b and b2c maps
 
MRMESH_API void edgeMapsComposition (EdgeMap &a2b, const EdgeMap &b2c)
 updates a2b map to a2c map using b2c map
 
MRMESH_API EdgeMap edgeMapsComposition (const EdgeMap &a2b, const EdgeMap &b2c)
 returns map a2c from a2b and b2c maps
 
MRMESH_API void faceMapsComposition (FaceMap &a2b, const FaceMap &b2c)
 updates a2b map to a2c map using b2c map
 
MRMESH_API FaceMap faceMapsComposition (const FaceMap &a2b, const FaceMap &b2c)
 returns map a2c from a2b and b2c maps
 
MRMESH_API Mesh makePrism (float baseLength, float leftAngle, float rightAngle, float height=1.0f)
 
bool reportProgress (ProgressCallback cb, float v)
 safely invokes
 
bool reportProgress (ProgressCallback cb, float v, size_t counter, int divider)
 
template<typename F >
bool reportProgress (ProgressCallback cb, F &&f)
 
template<typename F >
bool reportProgress (ProgressCallback cb, F &&f, size_t counter, int divider)
 
ProgressCallback subprogress (ProgressCallback cb, float from, float to)
 returns a callback that maps [0,1] linearly into [from,to] in the call to
 
template<typename F >
ProgressCallback subprogress (ProgressCallback cb, F &&f)
 returns a callback that maps the value with given function
 
ProgressCallback subprogress (ProgressCallback cb, size_t index, size_t count)
 returns a callback that maps [0,1] linearly into [(index+0)/count,(index+1)/count] in the call to
 
MRMESH_API bool writeByBlocks (std::ostream &out, const char *data, size_t dataSize, ProgressCallback callback={}, size_t blockSize=(size_t(1)<< 16))
 write dataSize bytes from data to out stream by blocks blockSize bytes
 
MRMESH_API bool readByBlocks (std::istream &in, char *data, size_t dataSize, ProgressCallback callback={}, size_t blockSize=(size_t(1)<< 16))
 read dataSize bytes from in stream to data by blocks blockSize bytes
 
template<typename E >
void throwExceptionFromExpected (const E &err)
 
template<typename R , typename E , typename... Args>
auto decorateExpected (std::function< Expected< R, E >(Args...)> &&f) -> std::function< R(Args...)>
 
template<typename F >
auto decorateExpected (F &&f)
 
template<typename R , typename T , typename... Args>
auto decorateExpected (R(T::*memFunction)(Args...))
 
template<typename T >
bool rayBoxIntersect (const Box3< T > &box, const RayOrigin< T > &rayOrigin, T &t0, T &t1, const IntersectionPrecomputes< T > &prec)
 
template<typename T = float>
bool rayBoxIntersect (const Box3< T > &box, const Line3< T > &line, T t0, T t1)
 
template<typename T >
bool rayBoxIntersect (const Box2< T > &box, const Vector2< T > &rayOrigin, T &t0, T &t1, const IntersectionPrecomputes2< T > &prec)
 
template<typename T = float>
bool rayBoxIntersect (const Box2< T > &box, const Line2< T > &line, T t0, T t1)
 
OutEdge2 opposite (OutEdge2 e)
 
MRMESH_API void expandPixelMask (PixelBitSet &mask, const RectIndexer &indexer, int expansion=1)
 expands PixelBitSet with given number of steps
 
MRMESH_API void shrinkPixelMask (PixelBitSet &mask, const RectIndexer &indexer, int shrinkage=1)
 shrinks PixelBitSet with given number of steps
 
MRMESH_API EdgeLoop trackLeftBoundaryLoop (const MeshTopology &topology, EdgeId e0, const FaceBitSet *region=nullptr)
 
EdgeLoop trackLeftBoundaryLoop (const MeshTopology &topology, const FaceBitSet &region, EdgeId e0)
 
MRMESH_API EdgeLoop trackRightBoundaryLoop (const MeshTopology &topology, EdgeId e0, const FaceBitSet *region=nullptr)
 
EdgeLoop trackRightBoundaryLoop (const MeshTopology &topology, const FaceBitSet &region, EdgeId e0)
 
MRMESH_API std::vector< EdgeLoopfindLeftBoundary (const MeshTopology &topology, const FaceBitSet *region=nullptr)
 
std::vector< EdgeLoopfindLeftBoundary (const MeshTopology &topology, const FaceBitSet &region)
 
MRMESH_API std::vector< EdgeLoopfindRightBoundary (const MeshTopology &topology, const FaceBitSet *region=nullptr)
 
std::vector< EdgeLoopfindRightBoundary (const MeshTopology &topology, const FaceBitSet &region)
 
MRMESH_API std::vector< EdgePathfindLeftBoundaryInsideMesh (const MeshTopology &topology, const FaceBitSet &region)
 
MRMESH_API UndirectedEdgeBitSet findRegionBoundaryUndirectedEdgesInsideMesh (const MeshTopology &topology, const FaceBitSet &region)
 
MRMESH_API FaceBitSet findRegionOuterFaces (const MeshTopology &topology, const FaceBitSet &region)
 
MRMESH_API VertBitSet getIncidentVerts (const MeshTopology &topology, const FaceBitSet &faces)
 
MRMESH_API const VertBitSetgetIncidentVerts (const MeshTopology &topology, const FaceBitSet *faces, VertBitSet &store)
 
MRMESH_API VertBitSet getInnerVerts (const MeshTopology &topology, const FaceBitSet *region=nullptr)
 
MRMESH_API VertBitSet getInnerVerts (const MeshTopology &topology, const FaceBitSet &region)
 
MRMESH_API VertBitSet getBoundaryVerts (const MeshTopology &topology, const FaceBitSet *region=nullptr)
 
MRMESH_API VertBitSet getRegionBoundaryVerts (const MeshTopology &topology, const FaceBitSet &region)
 
MRMESH_API FaceBitSet getIncidentFaces (const MeshTopology &topology, const VertBitSet &verts)
 
MRMESH_API FaceBitSet getInnerFaces (const MeshTopology &topology, const VertBitSet &verts)
 
MRMESH_API EdgeBitSet getRegionEdges (const MeshTopology &topology, const FaceBitSet &faces)
 
MRMESH_API UndirectedEdgeBitSet getIncidentEdges (const MeshTopology &topology, const FaceBitSet &faces)
 
MRMESH_API VertBitSet getIncidentVerts (const MeshTopology &topology, const UndirectedEdgeBitSet &edges)
 
MRMESH_API FaceBitSet getIncidentFaces (const MeshTopology &topology, const UndirectedEdgeBitSet &edges)
 
MRMESH_API FaceBitSet getNeighborFaces (const MeshTopology &topology, const UndirectedEdgeBitSet &edges)
 
MRMESH_API UndirectedEdgeBitSet getInnerEdges (const MeshTopology &topology, const VertBitSet &verts)
 
MRMESH_API UndirectedEdgeBitSet getInnerEdges (const MeshTopology &topology, const FaceBitSet &region)
 
MRMESH_API const VertBitSetgetIncidentVerts (const MeshTopology &topology, const UndirectedEdgeBitSet *edges, VertBitSet &store)
 
MRMESH_API VertBitSet getInnerVerts (const MeshTopology &topology, const UndirectedEdgeBitSet &edges)
 
MRMESH_API EdgeLoop trackRegionBoundaryLoop (const MeshTopology &topology, EdgeId e0, const FaceBitSet *region=nullptr)
 
EdgeLoop trackRegionBoundaryLoop (const MeshTopology &topology, const FaceBitSet &region, EdgeId e0)
 
MRMESH_API std::vector< EdgeLoopfindRegionBoundary (const MeshTopology &topology, const FaceBitSet *region=nullptr)
 
std::vector< EdgeLoopfindRegionBoundary (const MeshTopology &topology, const FaceBitSet &region)
 
MRMESH_API Expected< Mesh, std::string > makeRegularGridMesh (size_t width, size_t height, const RegularGridLatticeValidator &validator, const RegularGridLatticePositioner &positioner, const RegularGridMeshFaceValidator &faceValidator={}, ProgressCallback cb={})
 
MRMESH_API Expected< Mesh, std::string > makeRegularGridMesh (VertCoords pc, ProgressCallback cb={})
 
template<typename V >
getLimitedPos (const V &pos, const V &guidePos, typename V::ValueType maxGuideDistSq)
 
template<typename N >
bool operator== (const RingIterator< N > &a, const RingIterator< N > &b)
 
template<typename N >
bool operator!= (const RingIterator< N > &a, const RingIterator< N > &b)
 
IteratorRange< OrgRingIteratororgRing (const MeshTopology &topology, EdgeId edge)
 
IteratorRange< OrgRingIteratororgRing (const MeshTopology &topology, VertId v)
 
IteratorRange< OrgRingIteratororgRing0 (const MeshTopology &topology, EdgeId edge)
 
IteratorRange< LeftRingIteratorleftRing (const MeshTopology &topology, EdgeId edge)
 
IteratorRange< LeftRingIteratorleftRing (const MeshTopology &topology, FaceId f)
 
IteratorRange< LeftRingIteratorleftRing0 (const MeshTopology &topology, EdgeId edge)
 
Vector3f applyFloat (const AffineXf3d *xf, const Vector3f &p)
 returns the point as is or after application of given transform to it in double precision
 
Vector3f applyFloat (const Matrix3d *m, const Vector3f &n)
 returns the normal as is or after application of given matrix to it in double precision
 
Vector3d applyDouble (const AffineXf3d *xf, const Vector3f &p)
 converts given point in double precision and applies given transformation to it
 
Vector3d applyDouble (const Matrix3d *m, const Vector3f &n)
 converts given normal in double precision and applies given matrix to it
 
MRMESH_API const VertCoordstransformPoints (const VertCoords &verts, const VertBitSet &validVerts, const AffineXf3d *xf, VertCoords &buf, const VertRenumber *vertRenumber=nullptr)
 
MRMESH_API const VertNormalstransformNormals (const VertNormals &normals, const VertBitSet &validVerts, const Matrix3d *m, VertNormals &buf)
 
MRMESH_API std::shared_ptr< SceneRootObjectcreateRootFormObject (std::shared_ptr< Object > obj)
 
MRMESH_API Expected< Json::Value, std::string > deserializeJsonValue (std::istream &in)
 
MRMESH_API Expected< Json::Value, std::string > deserializeJsonValue (const std::string &str)
 
MRMESH_API Expected< Json::Value, std::string > deserializeJsonValue (const std::filesystem::path &path)
 
MRMESH_API VoidOrErrStr serializeObjectTree (const Object &object, const std::filesystem::path &path, ProgressCallback progress={}, FolderCallback preCompress={})
 saves object subtree in given scene file (zip/mru)
 
MRMESH_API Expected< std::shared_ptr< Object >, std::string > deserializeObjectTree (const std::filesystem::path &path, FolderCallback postDecompress={}, ProgressCallback progressCb={})
 loads objects tree from given scene file (zip/mru)
 
MRMESH_API Expected< std::shared_ptr< Object >, std::string > deserializeObjectTreeFromFolder (const std::filesystem::path &folder, ProgressCallback progressCb={})
 loads objects tree from given scene folder
 
MRMESH_API VoidOrErrStr serializeMesh (const Mesh &mesh, const std::filesystem::path &path, const FaceBitSet *selection=nullptr, const char *saveMeshFormat=".mrmesh")
 
MRMESH_API void serializeToJson (const Vector2i &vec, Json::Value &root)
 saves an object into json value
 
MRMESH_API void serializeToJson (const Vector2f &vec, Json::Value &root)
 
MRMESH_API void serializeToJson (const Vector3i &vec, Json::Value &root)
 
MRMESH_API void serializeToJson (const Vector3f &vec, Json::Value &root)
 
MRMESH_API void serializeToJson (const Vector4f &vec, Json::Value &root)
 
MRMESH_API void serializeToJson (const Color &col, Json::Value &root)
 
MRMESH_API void serializeToJson (const Matrix2f &matrix, Json::Value &root, bool skipIdentity=true)
 
MRMESH_API void serializeToJson (const Matrix3f &matrix, Json::Value &root, bool skipIdentity=true)
 
MRMESH_API void serializeToJson (const AffineXf2f &xf, Json::Value &root, bool skipIdentity=true)
 
MRMESH_API void serializeToJson (const BitSet &bitset, Json::Value &root)
 
MRMESH_API VoidOrErrStr serializeToJson (const Mesh &mesh, Json::Value &root)
 
MRMESH_API void serializeToJson (const Plane3f &plane, Json::Value &root)
 
MRMESH_API void serializeToJson (const TriPointf &tp, Json::Value &root)
 
MRMESH_API void serializeToJson (const MeshTexture &texture, Json::Value &root)
 
MRMESH_API void serializeToJson (const std::vector< UVCoord > &uvCoords, Json::Value &root)
 
MRMESH_API void serializeToJson (const std::vector< Color > &colors, Json::Value &root)
 
MRMESH_API void serializeToJson (const MeshTriPoint &mtp, const MeshTopology &topology, Json::Value &root)
 
MRMESH_API void serializeToJson (const PointOnFace &pf, Json::Value &root)
 
MRMESH_API void serializeViaVerticesToJson (const UndirectedEdgeBitSet &edges, const MeshTopology &topology, Json::Value &root)
 
MRMESH_API void deserializeViaVerticesFromJson (const Json::Value &root, UndirectedEdgeBitSet &edges, const MeshTopology &topology)
 
MRMESH_API void deserializeFromJson (const Json::Value &root, Vector2i &vec)
 loads an object from json value
 
MRMESH_API void deserializeFromJson (const Json::Value &root, Vector2f &vec)
 
MRMESH_API void deserializeFromJson (const Json::Value &root, Vector3i &vec)
 
MRMESH_API void deserializeFromJson (const Json::Value &root, Vector3f &vec)
 
MRMESH_API void deserializeFromJson (const Json::Value &root, Vector4f &vec)
 
MRMESH_API void deserializeFromJson (const Json::Value &root, Color &col)
 
MRMESH_API void deserializeFromJson (const Json::Value &root, Matrix2f &matrix)
 
MRMESH_API void deserializeFromJson (const Json::Value &root, Matrix3f &matrix)
 
MRMESH_API void deserializeFromJson (const Json::Value &root, AffineXf2f &xf)
 
MRMESH_API void deserializeFromJson (const Json::Value &root, BitSet &bitset)
 
MRMESH_API Expected< Mesh, std::string > deserializeFromJson (const Json::Value &root, VertColors *colors=nullptr)
 
MRMESH_API void deserializeFromJson (const Json::Value &root, Plane3f &plane)
 
MRMESH_API void deserializeFromJson (const Json::Value &root, TriPointf &tp)
 
MRMESH_API void deserializeFromJson (const Json::Value &root, MeshTexture &texture)
 
MRMESH_API void deserializeFromJson (const Json::Value &root, std::vector< UVCoord > &uvCoords)
 
MRMESH_API void deserializeFromJson (const Json::Value &root, std::vector< Color > &colors)
 
MRMESH_API void deserializeFromJson (const Json::Value &root, MeshTriPoint &mtp, const MeshTopology &topology)
 
MRMESH_API void deserializeFromJson (const Json::Value &root, PointOnFace &pf)
 
MRMESH_API void sharpenMarchingCubesMesh (const MeshPart &ref, Mesh &vox, Vector< VoxelId, FaceId > &face2voxel, const SharpenMarchingCubesMeshSettings &settings)
 
MRMESH_API std::vector< Vector3fsampleHalfSphere ()
 returns quasi-uniform 145 samples on unit half-sphere z>0
 
MRMESH_API VertScalars computeSkyViewFactor (const Mesh &terrain, const VertCoords &samples, const VertBitSet &validSamples, const std::vector< SkyPatch > &skyPatches, BitSet *outSkyRays=nullptr, std::vector< MeshIntersectionResult > *outIntersections=nullptr)
 
MRMESH_API BitSet findSkyRays (const Mesh &terrain, const VertCoords &samples, const VertBitSet &validSamples, const std::vector< SkyPatch > &skyPatches, std::vector< MeshIntersectionResult > *outIntersections=nullptr)
 
template<typename T >
std::ostream & operator<< (std::ostream &s, const Vector2< T > &vec)
 
template<typename T >
std::ostream & operator<< (std::ostream &s, const Vector3< T > &vec)
 
template<typename T >
std::ostream & operator<< (std::ostream &s, const Vector4< T > &vec)
 
template<typename T >
std::istream & operator>> (std::istream &s, Vector2< T > &vec)
 
template<typename T >
std::istream & operator>> (std::istream &s, Vector3< T > &vec)
 
template<typename T >
std::istream & operator>> (std::istream &s, Vector4< T > &vec)
 
template<typename T >
std::ostream & operator<< (std::ostream &s, const Matrix3< T > &mat)
 
template<typename T >
std::istream & operator>> (std::istream &s, Matrix3< T > &mat)
 
template<typename T >
std::ostream & operator<< (std::ostream &s, const Matrix4< T > &mat)
 
template<typename T >
std::istream & operator>> (std::istream &s, Matrix4< T > &mat)
 
template<typename T >
std::ostream & operator<< (std::ostream &s, const Plane3< T > &pl)
 
template<typename T >
std::istream & operator>> (std::istream &s, Plane3< T > &pl)
 
template<typename T >
std::ostream & operator<< (std::ostream &s, const Line3< T > &l)
 
template<typename T >
std::istream & operator>> (std::istream &s, Line3< T > &l)
 
template<typename T >
std::ostream & operator<< (std::ostream &s, const TriPoint< T > &tp)
 
template<typename T >
std::istream & operator>> (std::istream &s, TriPoint< T > &tp)
 
template<typename T >
std::ostream & operator<< (std::ostream &s, const AffineXf3< T > &xf)
 
template<typename T >
std::istream & operator>> (std::istream &s, AffineXf3< T > &xf)
 
std::ostream & operator<< (std::ostream &s, const PointOnFace &pof)
 
std::istream & operator>> (std::istream &s, PointOnFace &pof)
 
template<typename V >
std::ostream & operator<< (std::ostream &s, const Box< V > &box)
 
template<typename V >
std::istream & operator>> (std::istream &s, Box< V > &box)
 
MRMESH_API size_t findSubstringCaseInsensitive (const std::string &string, const std::string &substring)
 
MRMESH_API int calcDamerauLevenshteinDistance (const std::string &stringA, const std::string &stringB, bool caseSensitive=true)
 
MRMESH_API std::vector< std::string > split (const std::string &string, const std::string &delimiter)
 
template<typename F >
bool split (std::string_view str, std::string_view sep, F &&func)
 
MRMESH_API std::string replace (std::string target, std::string_view from, std::string_view to)
 
MRMESH_API void replaceInplace (std::string &target, std::string_view from, std::string_view to)
 
MRMESH_API std::wstring utf8ToWide (const char *utf8)
 converts UTF8-encoded string into UTF16-encoded string
 
MRMESH_API std::string systemToUtf8 (const std::string &system)
 converts system encoded string to UTF8-encoded string
 
MRMESH_API std::string utf8ToSystem (const std::string &utf8)
 
MRMESH_API std::string wideToUtf8 (const wchar_t *wide)
 converts wide null terminating string to UTF8-encoded string
 
const std::string & asString (const std::string &s)
 
const std::string & asU8String (const std::string &s)
 
std::string asString (std::string &&s)
 
std::string asU8String (std::string &&s)
 
std::filesystem::path pathFromUtf8 (const std::string &s)
 
std::filesystem::path pathFromUtf8 (const char *s)
 
std::string utf8string (const std::filesystem::path &path)
 returns filename as UTF8-encoded string
 
MRMESH_API std::string bytesString (size_t size)
 
MRMESH_API bool hasProhibitedChars (const std::string &line)
 returns true if line contains any of OS prohibited chars ('?', '*', '/', '\', '"', '<', '>')
 
MRMESH_API std::string replaceProhibitedChars (const std::string &line, char replacement='_')
 replace OS prohibited chars ('?', '*', '/', '\', '"', '<', '>') with replacement char
 
template<typename T >
Expected< T, std::string > addFileNameInError (Expected< T, std::string > v, const std::filesystem::path &file)
 if (v) contains an error, then appends given file name to that error
 
MRMESH_API char * formatNoTrailingZeros (char *fmt, double v, int digitsAfterPoint, int precision=6)
 
MRMESH_API double roundToPrecision (double v, int precision)
 returns given value rounded to given number of decimal digits
 
float roundToPrecision (float v, int precision)
 returns given value rounded to given number of decimal digits
 
std::string getCancelMessage (const std::filesystem::path &path)
 
MRMESH_API VertScalars computeSurfaceDistances (const Mesh &mesh, const VertBitSet &startVertices, float maxDist=FLT_MAX, const VertBitSet *region=nullptr, int maxVertUpdates=3)
 
MRMESH_API VertScalars computeSurfaceDistances (const Mesh &mesh, const VertBitSet &startVertices, const VertBitSet &targetVertices, float maxDist=FLT_MAX, const VertBitSet *region=nullptr, int maxVertUpdates=3)
 
MRMESH_API VertScalars computeSurfaceDistances (const Mesh &mesh, const HashMap< VertId, float > &startVertices, float maxDist=FLT_MAX, const VertBitSet *region=nullptr, int maxVertUpdates=3)
 
MRMESH_API VertScalars computeSurfaceDistances (const Mesh &mesh, const MeshTriPoint &start, const MeshTriPoint &end, const VertBitSet *region=nullptr, bool *endReached=nullptr, int maxVertUpdates=3)
 
MRMESH_API VertScalars computeSurfaceDistances (const Mesh &mesh, const MeshTriPoint &start, float maxDist=FLT_MAX, const VertBitSet *region=nullptr, int maxVertUpdates=3)
 
MRMESH_API VertScalars computeSurfaceDistances (const Mesh &mesh, const std::vector< MeshTriPoint > &starts, float maxDist=FLT_MAX, const VertBitSet *region=nullptr, int maxVertUpdates=3)
 
bool operator< (const VertDistance &a, const VertDistance &b)
 smaller distance to be the first
 
std::string toString (PathError error)
 
MRMESH_API Expected< SurfacePath, PathErrorcomputeSurfacePath (const MeshPart &mp, const MeshTriPoint &start, const MeshTriPoint &end, int maxGeodesicIters=5, const VertBitSet *vertRegion=nullptr, VertScalars *outSurfaceDistances=nullptr)
 
MRMESH_API Expected< SurfacePath, PathErrorcomputeGeodesicPath (const Mesh &mesh, const MeshTriPoint &start, const MeshTriPoint &end, GeodesicPathApprox atype, int maxGeodesicIters=100)
 the maximum number of iterations to reduce approximate path length and convert it in geodesic path
 
MRMESH_API Expected< SurfacePath, PathErrorcomputeGeodesicPathApprox (const Mesh &mesh, const MeshTriPoint &start, const MeshTriPoint &end, GeodesicPathApprox atype)
 
MRMESH_API Expected< SurfacePath, PathErrorcomputeFastMarchingPath (const MeshPart &mp, const MeshTriPoint &start, const MeshTriPoint &end, const VertBitSet *vertRegion=nullptr, VertScalars *outSurfaceDistances=nullptr)
 
MRMESH_API SurfacePath computeSteepestDescentPath (const MeshPart &mp, const VertScalars &field, const MeshTriPoint &start, const ComputeSteepestDescentPathSettings &settings={})
 
MRMESH_API void computeSteepestDescentPath (const MeshPart &mp, const VertScalars &field, const MeshTriPoint &start, SurfacePath *outPath, const ComputeSteepestDescentPathSettings &settings={})
 
MRMESH_API MeshEdgePoint findSteepestDescentPoint (const MeshPart &mp, const VertScalars &field, VertId v)
 finds the point along minus maximal gradient on the boundary of first ring boundary around given vertex
 
MRMESH_API MeshEdgePoint findSteepestDescentPoint (const MeshPart &mp, const VertScalars &field, const MeshEdgePoint &ep)
 finds the point along minus maximal gradient on the boundary of triangles around given point (the boundary of left and right edge triangles' union in case (ep) is inner edge point)
 
MRMESH_API MeshEdgePoint findSteepestDescentPoint (const MeshPart &mp, const VertScalars &field, const MeshTriPoint &tp)
 finds the point along minus maximal gradient on the boundary of triangles around given point (the boundary of the triangle itself in case (tp) is inner triangle point)
 
MRMESH_API UndirectedEdgeBitSet findExtremeEdges (const Mesh &mesh, const VertScalars &field, ExtremeEdgeType type)
 computes all edges in the mesh, where the field not-increases both in left and right triangles
 
MRMESH_API HashMap< VertId, VertIdcomputeClosestSurfacePathTargets (const Mesh &mesh, const VertBitSet &starts, const VertBitSet &ends, const VertBitSet *vertRegion=nullptr, VertScalars *outSurfaceDistances=nullptr)
 
MRMESH_API SurfacePaths getSurfacePathsViaVertices (const Mesh &mesh, const VertBitSet &vs)
 
MRMESH_API float surfacePathLength (const Mesh &mesh, const SurfacePath &surfacePath)
 computes the length of surface path
 
MRMESH_API Contour3f surfacePathToContour3f (const Mesh &mesh, const SurfacePath &line)
 converts lines on mesh in 3D contours by computing coordinate of each point
 
MRMESH_API Contours3f surfacePathsToContours3f (const Mesh &mesh, const SurfacePaths &lines)
 
MRMESH_API EdgeLoop surroundingContour (const Mesh &mesh, std::vector< EdgeId > includeEdges, const EdgeMetric &edgeMetric, const Vector3f &dir)
 Find the best closed edge loop passing through given edges, which minimizes the sum of given edge metric.
 
MRMESH_API EdgeLoop surroundingContour (const Mesh &mesh, std::vector< VertId > keyVertices, const EdgeMetric &edgeMetric, const Vector3f &dir)
 Find the best closed edge loop passing through given vertices, which minimizes the sum of given edge metric.
 
MRMESH_API Expected< Contours2dcreateSymbolContours (const SymbolMeshParams &params)
 
MRMESH_API void addBaseToPlanarMesh (Mesh &mesh, float zOffset=1.0f)
 
MRMESH_API Expected< MeshcreateSymbolsMesh (const SymbolMeshParams &params)
 
MRMESH_API void SetCurrentThreadName (const char *name)
 
MRMESH_API std::filesystem::path GetExeDirectory ()
 
MRMESH_API std::filesystem::path GetResourcesDirectory ()
 
MRMESH_API std::filesystem::path GetFontsDirectory ()
 
MRMESH_API std::filesystem::path GetLibsDirectory ()
 
MRMESH_API std::filesystem::path GetEmbeddedPythonDirectory ()
 
MRMESH_API std::filesystem::path getUserConfigDir ()
 
MRMESH_API std::filesystem::path getUserConfigFilePath ()
 
MRMESH_API std::filesystem::path GetTempDirectory ()
 
MRMESH_API std::filesystem::path GetHomeDirectory ()
 
MRMESH_API std::string GetClipboardText ()
 
MRMESH_API void SetClipboardText (const std::string &text)
 
MRMESH_API std::string GetMRVersionString ()
 
MRMESH_API void OpenLink (const std::string &url)
 
MRMESH_API bool OpenDocument (const std::filesystem::path &path)
 
MRMESH_API std::string GetCpuId ()
 
MRMESH_API std::string GetDetailedOSName ()
 
MRMESH_API std::string getOSNoSpaces ()
 
MRMESH_API void setNewHandlerIfNeeded ()
 
MRMESH_API std::string getCurrentStacktrace ()
 returns string representation of the current stacktrace
 
MRMESH_API Expected< Mesh, std::string > terrainTriangulation (std::vector< Vector3f > points, ProgressCallback cb={})
 
MRMESH_API bool isTIFFFile (const std::filesystem::path &path)
 
MRMESH_API Expected< TiffParameters, std::string > readTiffParameters (const std::filesystem::path &path)
 
MRMESH_API VoidOrErrStr readRawTiff (const std::filesystem::path &path, RawTiffOutput &output)
 
MRMESH_API VoidOrErrStr writeRawTiff (const uint8_t *bytes, const std::filesystem::path &path, const BaseTiffParameters &params)
 
MRMESH_API void printTimingTreeAtEnd (bool on, double minTimeSec=0.1)
 
MRMESH_API void printCurrentTimerBranch ()
 prints current timer branch
 
MRMESH_API void printTimingTreeAndStop (double minTimeSec=0.1)
 
MRMESH_API void registerThreadRootTimeRecord (ThreadRootTimeRecord &root)
 installs given record in the current thread (no record must be installed before)
 
MRMESH_API void unregisterThreadRootTimeRecord (ThreadRootTimeRecord &root)
 un-installs given record in the current thread
 
MRMESH_API Expected< ToolPathResult, std::string > constantZToolPath (const MeshPart &mp, const ToolPathParams &params)
 
MRMESH_API Expected< ToolPathResult, std::string > lacingToolPath (const MeshPart &mp, const ToolPathParams &params, Axis cutDirection)
 
MRMESH_API Expected< ToolPathResult, std::string > constantCuspToolPath (const MeshPart &mp, const ConstantCuspParams &params)
 
MRMESH_API std::shared_ptr< ObjectGcodeexportToolPathToGCode (const std::vector< GCommand > &commands)
 
MRMESH_API VoidOrErrStr interpolateLines (std::vector< GCommand > &commands, const LineInterpolationParams &params, Axis axis)
 
MRMESH_API VoidOrErrStr interpolateArcs (std::vector< GCommand > &commands, const ArcInterpolationParams &params, Axis axis)
 
MRMESH_API FaceBitSet smoothSelection (Mesh &mesh, const FaceBitSet &region, float expandOffset, float shrinkOffset)
 
MRMESH_API Mesh makeTorus (float primaryRadius=1.0f, float secondaryRadius=0.1f, int primaryResolution=16, int secondaryResolution=16, std::vector< Vector3f > *points=nullptr)
 
MRMESH_API Mesh makeOuterHalfTorus (float primaryRadius=1.0f, float secondaryRadius=0.1f, int primaryResolution=16, int secondaryResolution=16, std::vector< Vector3f > *points=nullptr)
 
MRMESH_API Mesh makeTorusWithUndercut (float primaryRadius=1.0f, float secondaryRadiusInner=0.1f, float secondaryRadiusOuter=0.2f, int primaryResolution=16, int secondaryResolution=16, std::vector< Vector3f > *points=nullptr)
 
MRMESH_API Mesh makeTorusWithSpikes (float primaryRadius=1.0f, float secondaryRadiusInner=0.1f, float secondaryRadiusOuter=0.5f, int primaryResolution=16, int secondaryResolution=16, std::vector< Vector3f > *points=nullptr)
 
MRMESH_API Mesh makeTorusWithComponents (float primaryRadius=1.0f, float secondaryRadius=0.1f, int primaryResolution=16, int secondaryResolution=16, std::vector< Vector3f > *points=nullptr)
 
MRMESH_API Mesh makeTorusWithSelfIntersections (float primaryRadius=1.0f, float secondaryRadius=0.1f, int primaryResolution=16, int secondaryResolution=16, std::vector< Vector3f > *points=nullptr)
 
template<typename T >
bool doTrianglesIntersect (Vector3< T > a, Vector3< T > b, Vector3< T > c, Vector3< T > d, Vector3< T > e, Vector3< T > f)
 
template<typename T >
bool doesEdgeXySeparate (const Vector3< T > &x, const Vector3< T > &y, const Vector3< T > &z, const Vector3< T > &u, const Vector3< T > &v, const Vector3< T > &w, Vector3< T > d)
 returns true if a plane containing edge XY separates point Z from triangle UVW
 
template<typename T >
bool doTrianglesIntersectExt (const Vector3< T > &a, const Vector3< T > &b, const Vector3< T > &c, const Vector3< T > &d, const Vector3< T > &e, const Vector3< T > &f)
 
template<typename T >
bool doTriangleLineIntersect (const Vector3< T > &a, const Vector3< T > &b, const Vector3< T > &c, const Vector3< T > &d, const Vector3< T > &e)
 checks whether triangle ABC and infinite line DE intersect
 
template<typename T >
bool doTriangleSegmentIntersect (const Vector3< T > &a, const Vector3< T > &b, const Vector3< T > &c, const Vector3< T > &d, const Vector3< T > &e)
 checks whether triangle ABC and segment DE intersect
 
template<typename T >
Vector3< T > findTriangleSegmentIntersection (const Vector3< T > &a, const Vector3< T > &b, const Vector3< T > &c, const Vector3< T > &d, const Vector3< T > &e)
 this function input should have intersection
 
template<typename T >
std::optional< TriIntersectResultrayTriangleIntersect_ (const Vector3< T > &oriA, const Vector3< T > &oriB, const Vector3< T > &oriC, const IntersectionPrecomputes< T > &prec)
 
std::optional< TriIntersectResultrayTriangleIntersect (const Vector3f &oriA, const Vector3f &oriB, const Vector3f &oriC, const IntersectionPrecomputes< float > &prec)
 
std::optional< TriIntersectResultrayTriangleIntersect (const Vector3f &oriA, const Vector3f &oriB, const Vector3f &oriC, const Vector3f &dir)
 
std::optional< TriIntersectResultrayTriangleIntersect (const Vector3d &oriA, const Vector3d &oriB, const Vector3d &oriC, const IntersectionPrecomputes< double > &prec)
 
std::optional< TriIntersectResultrayTriangleIntersect (const Vector3d &oriA, const Vector3d &oriB, const Vector3d &oriC, const Vector3d &dir)
 
MRMESH_API float TriDist (Vector3f &p, Vector3f &q, const Vector3f s[3], const Vector3f t[3])
 computes the closest points on two triangles, and returns the squared distance between them.
 
MRMESH_API void SegPoints (Vector3f &VEC, Vector3f &X, Vector3f &Y, const Vector3f &P, const Vector3f &A, const Vector3f &Q, const Vector3f &B)
 Returns closest points between an segment pair.
 
template<typename T >
circumcircleDiameterSq (const Vector3< T > &a, const Vector3< T > &b, const Vector3< T > &c)
 
template<typename T >
circumcircleDiameter (const Vector3< T > &a, const Vector3< T > &b, const Vector3< T > &c)
 
template<typename T >
Vector3< T > circumcircleCenter (const Vector3< T > &a, const Vector3< T > &b)
 Computes the center of the the triangle's 0AB circumcircle.
 
template<typename T >
Vector3< T > circumcircleCenter (const Vector3< T > &a, const Vector3< T > &b, const Vector3< T > &c)
 Computes the center of the the triangle's ABC circumcircle.
 
template<typename T >
bool circumballCenters (const Vector3< T > &a, const Vector3< T > &b, const Vector3< T > &c, T radius, Vector3< T > &centerPos, Vector3< T > &centerNeg)
 
template<typename T >
minTriangleAngleSin (const Vector3< T > &a, const Vector3< T > &b, const Vector3< T > &c)
 
template<typename T >
minTriangleAngle (const Vector3< T > &a, const Vector3< T > &b, const Vector3< T > &c)
 
template<typename T >
triangleAspectRatio (const Vector3< T > &a, const Vector3< T > &b, const Vector3< T > &c)
 
template<typename T >
Vector3< T > dirDblArea (const Triangle3< T > &t)
 computes directed double area of given triangle
 
template<typename T >
Vector3< T > dirDblArea (const Vector3< T > &p, const Vector3< T > &q, const Vector3< T > &r)
 computes directed double area of given triangle
 
template<typename T >
Vector3< T > normal (const Vector3< T > &p, const Vector3< T > &q, const Vector3< T > &r)
 computes unitNormal of given triangle
 
template<typename T >
dblAreaSq (const Vector3< T > &p, const Vector3< T > &q, const Vector3< T > &r)
 computes the square of double area of given triangle
 
template<typename T >
dblArea (const Vector3< T > &p, const Vector3< T > &q, const Vector3< T > &r)
 computes twice the area of given triangle
 
template<typename T >
area (const Vector3< T > &p, const Vector3< T > &q, const Vector3< T > &r)
 computes twice the area of given triangle
 
template<typename T >
dblArea (const Vector2< T > &p, const Vector2< T > &q, const Vector2< T > &r)
 computes twice the area of given triangle
 
template<typename T >
area (const Vector2< T > &p, const Vector2< T > &q, const Vector2< T > &r)
 computes twice the area of given triangle
 
template<typename T >
Triangle3< T > makeDegenerate (const Triangle3< T > &t)
 make degenerate triangle (all 3 points on a line) that maximally resembles the input one and has the same centroid
 
template<typename T >
Triangle3< T > triangleWithNormal (const Triangle3< T > &t, const Vector3< T > &n)
 
template<typename T >
dihedralAngleSin (const Vector3< T > &leftNorm, const Vector3< T > &rightNorm, const Vector3< T > &edgeVec)
 
template<typename T >
dihedralAngleCos (const Vector3< T > &leftNorm, const Vector3< T > &rightNorm)
 
template<typename T >
dihedralAngle (const Vector3< T > &leftNorm, const Vector3< T > &rightNorm, const Vector3< T > &edgeVec)
 
template<typename T >
std::optional< Vector2< T > > posFromTriEdgeLengths (T a, T b, T c)
 
template<typename T >
std::optional< T > quadrangleOtherDiagonal (T a, T b, T c, T a1, T b1)
 
MRMESH_API Expected< std::vector< EdgeLoop >, std::string > detectBasisTunnels (const MeshPart &mp, EdgeMetric metric={}, ProgressCallback progressCallback={})
 
MRMESH_API Expected< FaceBitSet, std::string > detectTunnelFaces (const MeshPart &mp, const DetectTunnelSettings &settings={})
 
template<size_t I, typename T >
constexpr const T & get (const Vector2< T > &v) noexcept
 
template<size_t I, typename T >
constexpr T & get (Vector2< T > &v) noexcept
 
template<size_t I, typename T >
constexpr const T & get (const Vector3< T > &v) noexcept
 
template<size_t I, typename T >
constexpr T & get (Vector3< T > &v) noexcept
 
template<size_t I, typename T >
constexpr const T & get (const Vector4< T > &v) noexcept
 
template<size_t I, typename T >
constexpr T & get (Vector4< T > &v) noexcept
 
template<size_t I, typename T >
constexpr const Matrix2< T >::VectorType & get (const Matrix2< T > &m) noexcept
 
template<size_t I, typename T >
constexpr Matrix2< T >::VectorType & get (Matrix2< T > &m) noexcept
 
template<size_t I, typename T >
constexpr const Matrix3< T >::VectorType & get (const Matrix3< T > &m) noexcept
 
template<size_t I, typename T >
constexpr Matrix3< T >::VectorType & get (Matrix3< T > &m) noexcept
 
template<size_t I, typename T >
constexpr const Matrix4< T >::VectorType & get (const Matrix4< T > &m) noexcept
 
template<size_t I, typename T >
constexpr Matrix4< T >::VectorType & get (Matrix4< T > &m) noexcept
 
template<size_t I, typename V >
constexpr const std::tuple_element< I, AffineXf< V > >::type & get (const AffineXf< V > &m) noexcept
 
template<size_t I, typename V >
constexpr std::tuple_element< I, AffineXf< V > >::type & get (AffineXf< V > &m) noexcept
 
template<size_t I, typename T >
constexpr int get (const MR::Id< T > &id) noexcept
 
template<size_t I, typename T >
constexpr int & get (MR::Id< T > &id) noexcept
 
template<size_t I>
constexpr const uint8_t & get (const Color &c) noexcept
 
template<size_t I>
constexpr uint8_t & get (Color &c) noexcept
 
MRMESH_API std::optional< VertBitSetpointUniformSampling (const PointCloud &pointCloud, const UniformSamplingSettings &settings)
 
MRMESH_API std::optional< PointCloudmakeUniformSampledCloud (const PointCloud &pointCloud, const UniformSamplingSettings &settings)
 
MRMESH_API Expected< Mesh, std::string > uniteManyMeshes (const std::vector< const Mesh * > &meshes, const UniteManyMeshesParams &params={})
 
MRMESH_API FloatGrid meshToLevelSet (const MeshPart &mp, const AffineXf3f &xf, const Vector3f &voxelSize, float surfaceOffset=3, ProgressCallback cb={})
 
MRMESH_API FloatGrid meshToDistanceField (const MeshPart &mp, const AffineXf3f &xf, const Vector3f &voxelSize, float surfaceOffset=3, ProgressCallback cb={})
 
MRMESH_API void evalGridMinMax (const FloatGrid &grid, float &min, float &max)
 
MRMESH_API Expected< VdbVolume, std::string > meshToVolume (const Mesh &mesh, const MeshToVolumeParams &params={})
 
MRMESH_API VdbVolume floatGridToVdbVolume (const FloatGrid &grid)
 
MRMESH_API FloatGrid simpleVolumeToDenseGrid (const SimpleVolume &simpleVolume, ProgressCallback cb={})
 
MRMESH_API VdbVolume simpleVolumeToVdbVolume (const SimpleVolume &simpleVolume, ProgressCallback cb={})
 
MRMESH_API Expected< SimpleVolume, std::string > vdbVolumeToSimpleVolume (const VdbVolume &vdbVolume, const Box3i &activeBox=Box3i(), ProgressCallback cb={})
 
MRMESH_API Expected< SimpleVolumeU16, std::string > vdbVolumeToSimpleVolumeU16 (const VdbVolume &vdbVolume, const Box3i &activeBox=Box3i(), ProgressCallback cb={})
 
MRMESH_API Expected< MeshgridToMesh (const FloatGrid &grid, const GridToMeshSettings &settings)
 converts OpenVDB Grid into mesh using Dual Marching Cubes algorithm
 
MRMESH_API Expected< MeshgridToMesh (FloatGrid &&grid, const GridToMeshSettings &settings)
 
MRMESH_API VoidOrErrStr makeSignedWithFastWinding (FloatGrid &grid, const Vector3f &voxelSize, const Mesh &refMesh, const AffineXf3f &meshToGridXf={}, std::shared_ptr< IFastWindingNumber > fwn={}, ProgressCallback cb={})
 
MRMESH_API Expected< MeshlevelSetDoubleConvertion (const MeshPart &mp, const AffineXf3f &xf, float voxelSize, float offsetA, float offsetB, float adaptivity=0.0f, std::shared_ptr< IFastWindingNumber > fwn={}, ProgressCallback cb={})
 
openvdb::FloatGrid & ovdb (OpenVdbFloatGrid &v)
 
const openvdb::FloatGrid & ovdb (const OpenVdbFloatGrid &v)
 
FloatGrid MakeFloatGrid (openvdb::FloatGrid::Ptr &&p)
 makes MR::FloatGrid shared pointer taking the contents of the input pointer
 
template<typename T , typename I >
auto begin (const Vector< T, I > &a)
 
template<typename T , typename I >
auto begin (Vector< T, I > &a)
 
template<typename T , typename I >
auto end (const Vector< T, I > &a)
 
template<typename T , typename I >
auto end (Vector< T, I > &a)
 
template<typename T , typename I >
getAt (const Vector< T, I > &a, I id, T def={})
 given some Vector and a key, returns the value associated with the key, or default value if key is invalid or outside the Vector
 
MRMESH_API Vector< Vector3f, VertIdvertexAttributeGradient (const Mesh &mesh, const VertScalars &vertexAttribute)
 Calculates gradient for each vertex in mesh, based on vertexAttribute.
 
ViewportMask operator& (ViewportMask a, ViewportMask b)
 
ViewportMask operator| (ViewportMask a, ViewportMask b)
 
ViewportMask operator^ (ViewportMask a, ViewportMask b)
 
bool operator== (const ViewportIterator &a, const ViewportIterator &b)
 
auto begin (ViewportMask mask)
 
auto end (ViewportMask)
 
OutEdge opposite (OutEdge e)
 
MRMESH_API void expandVoxelsMask (VoxelBitSet &mask, const VolumeIndexer &indexer, int expansion=1)
 expands VoxelBitSet with given number of steps
 
MRMESH_API void shrinkVoxelsMask (VoxelBitSet &mask, const VolumeIndexer &indexer, int shrinkage=1)
 shrinks VoxelBitSet with given number of steps
 
MRMESH_API Expected< MR::Mesh, std::string > meshFromVoxelsMask (const VdbVolume &volume, const VoxelBitSet &mask)
 Creates mesh from voxels mask.
 
MRMESH_API Expected< MR::Mesh, std::string > segmentVolume (const VdbVolume &volume, const std::vector< std::pair< Vector3f, Vector3f > > &pairs, const VolumeSegmentationParameters &params=VolumeSegmentationParameters())
 Simple segment volume.
 
MRMESH_API Expected< VoxelBitSet, std::string > segmentVolumeByGraphCut (const SimpleVolume &densityVolume, float k, const VoxelBitSet &sourceSeeds, const VoxelBitSet &sinkSeeds, ProgressCallback cb={})
 Segment voxels of given volume on two sets using graph-cut, returning source set.
 
MRMESH_API VoxelsMetric voxelsExponentMetric (const VdbVolume &voxels, const VoxelMetricParameters &parameters, float modifier=-1.0f)
 e^(modifier*(dens1+dens2))
 
MRMESH_API VoxelsMetric voxelsSumDiffsMetric (const VdbVolume &voxels, const VoxelMetricParameters &parameters)
 sum of dense differences with start and stop voxels
 
MRMESH_API std::vector< size_t > buildSmallestMetricPath (const VdbVolume &voxels, const VoxelsMetric &metric, size_t start, size_t finish, ProgressCallback cb={})
 builds shortest path in given metric from start to finish voxels; if no path can be found then empty path is returned
 
template<typename Volume >
VoidOrErrStr mergeVolumePart (Mesh &mesh, std::vector< EdgePath > &cutContours, Volume &&volume, float leftCutPosition, float rightCutPosition, const MergeVolumePartSettings &settings={})
 Merge one mesh with another generated from a voxel volume part.
 
template<typename Volume >
Expected< Mesh, std::string > volumeToMeshByParts (const VolumePartBuilder< Volume > &builder, const Vector3i &dimensions, const Vector3f &voxelSize, const VolumeToMeshByPartsSettings &settings={}, const MergeVolumePartSettings &mergeSettings={})
 converts a voxel volume into a mesh without full memory loading
 
MRMESH_API float voxelizeAndComputeVolume (const std::vector< std::shared_ptr< Mesh > > &meshes, const AffineXf3f &xf, const Vector3f &voxelSize)
 
MRMESH_API VoidOrErrStr decompressZip (const std::filesystem::path &zipFile, const std::filesystem::path &targetFolder, const char *password=nullptr)
 decompresses given zip-file into given folder
 
MRMESH_API VoidOrErrStr decompressZip (std::istream &zipStream, const std::filesystem::path &targetFolder, const char *password=nullptr)
 decompresses given binary stream (containing the data of a zip file only) into given folder
 
MRMESH_API VoidOrErrStr compressZip (const std::filesystem::path &zipFile, const std::filesystem::path &sourceFolder, const std::vector< std::filesystem::path > &excludeFiles={}, const char *password=nullptr, ProgressCallback cb={})
 compresses given folder in given zip-file
 
MRMESH_API VoidOrErrStr zlibCompressStream (std::istream &in, std::ostream &out, int level=-1)
 compress the input data using the Deflate algorithm
 
MRMESH_API VoidOrErrStr zlibDecompressStream (std::istream &in, std::ostream &out)
 
MRMESHPY_API void loadMRMeshPyModule ()
 
template<class HistoryActionType , typename... Args>
void AppendHistory (Args &&... args)
 
template<class HistoryActionType >
void AppendHistory (std::shared_ptr< HistoryActionType > action)
 
MRVIEWER_API void FilterHistoryByCondition (HistoryStackFilter filteringCondition, bool deepFiltering=true)
 
MRVIEWER_API void createShader (const std::string &shader_name, const std::string &vert_source, const std::string &frag_source, GLuint &prog_id, const DisabledWarnings &suppressedWarns={})
 
MRVIEWER_API void destroyShader (GLuint id)
 
MRVIEWER_API std::filesystem::path openFileDialog (const FileParameters &params={})
 
MRVIEWER_API void openFileDialogAsync (std::function< void(const std::filesystem::path &)> callback, const FileParameters &params={})
 
MRVIEWER_API std::vector< std::filesystem::path > openFilesDialog (const FileParameters &params={})
 
MRVIEWER_API void openFilesDialogAsync (std::function< void(const std::vector< std::filesystem::path > &)> callback, const FileParameters &params={})
 
MRVIEWER_API std::filesystem::path openFolderDialog (std::filesystem::path baseFolder={})
 
MRVIEWER_API std::vector< std::filesystem::path > openFoldersDialog (std::filesystem::path baseFolder={})
 
MRVIEWER_API std::filesystem::path saveFileDialog (const FileParameters &params={})
 
MRVIEWER_API void saveFileDialogAsync (std::function< void(const std::filesystem::path &)> callback, const FileParameters &params={})
 
MRVIEWER_API Json::Value GetSystemInfoJson ()
 
int loadGL ()
 
MRVIEWER_API std::string getLinesVertexShader ()
 
MRVIEWER_API std::string getLinesFragmentShader (bool alphaSort)
 
MRVIEWER_API std::string getLinesJointVertexShader ()
 
MRVIEWER_API std::string getLinesJointFragmentShader ()
 
MRVIEWER_API std::string getLinesPickerVertexShader ()
 
MRVIEWER_API std::string getLinesJointPickerVertexShader ()
 
MRVIEWER_API std::string getMeshVerticesShader ()
 
MRVIEWER_API std::string getMeshFragmentShader (bool gl4, bool alphaSort)
 
MRVIEWER_API std::string getMeshFragmentShaderArgumetsBlock ()
 
MRVIEWER_API std::string getMeshFragmentShaderColoringBlock ()
 
std::string getMouseModeString (MouseMode mode)
 
MRVIEWER_API void excludeLoneEdgesWithHistory (const std::shared_ptr< ObjectMesh > &objMesh)
 
MRVIEWER_API void excludeAllEdgesWithHistory (const std::shared_ptr< ObjectMesh > &objMesh)
 
MRVIEWER_API void mapEdgesWithHistory (const std::shared_ptr< ObjectMesh > &objMesh, const WholeEdgeMap &emap)
 
MRVIEWER_API void mapEdgesWithHistory (const std::shared_ptr< ObjectMesh > &objMesh, const WholeEdgeHashMap &emap)
 
MRVIEWER_API void mapEdgesWithHistory (const std::shared_ptr< ObjectMesh > &objMesh, const UndirectedEdgeBMap &emap)
 
MRVIEWER_API void packPointsWithHistory (const std::shared_ptr< ObjectPoints > &objPoints, Reorder reoder)
 
MRVIEWER_API void packPointsWithHistory (const std::shared_ptr< ObjectPoints > &objPoints, Reorder reoder, VertBitSet newValidVerts)
 
MRVIEWER_API HoleEdgePoint findClosestToMouseHoleEdge (const Vector2i &mousePos, const std::shared_ptr< ObjectMeshHolder > &objMesh, const std::vector< EdgeId > &holeRepresentativeEdges, float accuracy=5.5f, bool attractToVert=false, float cornerAccuracy=10.5f)
 
MRVIEWER_API HoleEdgePoint findClosestToMouseEdge (const Vector2i &mousePos, const std::vector< std::shared_ptr< ObjectLinesHolder > > &objsLines, float accuracy=5.5f)
 
HoleEdgePoint findClosestToMouseEdge (const Vector2i &mousePos, const std::vector< std::shared_ptr< ObjectLines > > &objsLines, float accuracy=5.5f)
 
template<typename F , typename... Args>
void pythonAppendOrRun (F func, Args &&... args)
 
template<typename R , typename... Args>
auto pythonRunFromGUIThread (std::function< R(Args...)> &&f) -> std::function< void(Args...)>
 
template<typename F >
auto pythonRunFromGUIThread (F &&f)
 
template<typename R , typename T , typename... Args>
auto pythonRunFromGUIThread (R(T::*memFunction)(Args...))
 
MRVIEWER_API void setTextureFilterType (FilterType filter, bool dim3d=false)
 
MRVIEWER_API void setTextureWrapType (WrapType wrap, bool dim3d=false)
 
MRVIEWER_API GLint bindVertexAttribArray (const BindVertexAttribArraySettings &settings)
 
template<typename T , template< typename, typename... > class C, typename... args>
GLint bindVertexAttribArray (const GLuint program_shader, const char *name, GlBuffer &buf, const C< T, args... > &V, int baseTypeElementsNumber, bool refresh, bool forceUse=false)
 
template<typename T , std::size_t N>
GLint bindVertexAttribArray (const GLuint program_shader, const char *name, GlBuffer &buf, const std::array< T, N > &V, int baseTypeElementsNumber, bool refresh, bool forceUse=false)
 
int getDepthFunctionLess (DepthFunction funcType)
 
int getDepthFunctionLEqual (DepthFunction funcType)
 
MRVIEWER_API Vector2i calcTextureRes (int bufferSize, int maxTextWidth)
 
MRVIEWER_API const Vector2fGetAvailableLineWidthRange ()
 
MRVIEWER_API void pushNotification (const RibbonNotification &notification)
 
template<typename ObjectT , bool visualRepresentationCheck, bool modelCheck>
std::string sceneSelectedExactly (const std::vector< std::shared_ptr< const Object > > &objs, unsigned n)
 
template<typename ObjectT , bool visualRepresentationCheck, bool modelCheck>
std::string sceneSelectedAtLeast (const std::vector< std::shared_ptr< const Object > > &objs, unsigned n)
 
float MRVIEWER_API SelectCurvaturePreference (PathPreference *pp, float menuScaling)
 
MRVIEWER_API FaceBitSet findIncidentFaces (const Viewport &viewport, const BitSet &pixBs, const ObjectMesh &obj, bool onlyVisible=false, bool includeBackfaces=true, const std::vector< ObjectMesh * > *occludingMeshes=nullptr)
 
MRVIEWER_API void appendGPUVisibleFaces (const Viewport &viewport, const BitSet &pixBs, const std::vector< std::shared_ptr< ObjectMesh > > &objects, std::vector< FaceBitSet > &visibleFaces, bool includeBackfaces=true)
 
MRVIEWER_API VertBitSet findVertsInViewportArea (const Viewport &viewport, const BitSet &bsVec, const ObjectPoints &obj, bool includeBackfaces=true, bool onlyVisible=false)
 
MRVIEWER_API std::string getPickerFragmentShader (bool points)
 
MRVIEWER_API std::string getFragmentShaderClippingBlock ()
 
MRVIEWER_API std::string getFragmentShaderPointSizeBlock ()
 
MRVIEWER_API std::string getFragmentShaderOnlyOddBlock (bool sampleMask)
 
MRVIEWER_API std::string getFragmentShaderHeaderBlock (bool gl4, bool alphaSort)
 
MRVIEWER_API std::string getFragmentShaderEndBlock (bool alphaSort)
 
MRVIEWER_API std::string getShaderMainBeginBlock ()
 
template<UnitEnum E>
const UnitInfogetUnitInfo (E unit)=delete
 
template<UnitEnum E>
bool unitsAreEquivalent (E a, E b)
 
template<UnitEnum E, typename T >
detail::Units::MakeFloatingPoint< T > convertUnits (E from, E to, const T &value)
 
template<UnitEnum E>
const UnitToStringParams< E > & getDefaultUnitParams ()
 
template<UnitEnum E>
void setDefaultUnitParams (const UnitToStringParams< E > &newParams)
 
template<UnitEnum E, detail::Units::Scalar T>
MRVIEWER_API std::string valueToString (T value, const UnitToStringParams< E > &params=getDefaultUnitParams< E >())
 
template<detail::Units::Scalar T>
MRVIEWER_API int guessPrecision (T value)
 
template<detail::Units::Scalar T>
MRVIEWER_API int guessPrecision (T min, T max)
 
template<typename T >
requires (VectorTraits<T>::size > 1 && detail::Units::Scalar<typename VectorTraits<T>::BaseType>)
int guessPrecision (T value)
 
template<typename T >
requires (VectorTraits<T>::size > 1 && detail::Units::Scalar<typename VectorTraits<T>::BaseType>)
int guessPrecision (T min, T max)
 
template<UnitEnum E, detail::Units::Scalar T>
MRVIEWER_API std::string valueToImGuiFormatString (T value, const UnitToStringParams< E > &params=getDefaultUnitParams< E >())
 
MRVIEWER_API int launchDefaultViewer (const Viewer::LaunchParams &params, const ViewerSetup &setup)
 
MRVIEWER_API void loadMRViewerDll ()
 
MRVIEWER_API ViewergetViewerInstance ()
 
MRVIEWER_API VoidOrErrStr saveObjectToFile (const Object &obj, const std::filesystem::path &filename, const SaveObjectSettings &settings={})
 save visual object (mesh, lines, points or voxels) to file
 
ImVec2 position (const ViewportRectangle &rect)
 
ImVec2 size (const ViewportRectangle &rect)
 
template<typename T >
Vector4< T > toVec4 (const ViewportRectangle &rect)
 
bool operator== (const SegmEndColors &a, const SegmEndColors &b)
 
bool operator== (const ViewportPointsWithColors &a, const ViewportPointsWithColors &b)
 
bool operator== (const ViewportLinesWithColors &a, const ViewportLinesWithColors &b)
 
MRVIEWER_API std::string getTrivialVertexShader ()
 
MRVIEWER_API std::string getVolumeFragmentShader ()
 
MRVIEWER_API std::string getVolumePickerFragmentShader ()
 
MRVIEWER_API Expected< Json::Value, std::string > parseResponse (const Json::Value &response)
 
MRMESH_API EdgeMetric identityMetric ()
 metric returning 1 for every edge
 
MRMESH_API EdgeMetric edgeLengthMetric (const Mesh &mesh)
 
MRMESH_API EdgeMetric discreteAbsMeanCurvatureMetric (const Mesh &mesh)
 
MRMESH_API EdgeMetric discreteMinusAbsMeanCurvatureMetric (const Mesh &mesh)
 
MRMESH_API EdgeMetric edgeCurvMetric (const Mesh &mesh, float angleSinFactor=2, float angleSinForBoundary=0)
 
MRMESH_API EdgeMetric edgeTableSymMetric (const MeshTopology &topology, const EdgeMetric &metric)
 
EdgeMetric edgeTableMetric (const MeshTopology &topology, const EdgeMetric &metric)
 
MRMESH_API bool isEdgePath (const MeshTopology &topology, const std::vector< EdgeId > &edges)
 returns true if every next edge starts where previous edge ends
 
MRMESH_API bool isEdgeLoop (const MeshTopology &topology, const std::vector< EdgeId > &edges)
 Same as isEdgePath, but start vertex coincide with finish vertex.
 
MRMESH_API void reverse (EdgePath &path)
 
MRMESH_API void reverse (std::vector< EdgePath > &paths)
 reverse every path in the vector
 
MRMESH_API double calcPathMetric (const EdgePath &path, EdgeMetric metric)
 computes summed metric of all edges in the path
 
double calcPathLength (const EdgePath &path, const Mesh &mesh)
 
MRMESH_API Vector3d calcOrientedArea (const EdgeLoop &loop, const Mesh &mesh)
 
MRMESH_API void sortPathsByMetric (std::vector< EdgePath > &paths, EdgeMetric metric)
 sorts given paths in ascending order of their metrics
 
void sortPathsByLength (std::vector< EdgePath > &paths, const Mesh &mesh)
 
MRMESH_API void addLeftBand (const MeshTopology &topology, const EdgeLoop &loop, FaceBitSet &addHere)
 adds all faces incident to loop vertices and located to the left from the loop to given FaceBitSet
 
MRMESH_API EdgePath buildShortestPath (const Mesh &mesh, VertId start, VertId finish, float maxPathLen=FLT_MAX)
 
MRMESH_API EdgePath buildShortestPathBiDir (const Mesh &mesh, VertId start, VertId finish, float maxPathLen=FLT_MAX)
 
MRMESH_API EdgePath buildShortestPathBiDir (const Mesh &mesh, const MeshTriPoint &start, const MeshTriPoint &finish, VertId *outPathStart=nullptr, VertId *outPathFinish=nullptr, float maxPathLen=FLT_MAX)
 
MRMESH_API EdgePath buildShortestPathAStar (const Mesh &mesh, VertId start, VertId finish, float maxPathLen=FLT_MAX)
 
MRMESH_API EdgePath buildShortestPathAStar (const Mesh &mesh, const MeshTriPoint &start, const MeshTriPoint &finish, VertId *outPathStart=nullptr, VertId *outPathFinish=nullptr, float maxPathLen=FLT_MAX)
 
MRMESH_API EdgePath buildShortestPath (const Mesh &mesh, VertId start, const VertBitSet &finish, float maxPathLen=FLT_MAX)
 builds shortest path in euclidean metric from start to finish vertices; if no path can be found then empty path is returned
 
MRMESH_API EdgePath buildSmallestMetricPath (const MeshTopology &topology, const EdgeMetric &metric, VertId start, VertId finish, float maxPathMetric=FLT_MAX)
 builds shortest path in given metric from start to finish vertices; if no path can be found then empty path is returned
 
MRMESH_API EdgePath buildSmallestMetricPathBiDir (const MeshTopology &topology, const EdgeMetric &metric, VertId start, VertId finish, float maxPathMetric=FLT_MAX)
 
MRMESH_API EdgePath buildSmallestMetricPathBiDir (const MeshTopology &topology, const EdgeMetric &metric, const TerminalVertex *starts, int numStarts, const TerminalVertex *finishes, int numFinishes, VertId *outPathStart=nullptr, VertId *outPathFinish=nullptr, float maxPathMetric=FLT_MAX)
 
MRMESH_API EdgePath buildSmallestMetricPath (const MeshTopology &topology, const EdgeMetric &metric, VertId start, const VertBitSet &finish, float maxPathMetric=FLT_MAX)
 builds shortest path in given metric from start to finish vertices; if no path can be found then empty path is returned
 
MRMESH_API std::vector< VertIdgetVertexOrdering (const MeshTopology &topology, VertBitSet region)
 returns all vertices from given region ordered in each connected component in breadth-first way
 
MRMESH_API std::vector< EdgeLoopextractClosedLoops (const MeshTopology &topology, EdgeBitSet &edges)
 finds all closed loops from given edges and removes them from edges
 
MRMESH_API std::vector< EdgeLoopextractClosedLoops (const MeshTopology &topology, const std::vector< EdgeId > &inEdges, EdgeBitSet *outNotLoopEdges=nullptr)
 
MRMESH_API EdgeLoop extractLongestClosedLoop (const Mesh &mesh, const std::vector< EdgeId > &inEdges)
 
MRMESH_API bool dilateRegionByMetric (const MeshTopology &topology, const EdgeMetric &metric, FaceBitSet &region, float dilation, ProgressCallback callback={})
 expands the region (of faces or vertices) on given metric value. returns false if callback also returns false
 
MRMESH_API bool dilateRegionByMetric (const MeshTopology &topology, const EdgeMetric &metric, VertBitSet &region, float dilation, ProgressCallback callback={})
 
MRMESH_API bool dilateRegionByMetric (const MeshTopology &topology, const EdgeMetric &metric, UndirectedEdgeBitSet &region, float dilation, ProgressCallback callback={})
 
MRMESH_API bool erodeRegionByMetric (const MeshTopology &topology, const EdgeMetric &metric, FaceBitSet &region, float dilation, ProgressCallback callback={})
 shrinks the region (of faces or vertices) on given metric value. returns false if callback also returns false
 
MRMESH_API bool erodeRegionByMetric (const MeshTopology &topology, const EdgeMetric &metric, VertBitSet &region, float dilation, ProgressCallback callback={})
 
MRMESH_API bool erodeRegionByMetric (const MeshTopology &topology, const EdgeMetric &metric, UndirectedEdgeBitSet &region, float dilation, ProgressCallback callback={})
 
MRMESH_API bool dilateRegion (const Mesh &mesh, FaceBitSet &region, float dilation, ProgressCallback callback={})
 expands the region (of faces or vertices) on given value (in meters). returns false if callback also returns false
 
MRMESH_API bool dilateRegion (const Mesh &mesh, VertBitSet &region, float dilation, ProgressCallback callback={})
 
MRMESH_API bool dilateRegion (const Mesh &mesh, UndirectedEdgeBitSet &region, float dilation, ProgressCallback callback={})
 
MRMESH_API bool erodeRegion (const Mesh &mesh, FaceBitSet &region, float dilation, ProgressCallback callback={})
 shrinks the region (of faces or vertices) on given value (in meters). returns false if callback also returns false
 
MRMESH_API bool erodeRegion (const Mesh &mesh, VertBitSet &region, float dilation, ProgressCallback callback={})
 
MRMESH_API bool erodeRegion (const Mesh &mesh, UndirectedEdgeBitSet &region, float dilation, ProgressCallback callback={})
 
MRMESH_API int getPathPlaneIntersections (const Mesh &mesh, const EdgePath &path, const Plane3f &plane, std::vector< MeshEdgePoint > *outIntersections=nullptr)
 finds all intersection points between given path and plane, adds them in outIntersections and returns their number
 
MRMESH_API int getPathEdgesInPlane (const Mesh &mesh, const EdgePath &path, const Plane3f &plane, float tolerance=0.0f, std::vector< EdgeId > *outInPlaneEdges=nullptr)
 finds all path edges located in given plane with given tolerance, adds them in outInPlaneEdges and returns their number
 
MRMESH_API Expected< ObjectMesh, std::string > makeObjectMeshFromFile (const std::filesystem::path &file, const MeshLoadSettings &settings={})
 loads mesh from given file in new object
 
MRMESH_API Expected< std::shared_ptr< Object >, std::string > makeObjectFromMeshFile (const std::filesystem::path &file, const MeshLoadSettings &settings={})
 loads mesh from given file and makes either ObjectMesh or ObjectPoints (if the file has points but not faces)
 
MRMESH_API Expected< ObjectLines, std::string > makeObjectLinesFromFile (const std::filesystem::path &file, ProgressCallback callback={})
 loads lines from given file in new object
 
MRMESH_API Expected< ObjectPoints, std::string > makeObjectPointsFromFile (const std::filesystem::path &file, ProgressCallback callback={})
 loads points from given file in new object
 
MRMESH_API Expected< ObjectDistanceMap, std::string > makeObjectDistanceMapFromFile (const std::filesystem::path &file, ProgressCallback callback={})
 loads distance map from given file in new object
 
MRMESH_API Expected< ObjectGcode, std::string > makeObjectGcodeFromFile (const std::filesystem::path &file, ProgressCallback callback={})
 loads gcode from given file in new object
 
MRMESH_API Expected< std::vector< std::shared_ptr< ObjectVoxels > >, std::string > makeObjectVoxelsFromFile (const std::filesystem::path &file, ProgressCallback callback={})
 loads voxels from given file in new object
 
MRMESH_API Expected< std::vector< std::shared_ptr< Object > >, std::string > loadObjectFromFile (const std::filesystem::path &filename, std::string *loadWarn=nullptr, ProgressCallback callback={})
 load object (mesh, lines, points, voxels or scene) from file
 
MRMESH_API bool isSupportedFileInSubfolders (const std::filesystem::path &folder)
 
MRMESH_API Expected< Object, std::string > makeObjectTreeFromFolder (const std::filesystem::path &folder, ProgressCallback callback={})
 loads meshes from given folder in new container object
 
MRMESH_API Expected< std::shared_ptr< Object >, std::string > loadSceneFromAnySupportedFormat (const std::filesystem::path &path, std::string *loadWarn=nullptr, ProgressCallback callback={})
 
MRMESH_API bool orient3d (const Vector3i &a, const Vector3i &b, const Vector3i &c)
 
bool orient3d (const Vector3i &a, const Vector3i &b, const Vector3i &c, const Vector3i &d)
 
MRMESH_API bool orient3d (const std::array< PreciseVertCoords, 4 > &vs)
 first sorts the indices in ascending order, then calls the predicate for sorted points
 
MRMESH_API bool orient3d (const PreciseVertCoords *vs)
 
MRMESH_API TriangleSegmentIntersectResult doTriangleSegmentIntersect (const std::array< PreciseVertCoords, 5 > &vs)
 
MRMESH_API Vector3f findTriangleSegmentIntersectionPrecise (const Vector3f &a, const Vector3f &b, const Vector3f &c, const Vector3f &d, const Vector3f &e, CoordinateConverters converters)
 
template<typename T >
Vector2< T > fromEigen (const Eigen::Matrix< T, 2, 1 > &ev)
 
template<typename T >
Eigen::Matrix< T, 2, 1 > toEigen (const Vector2< T > &v)
 
template<typename T >
Eigen::Matrix< T, 2, 2 > toEigen (const SymMatrix2< T > &m)
 
template<typename T >
Eigen::Matrix< T, 2, 2 > toEigen (const Matrix2< T > &m)
 
template<typename T >
Matrix2< T > fromEigen (const Eigen::Matrix< T, 2, 2 > &m)
 
template<typename T >
Vector3< T > fromEigen (const Eigen::Matrix< T, 3, 1 > &ev)
 
template<typename T >
Eigen::Matrix< T, 3, 1 > toEigen (const Vector3< T > &v)
 
template<typename T >
Eigen::Matrix< T, 3, 3 > toEigen (const SymMatrix3< T > &m)
 
template<typename T >
Eigen::Matrix< T, 3, 3 > toEigen (const Matrix3< T > &m)
 
template<typename T >
Matrix3< T > fromEigen (const Eigen::Matrix< T, 3, 3 > &m)
 
template<typename T >
Eigen::Matrix< T, 4, 4 > toEigen (const SymMatrix4< T > &m)
 
template<typename T >
Eigen::Matrix< T, 4, 4 > toEigen (const Matrix4< T > &m)
 
template<typename T >
Matrix4< T > fromEigen (const Eigen::Matrix< T, 4, 4 > &m)
 
template<typename T >
Vector4< T > fromEigen (const Eigen::Matrix< T, 4, 1 > &ev)
 
template<typename T >
Eigen::Matrix< T, 4, 1 > toEigen (const Vector4< T > &v)
 
template<typename T >
Eigen::Matrix< T, 4, 1 > toEigen (const Vector3< T > &v, T w)
 
template<typename T >
Quaternion< T > fromEigen (const Eigen::Quaternion< T > &eq)
 
template<typename T >
Eigen::Quaternion< T > toEigen (const Quaternion< T > &q)
 

Variables

constexpr float cQuietNan = std::numeric_limits<float>::quiet_NaN()
 
constexpr int cQuietNanBits = std::bit_cast< int >( cQuietNan )
 
constexpr NoInit noInit
 
template<typename T >
struct MRMESH_CLASS NoDefInit
 
class MRMESH_CLASS EdgeTag
 
class MRMESH_CLASS UndirectedEdgeTag
 
class MRMESH_CLASS FaceTag
 
class MRMESH_CLASS VertTag
 
class MRMESH_CLASS PixelTag
 
class MRMESH_CLASS VoxelTag
 
class MRMESH_CLASS RegionTag
 
template<typename T >
class MRMESH_CLASS Id
 
template<typename T , typename I >
class MRMESH_CLASS Vector
 
template<typename T , typename I = size_t>
class MRMESH_CLASS Buffer
 
class MRMESH_CLASS BitSet
 
template<typename T >
class MRMESH_CLASS TaggedBitSet
 
template<typename T >
class MRMESH_CLASS SetBitIteratorT
 
template<typename T >
struct MRMESH_CLASS Vector2
 
template<typename T >
struct MRMESH_CLASS Vector3
 
template<typename T , typename I >
struct MRMESH_CLASS BMap
 
class MRMESH_CLASS MeshTopology
 
struct MRMESH_CLASS Mesh
 
struct MRMESH_CLASS MeshPart
 
class MRMESH_CLASS MeshOrPoints
 
struct MRMESH_CLASS PointCloud
 
class MRMESH_CLASS AABBTree
 
class MRMESH_CLASS AABBTreePoints
 
struct MRMESH_CLASS CloudPartMapping
 
struct MRMESH_CLASS PartMapping
 
template<typename V >
class MRMESH_CLASS AABBTreePolyline
 
class MRMESH_CLASS ChangeSceneAction
 
template<typename Tag >
class MRMESH_CLASS ColorMapAggregator
 
template<typename... >
constexpr bool dependent_false = false
 
MRMESH_API const double BadTriangulationMetric
 
class MRMESH_CLASS MeshOrPointsTag
 
MRMESH_API const IOFilters SceneFileFilters
 
MRMESH_API const IOFilters SceneFileWriteFilters
 
MRVIEWER_API DemoPlugin DemoPluginInstance
 
constexpr float cGradientButtonFramePadding = 7.5f
 
constexpr float cTabYOffset = 4.0f
 
constexpr float cTabsInterval = 8.0f
 
constexpr float cTabFrameRounding = 5.0f
 
constexpr float cTabMinimumWidth = 68.0f
 
constexpr float cTabHeight = 28.0f
 
constexpr float cTabLabelMinPadding = 12.0f
 
constexpr float cTopPanelScrollStep = 50.0f
 
constexpr float cTopPanelScrollBtnSize = 20.0f
 
constexpr float cTopPanelAditionalButtonSize = cTabHeight - cTabYOffset
 
constexpr float cSeparateBlocksSpacing = 12.0f
 
constexpr float cRibbonItemInterval = 4.0f
 
constexpr float cRibbonItemMinWidth = 86.0f
 
constexpr float cRibbonButtonWindowPaddingX = 6.0f
 
constexpr float cRibbonButtonWindowPaddingY = 4.0f
 
constexpr float cCheckboxPadding = 2.0f
 
constexpr float cButtonPadding = 8.0f
 
constexpr float cInputPadding = 9.0f
 
constexpr float cDefaultItemSpacing = 8.0f
 
constexpr float cDefaultInnerSpacing = 8.0f
 
constexpr float cDefaultWindowPaddingX = 8.0f
 
constexpr float cDefaultWindowPaddingY = 12.0f
 
constexpr float cItemInfoIndent = 16.0f
 
constexpr float cSmallItemDropSizeModifier = 0.5f
 
constexpr float cHeaderQuickAccessFrameRounding = 3.0f
 
constexpr float cHeaderQuickAccessXSpacing = 12.0f
 
constexpr float cHeaderQuickAccessIconSize = 14.0f
 
constexpr float cHeaderQuickAccessFrameSize = 24.0f
 
constexpr float cMiddleIconSize = 15.0f
 
constexpr float cSmallIconSize = 10.0f
 
constexpr float cQuickAccessBarHeight = 40.0f
 
constexpr float cScrollBarSize = 10.0f
 
constexpr float cBigIconSize = 20.0f
 
constexpr int cSmallFontSize = 11
 
constexpr int cDefaultFontSize = 13
 
constexpr int cBigFontSize = 15
 
constexpr int cHeadlineFontSize = 20
 
constexpr float cRadioButtonSize = 20.0f
 
constexpr float cModalWindowWidth = 368.0f
 
constexpr float cModalWindowPaddingX = 28.0f
 
constexpr float cModalWindowPaddingY = 20.0f
 
constexpr float cModalButtonWidth = 104.0f
 
const float cRadioInnerSpacingX = 12.f
 
class MRVIEWER_CLASS HistoryStore
 
enum class  ObjectSelectivityType { ObjectSelectivityType::Selectable , ObjectSelectivityType::Selected , ObjectSelectivityType::Any }
 
template<typename ObjectT = Object>
std::shared_ptr< ObjectT > asSelectivityType (std::shared_ptr< Object > obj, const ObjectSelectivityType &type)
 if input object is of given type then returns another pointer on it
 
template<typename ObjectT = Object>
std::vector< std::shared_ptr< ObjectT > > getAllObjectsInTree (Object *root, const ObjectSelectivityType &type=ObjectSelectivityType::Selectable)
 
template<typename ObjectT = Object>
std::vector< std::shared_ptr< ObjectT > > getAllObjectsInTree (Object &root, const ObjectSelectivityType &type=ObjectSelectivityType::Selectable)
 
template<typename ObjectT = Object>
std::vector< std::shared_ptr< ObjectT > > getTopmostVisibleObjects (Object *root, const ObjectSelectivityType &type=ObjectSelectivityType::Selectable)
 Returns all topmost visible objects of given type (if an object is returned, its children are not) excluding root.
 
template<typename ObjectT = Object>
std::vector< std::shared_ptr< ObjectT > > getTopmostVisibleObjects (Object &root, const ObjectSelectivityType &type=ObjectSelectivityType::Selectable)
 
template<typename ObjectT = Object>
std::shared_ptr< ObjectT > getDepthFirstObject (Object *root, const ObjectSelectivityType &type)
 return first object of given type in depth-first traverse order excluding root
 
template<typename ObjectT = Object>
std::shared_ptr< ObjectT > getDepthFirstObject (Object &root, const ObjectSelectivityType &type)
 
using ObjectMakerFunc = std::shared_ptr<Object>()
 
MRMESH_API std::shared_ptr< ObjectcreateObject (const std::string &className)
 the function to create new object instance by registered class name
 
using ConvertToIntVector2 = std::function<Vector2i( const Vector2f& )>
 float-to-int coordinate converter
 
using ConvertToFloatVector2 = std::function<Vector2f( const Vector2i& )>
 int-to-float coordinate converter
 
MRMESH_API bool ccw (const Vector2i &a, const Vector2i &b)
 
bool ccw (const Vector2i &a, const Vector2i &b, const Vector2i &c)
 
MRMESH_API bool ccw (const std::array< PreciseVertCoords2, 3 > &vs)
 first sorts the indices in ascending order, then calls the predicate for sorted points
 
MRMESH_API bool ccw (const PreciseVertCoords2 *vs)
 
MRMESH_API SegmentSegmentIntersectResult doSegmentSegmentIntersect (const std::array< PreciseVertCoords2, 4 > &vs)
 
MRMESH_API Vector2i findSegmentSegmentIntersectionPrecise (const Vector2i &a, const Vector2i &b, const Vector2i &c, const Vector2i &d)
 
MRMESH_API Vector2f findSegmentSegmentIntersectionPrecise (const Vector2f &a, const Vector2f &b, const Vector2f &c, const Vector2f &d, CoordinateConverters2 converters)
 

Typedef Documentation

◆ AABBTreePolyline2

◆ AABBTreePolyline3

◆ AffineXf2

template<typename T >
using MR::AffineXf2 = AffineXf<Vector2<T>>

◆ AffineXf2d

using MR::AffineXf2d = AffineXf2<double>

◆ AffineXf2f

using MR::AffineXf2f = AffineXf2<float>

◆ AffineXf3

template<typename T >
using MR::AffineXf3 = AffineXf<Vector3<T>>

◆ AffineXf3d

using MR::AffineXf3d = AffineXf3<double>

◆ AffineXf3f

using MR::AffineXf3f = AffineXf3<float>

◆ Box2

template<typename T >
using MR::Box2 = Box<Vector2<T>>

◆ Box2d

using MR::Box2d = Box2<double>

◆ Box2f

using MR::Box2f = Box2<float>

◆ Box2i

using MR::Box2i = Box2<int>

◆ Box2ll

using MR::Box2ll = Box2<long long>

◆ Box3

template<typename T >
using MR::Box3 = Box<Vector3<T>>

◆ Box3d

using MR::Box3d = Box3<double>

◆ Box3f

using MR::Box3f = Box3<float>

◆ Box3i

using MR::Box3i = Box3<int>

◆ Box3ll

using MR::Box3ll = Box3<long long>

◆ Cone3d

using MR::Cone3d = Cone3<double>

◆ Cone3f

using MR::Cone3f = Cone3<float>

◆ ContinuousContour

using MR::ContinuousContour = std::vector<VariableEdgeTri>

◆ ContinuousContours

◆ Contour

template<typename V >
using MR::Contour = std::vector<V>

◆ Contour2

template<typename T >
using MR::Contour2 = Contour<Vector2<T>>

◆ Contour2d

using MR::Contour2d = Contour2<double>

◆ Contour2f

using MR::Contour2f = Contour2<float>

◆ Contour3

template<typename T >
using MR::Contour3 = Contour<Vector3<T>>

◆ Contour3d

typedef Contour3< double > MR::Contour3d = Contour3<double>

◆ Contour3f

typedef Contour3< float > MR::Contour3f = Contour3<float>

◆ Contours

template<typename V >
using MR::Contours = std::vector<Contour<V>>

◆ Contours2

template<typename T >
using MR::Contours2 = Contours<Vector2<T>>

◆ Contours2d

using MR::Contours2d = Contours2<double>

◆ Contours2f

using MR::Contours2f = Contours2<float>

◆ Contours3

template<typename T >
using MR::Contours3 = Contours<Vector3<T>>

◆ Contours3d

typedef std::vector< Contour3d > MR::Contours3d = Contours3<double>

◆ Contours3f

typedef std::vector< Contour3f > MR::Contours3f = Contours3<float>

◆ ContoursVariableOffset

using MR::ContoursVariableOffset = std::function<float( int, int )>

◆ ConvertToFloatVector2

using MR::ConvertToFloatVector2 = std::function<Vector2f( const Vector2i& )>

int-to-float coordinate converter

◆ ConvertToIntVector2

using MR::ConvertToIntVector2 = std::function<Vector2i( const Vector2f& )>

float-to-int coordinate converter

◆ Cylinder3d

using MR::Cylinder3d = Cylinder3<double>

◆ Cylinder3f

using MR::Cylinder3f = Cylinder3<float>

◆ DecimatePolylineSettings2

◆ DecimatePolylineSettings3

◆ Dipoles

◆ DisabledWarnings

using MR::DisabledWarnings = std::vector<ShaderWarning>

◆ EdgeBitSet

◆ EdgeBMap

◆ EdgeColors

◆ EdgeHashMap

◆ EdgeHashSet

◆ EdgeId

using MR::EdgeId = Id<EdgeTag>

◆ EdgeLoop

using MR::EdgeLoop = std::vector<EdgeId>

◆ EdgeMap

◆ EdgeMetric

using MR::EdgeMetric = std::function<float( EdgeId )>

◆ EdgePath

using MR::EdgePath = std::vector<EdgeId>

◆ EdgePathsBuilder

◆ EdgePredicate

using MR::EdgePredicate = std::function<bool( EdgeId )>

◆ EdgeScalars

using MR::EdgeScalars = Vector<float, EdgeId>

◆ EdgeSetBitIterator

◆ Expected

template<class T , class E = std::string>
using MR::Expected = tl::expected<T, E>

◆ Face2RegionMap

◆ FaceBitSet

◆ FaceBMap

◆ FaceColorMapAggregator

◆ FaceColors

◆ FaceHashMap

◆ FaceHashSet

◆ FaceId

using MR::FaceId = Id<FaceTag>

◆ FaceMap

◆ FaceMetric

using MR::FaceMetric = std::function<float( FaceId )>

◆ FaceNormals

◆ FacePredicate

using MR::FacePredicate = std::function<bool( FaceId )>

◆ FaceScalars

using MR::FaceScalars = Vector<float, FaceId>

◆ FaceSetBitIterator

◆ FeaturesPropertyTypesVariant

using MR::FeaturesPropertyTypesVariant = std::variant<float, Vector3f>

◆ FileNamesStack

typedef std::vector< std::filesystem::path > MR::FileNamesStack = std::vector<std::filesystem::path>

◆ FloatGrid

using MR::FloatGrid = std::shared_ptr<OpenVdbFloatGrid>

◆ FoundPointCallback

using MR::FoundPointCallback = std::function<void( VertId, const Vector3f& )>

◆ FunctionVolume

◆ FunctionVolumeU8

◆ GcodeSource

typedef std::vector< std::string > MR::GcodeSource = std::vector<std::string>

◆ GraphEdgeBitSet

using MR::GraphEdgeBitSet = TaggedBitSet<GraphEdgeTag>

◆ GraphEdgeId

using MR::GraphEdgeId = Id<GraphEdgeTag>

◆ GraphVertBitSet

using MR::GraphVertBitSet = TaggedBitSet<GraphVertTag>

◆ GraphVertId

using MR::GraphVertId = Id<GraphVertTag>

◆ GroupsItemsMap

◆ HashMap

template<typename K , typename V , typename Hash = phmap::priv::hash_default_hash<K>, typename Eq = phmap::priv::hash_default_eq<K>>
using MR::HashMap = phmap::flat_hash_map<K, V, Hash, Eq>

◆ HashSet

template<typename T , typename Hash = phmap::priv::hash_default_hash<T>, typename Eq = phmap::priv::hash_default_eq<T>>
using MR::HashSet = phmap::flat_hash_set<T, Hash, Eq>

◆ HistoryActionsVector

using MR::HistoryActionsVector = std::vector<std::shared_ptr<HistoryAction>>

◆ HistoryStackFilter

using MR::HistoryStackFilter = std::function<bool( const std::shared_ptr<HistoryAction>& )>

◆ IndexedPairs

◆ IRenderObjectConstructorLambda

using MR::IRenderObjectConstructorLambda = std::function<std::unique_ptr<IRenderObject>( const VisualObject& )>

◆ IsoLine

◆ IsoLines

◆ ItemMap

using MR::ItemMap = HashMap<std::string, MenuItemInfo>

◆ LeftRingIterator

◆ Line2

template<typename T >
using MR::Line2 = Line<Vector2<T>>

◆ Line2d

using MR::Line2d = Line2<double>

◆ Line2f

using MR::Line2f = Line2<float>

◆ Line3

template<typename T >
using MR::Line3 = Line<Vector3<T>>

◆ Line3d

using MR::Line3d = Line3<double>

◆ Line3f

using MR::Line3f = Line3<float>

◆ LineSegm2

template<typename T >
using MR::LineSegm2 = LineSegm<Vector2<T>>

◆ LineSegm2d

using MR::LineSegm2d = LineSegm2<double>

◆ LineSegm2f

using MR::LineSegm2f = LineSegm2<float>

◆ LineSegm3

template<typename T >
using MR::LineSegm3 = LineSegm<Vector3<T>>

◆ LineSegm3d

using MR::LineSegm3d = LineSegm3<double>

◆ LineSegm3f

using MR::LineSegm3f = LineSegm3<float>

◆ Matrix2b

using MR::Matrix2b = Matrix2<bool>

◆ Matrix2d

using MR::Matrix2d = Matrix2<double>

◆ Matrix2f

using MR::Matrix2f = Matrix2<float>

◆ Matrix2i

using MR::Matrix2i = Matrix2<int>

◆ Matrix2ll

using MR::Matrix2ll = Matrix2<long long>

◆ Matrix3b

using MR::Matrix3b = Matrix3<bool>

◆ Matrix3d

using MR::Matrix3d = Matrix3<double>

◆ Matrix3f

using MR::Matrix3f = Matrix3<float>

◆ Matrix3i

using MR::Matrix3i = Matrix3<int>

◆ Matrix3ll

using MR::Matrix3ll = Matrix3<long long>

◆ Matrix4b

using MR::Matrix4b = Matrix4<bool>

◆ Matrix4d

using MR::Matrix4d = Matrix4<double>

◆ Matrix4f

using MR::Matrix4f = Matrix4<float>

◆ Matrix4i

using MR::Matrix4i = Matrix4<int>

◆ Matrix4ll

using MR::Matrix4ll = Matrix4<long long>

◆ MenuItemsList

typedef std::vector< std::string > MR::MenuItemsList = std::vector<std::string>

◆ MenuItemsListMigration

using MR::MenuItemsListMigration = std::function<void ( MenuItemsList& )>

◆ MenuItemsListMigrations

◆ MeshEdgePoint

◆ MeshOrPointsId

◆ ObjectMakerFunc

using MR::ObjectMakerFunc = std::shared_ptr<Object>()

◆ ObjectPtr

using MR::ObjectPtr = std::shared_ptr<Object>

◆ OffsetContoursVertMap

◆ OffsetContoursVertMaps

◆ OrgRingIterator

◆ ParallelHashMap

template<typename K , typename V , typename Hash = phmap::priv::hash_default_hash<K>, typename Eq = phmap::priv::hash_default_eq<K>>
using MR::ParallelHashMap = phmap::parallel_flat_hash_map<K, V, Hash, Eq>

◆ ParallelHashSet

template<typename T , typename Hash = phmap::priv::hash_default_hash<T>, typename Eq = phmap::priv::hash_default_eq<T>>
using MR::ParallelHashSet = phmap::parallel_flat_hash_set<T, Hash, Eq>

◆ PathMeshEdgePointCallback

using MR::PathMeshEdgePointCallback = std::function<void( const MeshEdgePoint& mep )>

◆ PickedPoint

using MR::PickedPoint = std::variant<MeshTriPoint, EdgePoint, VertId, int>

◆ PixelBitSet

◆ PixelId

◆ Plane3d

using MR::Plane3d = Plane3<double>

◆ Plane3f

using MR::Plane3f = Plane3<float>

◆ PlaneSection

◆ PlaneSections

◆ Polyline2

◆ Polyline2ProjectionWithOffsetResult

◆ Polyline3

◆ PolylineProjectionResult2

◆ PolylineProjectionResult3

◆ PolylineProjectionWithOffsetResult3

◆ QuadraticForm2

template<typename T >
using MR::QuadraticForm2 = QuadraticForm<Vector2<T>>

◆ QuadraticForm2d

◆ QuadraticForm2f

◆ QuadraticForm3

template<typename T >
using MR::QuadraticForm3 = QuadraticForm<Vector3<T>>

◆ QuadraticForm3d

◆ QuadraticForm3f

◆ Quaterniond

using MR::Quaterniond = Quaternion<double>

◆ Quaternionf

using MR::Quaternionf = Quaternion<float>

◆ RegionId

◆ RegularGridLatticePositioner

using MR::RegularGridLatticePositioner = std::function<Vector3f( size_t x, size_t y )>

◆ RegularGridLatticeValidator

using MR::RegularGridLatticeValidator = std::function<bool( size_t x, size_t y )>

◆ RegularGridMeshFaceValidator

Initial value:
std::function<bool( size_t x0, size_t y0, size_t x1, size_t y1, size_t x2, size_t y2 )>

◆ RenderDefaultUiObject

◆ RenderDimensionObject

◆ SegmPointd

using MR::SegmPointd = SegmPoint<double>

◆ SegmPointf

using MR::SegmPointf = SegmPoint<float>

◆ SeparationPointMap

◆ SeparationPointSet

using MR::SeparationPointSet = std::array<VertId, size_t( NeighborDir::Count )>

◆ SetBitIterator

◆ SimpleVolume

using MR::SimpleVolume = VoxelsVolume<std::vector<float>>

◆ SimpleVolumeU16

using MR::SimpleVolumeU16 = VoxelsVolume<std::vector<uint16_t>>

◆ Sphere2

template<typename T >
using MR::Sphere2 = Sphere<Vector2<T>>

◆ Sphere2d

using MR::Sphere2d = Sphere2<double>

◆ Sphere2f

using MR::Sphere2f = Sphere2<float>

◆ Sphere3

template<typename T >
using MR::Sphere3 = Sphere<Vector3<T>>

◆ Sphere3d

using MR::Sphere3d = Sphere3<double>

◆ Sphere3f

using MR::Sphere3f = Sphere3<float>

◆ SplitCaptionInfo

using MR::SplitCaptionInfo = std::vector<std::pair<std::string_view, float>>

◆ StatePlugin

◆ SurfacePath

using MR::SurfacePath = std::vector<MeshEdgePoint>

◆ SurfacePaths

using MR::SurfacePaths = std::vector<SurfacePath>

◆ SymMatrix2b

using MR::SymMatrix2b = SymMatrix2<bool>

◆ SymMatrix2d

using MR::SymMatrix2d = SymMatrix2<double>

◆ SymMatrix2f

using MR::SymMatrix2f = SymMatrix2<float>

◆ SymMatrix2i

◆ SymMatrix2ll

using MR::SymMatrix2ll = SymMatrix2<long long>

◆ SymMatrix3b

using MR::SymMatrix3b = SymMatrix3<bool>

◆ SymMatrix3d

using MR::SymMatrix3d = SymMatrix3<double>

◆ SymMatrix3f

using MR::SymMatrix3f = SymMatrix3<float>

◆ SymMatrix3i

◆ SymMatrix3ll

using MR::SymMatrix3ll = SymMatrix3<long long>

◆ SymMatrix4b

using MR::SymMatrix4b = SymMatrix4<bool>

◆ SymMatrix4d

using MR::SymMatrix4d = SymMatrix4<double>

◆ SymMatrix4f

using MR::SymMatrix4f = SymMatrix4<float>

◆ SymMatrix4i

◆ SymMatrix4ll

using MR::SymMatrix4ll = SymMatrix4<long long>

◆ TabsGroupsMap

using MR::TabsGroupsMap = HashMap<std::string, std::vector<std::string>>

◆ ThreeVertIds

using MR::ThreeVertIds = std::array<VertId, 3>

three vertex ids describing a triangle topology

◆ Time

using MR::Time = std::chrono::time_point<std::chrono::system_clock>

◆ TransformModesValidator

using MR::TransformModesValidator = std::function<ControlBit( const Vector3f& center, const AffineXf3f& xf, ViewportId )>

◆ Triangle3

template<typename T >
using MR::Triangle3 = std::array<Vector3<T>, 3>

◆ Triangle3d

using MR::Triangle3d = Triangle3<double>

◆ Triangle3f

using MR::Triangle3f = Triangle3<float>

◆ Triangle3i

using MR::Triangle3i = Triangle3<int>

◆ TrianglesRepetitions

using MR::TrianglesRepetitions = std::array<int, 4>

TrianglesRepetitions[0] contains the number of triangles that appear in different local triangulations with opposite orientations TrianglesRepetitions[1] contains the number of unoriented triangles that appear in one local triangulation only TrianglesRepetitions[2] contains the number of unoriented triangles that appear in exactly two local triangulations TrianglesRepetitions[3] contains the number of unoriented triangles that appear in three local triangulations

◆ Triangulation

mapping from FaceId to a triple of vertex indices

◆ TriPointd

using MR::TriPointd = TriPoint<double>

◆ TriPointf

using MR::TriPointf = TriPoint<float>

◆ UndirectedEdge2RegionMap

◆ UndirectedEdgeBitSet

◆ UndirectedEdgeBMap

◆ UndirectedEdgeColors

◆ UndirectedEdgeHashMap

◆ UndirectedEdgeId

◆ UndirectedEdgeMap

◆ UndirectedEdgeMetric

using MR::UndirectedEdgeMetric = std::function<float( UndirectedEdgeId )>

◆ UndirectedEdgePredicate

using MR::UndirectedEdgePredicate = std::function<bool( UndirectedEdgeId )>

◆ UndirectedEdgeScalars

◆ UndirectedEdgeSetBitIterator

◆ UndirEdgeColorMapAggregator

◆ UVCoord

Coordinates on texture

Parameters
x,yshould be in range [0..1], otherwise result depends on wrap type of texture (no need to clamp it, it is done on GPU if wrap type is "Clamp" )

◆ VdbVolume

◆ Vector2b

using MR::Vector2b = Vector2<bool>

◆ Vector2d

using MR::Vector2d = Vector2<double>

◆ Vector2f

using MR::Vector2f = Vector2<float>

◆ Vector2i

using MR::Vector2i = Vector2<int>

◆ Vector2ll

using MR::Vector2ll = Vector2<long long>

◆ Vector3b

using MR::Vector3b = Vector3<bool>

◆ Vector3d

using MR::Vector3d = Vector3<double>

◆ Vector3f

using MR::Vector3f = Vector3<float>

◆ Vector3i

using MR::Vector3i = Vector3<int>

◆ Vector3ll

using MR::Vector3ll = Vector3<long long>

◆ Vector4b

using MR::Vector4b = Vector4<bool>

◆ Vector4d

using MR::Vector4d = Vector4<double>

◆ Vector4f

using MR::Vector4f = Vector4<float>

◆ Vector4i

using MR::Vector4i = Vector4<int>

◆ Vector4ll

using MR::Vector4ll = Vector4<long long>

◆ Vert2RegionMap

◆ VertBitSet

◆ VertBMap

◆ VertColorMapAggregator

◆ VertColors

◆ VertCoords

◆ VertHashMap

◆ VertHashSet

◆ VertId

using MR::VertId = Id<VertTag>

◆ VertMap

◆ VertMetric

using MR::VertMetric = std::function<float( VertId )>

◆ VertNormals

◆ VertPathInfoMap

◆ VertPredicate

using MR::VertPredicate = std::function<bool( VertId )>

◆ VertScalars

using MR::VertScalars = Vector<float, VertId>

◆ VertSetBitIterator

◆ VertUVCoords

◆ ViewerEventCallback

using MR::ViewerEventCallback = std::function<void()>

◆ ViewportRectangle

◆ VoidOrErrStr

using MR::VoidOrErrStr = Expected<void, std::string>

return type for a void function that can produce an error string

◆ VolumePartBuilder

template<typename Volume >
using MR::VolumePartBuilder = std::function<Expected<Volume, std::string> ( int begin, int end, std::optional<Vector3i>& offset )>

functor returning a voxel volume part within the specified range, or an error string on failure the offset parameter is also required for SimpleVolume parts

◆ VoxelBitSet

◆ VoxelId

◆ VoxelPointPositioner

using MR::VoxelPointPositioner = std::function<Vector3f( const Vector3f&, const Vector3f&, float, float, float )>

◆ VoxelValueGetter

template<typename T >
using MR::VoxelValueGetter = std::function<T ( const Vector3i& )>

◆ WholeEdgeBMap

◆ WholeEdgeHashMap

mapping of whole edges: map[e]->f, map[e.sym()]->f.sym(), where only map[e] for even edges is stored

◆ WholeEdgeMap

mapping of whole edges: map[e]->f, map[e.sym()]->f.sym(), where only map[e] for even edges is stored

Enumeration Type Documentation

◆ AlignType

Enumerator
Left 
Center 
Right 

◆ AngleUnit

enum class MR::AngleUnit
strong
Enumerator
radians 
degrees 
_count 

◆ ArcPlane

enum class MR::ArcPlane
strong
Enumerator
None 
XY 
XZ 
YZ 

◆ AreaUnit

enum class MR::AreaUnit
strong
Enumerator
mm2 
inches2 
_count 

◆ Axis

enum class MR::Axis
strong
Enumerator
Count 

◆ BypassDirection

enum class MR::BypassDirection
strong
Enumerator
Clockwise 
CounterClockwise 

◆ ConeFitterType

enum class MR::ConeFitterType
strong
Enumerator
ApproximationPCM 
HemisphereSearchFit 
SpecificAxisFit 

◆ ControlBit

enum class MR::ControlBit
strong
Enumerator
None 
RotX 
RotY 
RotZ 
RotMask 
MoveX 
MoveY 
MoveZ 
MoveMask 
FullMask 

◆ DecimateStrategy

Defines the order of edge collapses inside Decimate algorithm.

Enumerator
MinimizeError 
ShortestEdgeFirst 

◆ DegreesMode

enum class MR::DegreesMode
strong
Enumerator
degrees 
degreesMinutes 
degreesMinutesSeconds 

◆ DepthFunction

enum class MR::DepthFunction
strong
Enumerator
Never 
Less 
Equal 
Greater 
LessOrEqual 
GreaterOrEqual 
NotEqual 
Always 
Default 

◆ FeaturePropertyKind

enum class MR::FeaturePropertyKind
strong
Enumerator
position 
linearDimension 
direction 
angle 
other 

◆ FilterType

enum class MR::FilterType : char
strong
Enumerator
Linear 
Discrete 

◆ FitMode

enum class MR::FitMode
strong
Enumerator
Visible 
SelectedPrimitives 
SelectedObjects 
CustomObjectsList 

◆ ICPExitType

enum class MR::ICPExitType
strong
Enumerator
NotStarted 
NotFoundSolution 
MaxIterations 
MaxBadIterations 
StopMsdReached 

◆ ICPMethod

enum class MR::ICPMethod
strong

The method how to update transformation from point pairs.

Enumerator
Combined 

PointToPoint for the first 2 iterations, and PointToPlane for the remaining iterations.

PointToPoint 

select transformation that minimizes mean squared distance between two points in each pair, it is the safest approach but can converge slowly

PointToPlane 

select transformation that minimizes mean squared distance between a point and a plane via the other point in each pair, converge much faster than PointToPoint in case of many good (with not all points/normals in one plane) pairs

◆ ICPMode

enum class MR::ICPMode
strong

The group of transformations, each with its own degrees of freedom.

Enumerator
RigidScale 

rigid body transformation with uniform scaling (7 degrees of freedom)

AnyRigidXf 

rigid body transformation (6 degrees of freedom)

OrthogonalAxis 

rigid body transformation with rotation except argument axis (5 degrees of freedom)

FixedAxis 

rigid body transformation with rotation around given axis only (4 degrees of freedom)

TranslationOnly 

only translation (3 degrees of freedom)

◆ LengthUnit

enum class MR::LengthUnit
strong
Enumerator
mm 
inches 
_count 

◆ MouseButton

enum class MR::MouseButton
strong
Enumerator
Left 
Right 
Middle 
Count 

◆ MouseMode

enum class MR::MouseMode
strong
Enumerator
None 
Rotation 
Translation 
Roll 
Count 

◆ MovementSpeedUnit

enum class MR::MovementSpeedUnit
strong
Enumerator
mmPerSecond 
inchesPerSecond 
_count 

◆ MoveType

enum class MR::MoveType
strong
Enumerator
None 
FastLinear 
Linear 
ArcCW 
ArcCCW 

◆ NeighborDir

enum class MR::NeighborDir
strong
Enumerator
Count 

◆ NestedComponenetsMode

enum class MR::NestedComponenetsMode
strong
Enumerator
Remove 
Merge 
Union 

◆ NotificationType

enum class MR::NotificationType
strong
Enumerator
Error 
Warning 
Info 
Count 

◆ NoUnit

enum class MR::NoUnit
strong
Enumerator
_count 

◆ NumberStyle

enum class MR::NumberStyle
strong
Enumerator
normal 
distributePrecision 
exponential 
maybeExponential 

◆ PathPreference

enum class MR::PathPreference
strong
Enumerator
Geodesic 
Convex 
Concave 

◆ PixelSizeUnit

enum class MR::PixelSizeUnit
strong
Enumerator
pixels 
_count 

◆ RatioUnit

enum class MR::RatioUnit
strong
Enumerator
factor 
percents 
_count 

◆ RelaxApproxType

enum class MR::RelaxApproxType
strong
Enumerator
Planar 
Quadric 

◆ RenderModelPassMask

enum class MR::RenderModelPassMask
strong

Various passes of the 3D rendering.

Enumerator
Opaque 
Transparent 
VolumeRendering 
NoDepthTest 
All 

◆ Reorder

enum class MR::Reorder : char
strong

determines how points to be ordered

Enumerator
None 

the order is not changed

Lexicographically 

the order is determined by lexicographical sorting by coordinates (optimal for uniform sampling)

AABBTree 

the order is determined so to put close in space points in close indices (optimal for compression)

◆ RibbonItemType

enum class MR::RibbonItemType
strong
Enumerator
Button 
ButtonWithDrop 

◆ Side

enum class MR::Side
strong
Enumerator
Negative 
Positive 

◆ SignDetectionMode

enum class MR::SignDetectionMode
strong

how to determine the sign of distances from a mesh

Enumerator
Unsigned 

unsigned distance, useful for bidirectional Shell offset

OpenVDB 

sign detection from OpenVDB library, which is good and fast if input geometry is closed

ProjectionNormal 

the sign is determined based on pseudonormal in closest mesh point (unsafe in case of self-intersections)

WindingRule 

ray intersection counter, significantly slower than ProjectionNormal and does not support holes in mesh

HoleWindingRule 

computes winding number generalization with support of holes in mesh, slower than WindingRule

◆ SpaceMouseButtons

enumeration all spacemouse buttons

Enumerator
SMB_NO 
SMB_MENU 
SMB_ESC 
SMB_ENTER 
SMB_TAB 
SMB_SHIFT 
SMB_CTRL 
SMB_ALT 
SMB_SPACE 
SMB_DELETE 
SMB_CUSTOM_1 
SMB_CUSTOM_2 
SMB_CUSTOM_3 
SMB_CUSTOM_4 
SMB_CUSTOM_5 
SMB_CUSTOM_6 
SMB_CUSTOM_7 
SMB_CUSTOM_8 
SMB_CUSTOM_9 
SMB_CUSTOM_10 
SMB_CUSTOM_11 
SMB_CUSTOM_12 
SMB_FIT 
SMB_TOP 
SMB_RIGHT 
SMB_FRONT 
SMB_ROLL_CW 
SMB_LOCK_ROT 
SMB_BTN_V1 
SMB_BTN_V2 
SMB_BTN_V3 
SMB_ISO1 
SMB_BUTTON_COUNT 

◆ StatePluginTabs

enum class MR::StatePluginTabs
strong
Enumerator
Basic 
Mesh 
DistanceMap 
PointCloud 
Selection 
Voxels 
Analysis 
Test 
Other 
Count 

◆ TimeUnit

enum class MR::TimeUnit
strong
Enumerator
seconds 
milliseconds 
_count 

◆ UseAABBTree

enum class MR::UseAABBTree : char
strong
Enumerator
No 
Yes 
YesIfAlreadyConstructed 

◆ VolumeUnit

enum class MR::VolumeUnit
strong
Enumerator
mm3 
inches3 
_count 

◆ WrapType

enum class MR::WrapType : char
strong
Enumerator
Repeat 
Mirror 
Clamp 

Function Documentation

◆ addBaseToPlanarMesh()

MRMESH_API void MR::addBaseToPlanarMesh ( Mesh & mesh,
float zOffset = 1.0f )

◆ addFileNameInError()

template<typename T >
Expected< T, std::string > MR::addFileNameInError ( Expected< T, std::string > v,
const std::filesystem::path & file )
inline

if (v) contains an error, then appends given file name to that error

◆ addNoise()

MRMESH_API VoidOrErrStr MR::addNoise ( VertCoords & points,
const VertBitSet & validVerts,
NoiseSettings settings )

◆ alignTextToMesh()

MRMESH_API Expected< Mesh, std::string > MR::alignTextToMesh ( const Mesh & mesh,
const TextMeshAlignParams & params )

◆ appendGPUVisibleFaces()

MRVIEWER_API void MR::appendGPUVisibleFaces ( const Viewport & viewport,
const BitSet & pixBs,
const std::vector< std::shared_ptr< ObjectMesh > > & objects,
std::vector< FaceBitSet > & visibleFaces,
bool includeBackfaces = true )

appends viewport visible faces (in pixBs) to visibleFaces

Parameters
pixBsthe matrix of pixels (in local space of viewport) belonging selected area
objectsof interest
visibleFacesvector that correspond to objects and will be updated in this function
includeBackfacesget also faces from back side of object

◆ AppendHistory() [1/2]

template<class HistoryActionType , typename... Args>
void MR::AppendHistory ( Args &&... args)

◆ AppendHistory() [2/2]

template<class HistoryActionType >
void MR::AppendHistory ( std::shared_ptr< HistoryActionType > action)

◆ applyDouble() [1/2]

Vector3d MR::applyDouble ( const AffineXf3d * xf,
const Vector3f & p )
inline

converts given point in double precision and applies given transformation to it

◆ applyDouble() [2/2]

Vector3d MR::applyDouble ( const Matrix3d * m,
const Vector3f & n )
inline

converts given normal in double precision and applies given matrix to it

◆ applyFloat() [1/2]

Vector3f MR::applyFloat ( const AffineXf3d * xf,
const Vector3f & p )
inline

returns the point as is or after application of given transform to it in double precision

◆ applyFloat() [2/2]

Vector3f MR::applyFloat ( const Matrix3d * m,
const Vector3f & n )
inline

returns the normal as is or after application of given matrix to it in double precision

◆ area() [1/2]

template<typename T >
T MR::area ( const Vector2< T > & p,
const Vector2< T > & q,
const Vector2< T > & r )
inline

computes twice the area of given triangle

◆ area() [2/2]

template<typename T >
T MR::area ( const Vector3< T > & p,
const Vector3< T > & q,
const Vector3< T > & r )
inline

computes twice the area of given triangle

◆ autoOrientLocalTriangulations()

MRMESH_API bool MR::autoOrientLocalTriangulations ( const PointCloud & pointCloud,
AllLocalTriangulations & triangs,
const VertBitSet & region,
ProgressCallback progress = {},
Triangulation * outRep3 = nullptr,
Triangulation * outRep2 = nullptr )

orient neighbors around each point in

Parameters
regionso there will be as many triangles with same (and not opposite) orientation as possible optional output with all oriented triangles that appear in exactly two local triangulations
Parameters
outRep3optional output with all oriented triangles that appear in three local triangulations

◆ begin() [1/6]

template<typename T , typename I >
auto MR::begin ( Buffer< T, I > & a)
inline

◆ begin() [2/6]

template<typename T , typename I >
auto MR::begin ( const Buffer< T, I > & a)
inline

◆ begin() [3/6]

DirectoryIterator MR::begin ( const Directory & sd)
inline

◆ begin() [4/6]

DirectoryRecursiveIterator MR::begin ( const DirectoryRecursive & sd)
inline

◆ begin() [5/6]

template<typename T , typename I >
auto MR::begin ( const Vector< T, I > & a)
inline

◆ begin() [6/6]

template<typename T , typename I >
auto MR::begin ( Vector< T, I > & a)
inline

◆ bindVertexAttribArray() [1/3]

MRVIEWER_API GLint MR::bindVertexAttribArray ( const BindVertexAttribArraySettings & settings)

◆ bindVertexAttribArray() [2/3]

template<typename T , template< typename, typename... > class C, typename... args>
GLint MR::bindVertexAttribArray ( const GLuint program_shader,
const char * name,
GlBuffer & buf,
const C< T, args... > & V,
int baseTypeElementsNumber,
bool refresh,
bool forceUse = false )
inline

◆ bindVertexAttribArray() [3/3]

template<typename T , std::size_t N>
GLint MR::bindVertexAttribArray ( const GLuint program_shader,
const char * name,
GlBuffer & buf,
const std::array< T, N > & V,
int baseTypeElementsNumber,
bool refresh,
bool forceUse = false )
inline

◆ boolean() [1/3]

MRMESH_API BooleanResult MR::boolean ( const Mesh & meshA,
const Mesh & meshB,
BooleanOperation operation,
const BooleanParameters & params = {} )

◆ boolean() [2/3]

MRMESH_API BooleanResult MR::boolean ( Mesh && meshA,
Mesh && meshB,
BooleanOperation operation,
const AffineXf3f * rigidB2A,
BooleanResultMapper * mapper = nullptr,
ProgressCallback cb = {} )

◆ boolean() [3/3]

MRMESH_API BooleanResult MR::boolean ( Mesh && meshA,
Mesh && meshB,
BooleanOperation operation,
const BooleanParameters & params = {} )

◆ bytesString()

MRMESH_API std::string MR::bytesString ( size_t size)

converts given size in string: [0,1024) -> nnn bytes [1024,1024*1024) -> nnn.nn Kb [1024*1024,1024*1024*1024) -> nnn.nn Mb ...

◆ calcAvgColors()

MRMESH_API Expected< VertColors > MR::calcAvgColors ( const PointCloud & cloud,
const VertColors & colors,
const VertCoords & tgtPoints,
const VertBitSet & tgtVerts,
float sigma,
const ProgressCallback & cb = {} )

given

Parameters
clouda point cloud
colorscolors of each point in the cloud
tgtPointssome target points
tgtVertsmask of valid target points
sigmathe distance of highest influence of a point
cbprogress callback computes the colors in valid target points by averaging the colors from the point cloud

◆ calcDipoles()

MRMESH_API void MR::calcDipoles ( Dipoles & dipoles,
const AABBTree & tree,
const Mesh & mesh )

calculates dipoles for given mesh and AABB-tree

◆ calcFaceDistances()

MRMESH_API std::optional< FaceScalars > MR::calcFaceDistances ( const MeshTopology & topology,
const EdgeMetric & metric,
const FaceBitSet & starts,
const FaceDistancesSettings & settings = {} )

computes and returns the distance of traveling from one of start faces to all other reachable faces on the mesh; all unreachable faces will get FLT_MAX value;

Parameters
startsall start faces will get value 0 in the result;
metricmetric(e) says the distance of traveling from left(e) to right(e)

◆ calcTextureRes()

MRVIEWER_API Vector2i MR::calcTextureRes ( int bufferSize,
int maxTextWidth )

◆ calculateRangeSize()

template<typename GridT >
RangeSize MR::calculateRangeSize ( const GridT & grid)

◆ ccw() [1/3]

MRMESH_API bool MR::ccw ( const PreciseVertCoords2 * vs)

◆ ccw() [2/3]

MRMESH_API bool MR::ccw ( const std::array< PreciseVertCoords2, 3 > & vs)

first sorts the indices in ascending order, then calls the predicate for sorted points

◆ ccw() [3/3]

bool MR::ccw ( const Vector2i & a,
const Vector2i & b,
const Vector2i & c )
inline

return true if the smallest rotation from vector (a-c) to vector (b-c) is in counter-clock-wise direction; uses simulation-of-simplicity to avoid "vectors are collinear"

◆ circumballCenters()

template<typename T >
bool MR::circumballCenters ( const Vector3< T > & a,
const Vector3< T > & b,
const Vector3< T > & c,
T radius,
Vector3< T > & centerPos,
Vector3< T > & centerNeg )

Given triangle ABC and ball radius, finds two centers of balls each touching all 3 triangle's vertices;

Returns
false if such balls do not exist (radius is smaller that circumcircle radius)

◆ circumcircleCenter() [1/2]

template<typename T >
Vector3< T > MR::circumcircleCenter ( const Vector3< T > & a,
const Vector3< T > & b )

Computes the center of the the triangle's 0AB circumcircle.

◆ circumcircleCenter() [2/2]

template<typename T >
Vector3< T > MR::circumcircleCenter ( const Vector3< T > & a,
const Vector3< T > & b,
const Vector3< T > & c )
inline

Computes the center of the the triangle's ABC circumcircle.

◆ closestPointOnLineSegm()

template<typename V >
V MR::closestPointOnLineSegm ( const V & pt,
const LineSegm< V > & l )

◆ computeBasinVolume()

MRMESH_API double MR::computeBasinVolume ( const Mesh & mesh,
const FaceBitSet & faces,
float level )

computes the volume of given mesh basin below given water level;

Parameters
facesshall include all basin faces at least partially below the water level

◆ computeBoundingBox()

template<typename V >
Box< V > MR::computeBoundingBox ( const Vector< V, VertId > & points,
const VertBitSet * region = nullptr,
const AffineXf< V > * toWorld = nullptr )

◆ computeNormal()

MRMESH_API Vector3f MR::computeNormal ( const AllLocalTriangulations & triangs,
const VertCoords & points,
VertId v )

compute normal at point by averaging neighbor triangle normals weighted by triangle's angle at the point

◆ computeSkyViewFactor()

MRMESH_API VertScalars MR::computeSkyViewFactor ( const Mesh & terrain,
const VertCoords & samples,
const VertBitSet & validSamples,
const std::vector< SkyPatch > & skyPatches,
BitSet * outSkyRays = nullptr,
std::vector< MeshIntersectionResult > * outIntersections = nullptr )

computes relative radiation in each valid sample point by emitting rays from that point in the sky: the radiation is 1.0f if all rays reach the sky not hitting the terrain; the radiation is 0.0f if all rays do not reach the sky because they are intercepted by the terrain;

Parameters
outSkyRays- optional output bitset where for every valid sample #i its rays are stored at indices [i*numPatches; (i+1)*numPatches), 0s for occluded rays (hitting the terrain) and 1s for the ones which don't hit anything and reach the sky
outIntersections- optional output vector of MeshIntersectionResult for every valid sample point

◆ computeSpaceDistances()

MRMESH_API VertScalars MR::computeSpaceDistances ( const Mesh & mesh,
const PointOnFace & start,
float range )

computes Euclidean 3D distances from given start point to all neighbor vertices within given

Parameters
rangeand to first vertices with the distance more or equal than range

◆ computeTrianglesRepetitions()

MRMESH_API TrianglesRepetitions MR::computeTrianglesRepetitions ( const AllLocalTriangulations & triangs)

computes statistics about the number of triangle repetitions in local triangulations

◆ constantCuspToolPath()

MRMESH_API Expected< ToolPathResult, std::string > MR::constantCuspToolPath ( const MeshPart & mp,
const ConstantCuspParams & params )

◆ constantZToolPath()

MRMESH_API Expected< ToolPathResult, std::string > MR::constantZToolPath ( const MeshPart & mp,
const ToolPathParams & params )

◆ contains()

template<typename T >
bool MR::contains ( const std::function< bool(Id< T >)> & pred,
Id< T > id )
inline

◆ convertUnits()

template<UnitEnum E, typename T >
detail::Units::MakeFloatingPoint< T > MR::convertUnits ( E from,
E to,
const T & value )

◆ createRenderObject() [1/2]

template<typename ObjectType >
std::unique_ptr< IRenderObject > MR::createRenderObject ( const VisualObject & visObj)

◆ createRenderObject() [2/2]

MRMESH_API std::unique_ptr< IRenderObject > MR::createRenderObject ( const VisualObject & visObj,
const std::type_index & type )

◆ createRootFormObject()

MRMESH_API std::shared_ptr< SceneRootObject > MR::createRootFormObject ( std::shared_ptr< Object > obj)

Removes all obj children and attaches it to newly created SceneRootObject note that it does not respect obj xf

◆ createShader()

MRVIEWER_API void MR::createShader ( const std::string & shader_name,
const std::string & vert_source,
const std::string & frag_source,
GLuint & prog_id,
const DisabledWarnings & suppressedWarns = {} )

◆ createSymbolContours()

MRMESH_API Expected< Contours2d > MR::createSymbolContours ( const SymbolMeshParams & params)

◆ createSymbolsMesh()

MRMESH_API Expected< Mesh > MR::createSymbolsMesh ( const SymbolMeshParams & params)

◆ cutAlongEdgeLoop() [1/2]

MRMESH_API EdgeLoop MR::cutAlongEdgeLoop ( Mesh & mesh,
const EdgeLoop & c0 )

given a closed loop of edges, splits the surface along that loop so that after return: 1) returned loop has the same size as input, with corresponding edges in same indexed elements of both; 2) all edges of c0 have no left faces; 3) all returned edges have no right faces; 4) vertices of the given mesh are updated

◆ cutAlongEdgeLoop() [2/2]

MRMESH_API EdgeLoop MR::cutAlongEdgeLoop ( MeshTopology & topology,
const EdgeLoop & c0 )

given a closed loop of edges, splits the surface along that loop so that after return: 1) returned loop has the same size as input, with corresponding edges in same indexed elements of both; 2) all edges of c0 have no left faces; 3) all returned edges have no right faces;

◆ dblArea() [1/2]

template<typename T >
T MR::dblArea ( const Vector2< T > & p,
const Vector2< T > & q,
const Vector2< T > & r )
inline

computes twice the area of given triangle

◆ dblArea() [2/2]

template<typename T >
T MR::dblArea ( const Vector3< T > & p,
const Vector3< T > & q,
const Vector3< T > & r )
inline

computes twice the area of given triangle

◆ dblAreaSq()

template<typename T >
T MR::dblAreaSq ( const Vector3< T > & p,
const Vector3< T > & q,
const Vector3< T > & r )
inline

computes the square of double area of given triangle

◆ deactivateFarPairs()

size_t MR::deactivateFarPairs ( PointPairs & pairs,
float maxDistSq )

reset active bit if pair distance is further than maxDistSq

◆ decimateContour()

MRMESH_API DecimatePolylineResult MR::decimateContour ( Contour3f & contour,
const DecimatePolylineSettings3 & settings = {} )

◆ decimatePolyline()

MRMESH_API DecimatePolylineResult MR::decimatePolyline ( Polyline3 & polyline,
const DecimatePolylineSettings3 & settings = {} )

◆ decomposeMatrix3()

template<typename T >
void MR::decomposeMatrix3 ( const Matrix3< T > & m,
Matrix3< T > & rotation,
Matrix3< T > & scaling )

Decomposes matrix into rotation and scaling matrices.

◆ decorateExpected() [1/3]

template<typename F >
auto MR::decorateExpected ( F && f)

◆ decorateExpected() [2/3]

template<typename R , typename T , typename... Args>
auto MR::decorateExpected ( R(T::*)(Args...) memFunction)

◆ decorateExpected() [3/3]

template<typename R , typename E , typename... Args>
auto MR::decorateExpected ( std::function< Expected< R, E >(Args...)> && f) -> std::function<R( Args... )>

◆ denoiseNormals()

MRMESH_API void MR::denoiseNormals ( const Mesh & mesh,
FaceNormals & normals,
const Vector< float, UndirectedEdgeId > & v,
float gamma )

Smooth face normals, given

Parameters
meshcontains topology information and coordinates for equation weights
normalsinput noisy normals and output smooth normals
vedge indicator function (1 - smooth edge, 0 - crease edge)
gammathe amount of smoothing: 0 - no smoothing, 1 - average smoothing, ... see the article "Mesh Denoising via a Novel Mumford-Shah Framework", equation (19)

◆ deserializeObjectTreeFromGltf()

MRMESH_API Expected< std::shared_ptr< Object >, std::string > MR::deserializeObjectTreeFromGltf ( const std::filesystem::path & file,
ProgressCallback callback = {} )

◆ destroyShader()

MRVIEWER_API void MR::destroyShader ( GLuint id)

◆ detectLoneContours()

MRMESH_API std::vector< int > MR::detectLoneContours ( const ContinuousContours & contours)

◆ dilateRegion()

MRMESH_API bool MR::dilateRegion ( const PointCloud & pointCloud,
VertBitSet & region,
float dilation,
ProgressCallback cb = {},
const AffineXf3f * xf = nullptr )

expands the region on given euclidian distance. returns false if callback also returns false

◆ dirDblArea() [1/2]

template<typename T >
Vector3< T > MR::dirDblArea ( const Triangle3< T > & t)
inline

computes directed double area of given triangle

◆ dirDblArea() [2/2]

template<typename T >
Vector3< T > MR::dirDblArea ( const Vector3< T > & p,
const Vector3< T > & q,
const Vector3< T > & r )
inline

computes directed double area of given triangle

◆ dividePolylineWithPlane()

MRMESH_API void MR::dividePolylineWithPlane ( Polyline3 & polyline,
const Plane3f & plane,
const DividePolylineParameters & params = {} )

This function divides polyline with a plane

Parameters
polylineInput polyline that will be cut by the plane
planeInput plane to cut polyline with
paramsparameters of the function, contains optional output

◆ divideWithPlane()

MRMESH_API PointCloud MR::divideWithPlane ( const PointCloud & points,
const Plane3f & plane,
const DividePointCloudOptionalOutput & optOut = {} )

This function cuts a point cloud with a plane, leaving only the part of mesh that lay in positive direction of normal

Returns
Point cloud object with vertices on the positive side of the plane
Parameters
pcInput point cloud that will be cut by the plane
planeInput plane to cut point cloud with
optOutoptional output of the function

◆ doSegmentLineIntersect()

template<typename V >
bool MR::doSegmentLineIntersect ( const LineSegm< V > & x,
const Line< V > & y,
typename V::ValueType * xPos = nullptr,
typename V::ValueType * yPos = nullptr )

returns true if 2D line segment and 2D line intersect, optionally outputs intersection point as a parameter on both

◆ doSegmentSegmentIntersect()

MRMESH_API SegmentSegmentIntersectResult MR::doSegmentSegmentIntersect ( const std::array< PreciseVertCoords2, 4 > & vs)

checks whether the segments AB (indices 01) and segments CD (indices 23) intersect; uses simulation-of-simplicity to avoid edge-segment intersections and co-planarity

◆ doSegmentsIntersect()

template<typename V >
bool MR::doSegmentsIntersect ( const LineSegm< V > & x,
const LineSegm< V > & y,
typename V::ValueType * xPos = nullptr,
typename V::ValueType * yPos = nullptr )

returns true if two 2D segments intersect, optionally outputs intersection point as a parameter on both segments

◆ doubleOffsetMesh()

MRMESH_API Expected< Mesh > MR::doubleOffsetMesh ( const MeshPart & mp,
float offsetA,
float offsetB,
const OffsetParameters & params = {} )

Offsets mesh by converting it to voxels and back two times only closed meshes allowed (only Offset mode) typically offsetA and offsetB have distinct signs

◆ embedStructureToTerrain()

MRMESH_API Expected< Mesh, std::string > MR::embedStructureToTerrain ( const Mesh & terrain,
const Mesh & structure,
const EmbeddedStructureParameters & params )

◆ end() [1/6]

template<typename T , typename I >
auto MR::end ( Buffer< T, I > & a)
inline

◆ end() [2/6]

template<typename T , typename I >
auto MR::end ( const Buffer< T, I > & a)
inline

◆ end() [3/6]

std::filesystem::directory_iterator MR::end ( const Directory & )
inline

◆ end() [4/6]

std::filesystem::recursive_directory_iterator MR::end ( const DirectoryRecursive & )
inline

◆ end() [5/6]

template<typename T , typename I >
auto MR::end ( const Vector< T, I > & a)
inline

◆ end() [6/6]

template<typename T , typename I >
auto MR::end ( Vector< T, I > & a)
inline

◆ erodeRegion()

MRMESH_API bool MR::erodeRegion ( const PointCloud & pointCloud,
VertBitSet & region,
float erosion,
ProgressCallback cb = {},
const AffineXf3f * xf = nullptr )

shrinks the region on given euclidian distance. returns false if callback also returns false

◆ evalGridMinMax()

MRMESH_API void MR::evalGridMinMax ( const FloatGrid & grid,
float & min,
float & max )

◆ excludeAllEdgesWithHistory()

MRVIEWER_API void MR::excludeAllEdgesWithHistory ( const std::shared_ptr< ObjectMesh > & objMesh)

removes all edges from edge selection and from creases and adds history records for that; it is a good idea to make SCOPED_HISTORY before calling this function

◆ excludeLoneEdgesWithHistory()

MRVIEWER_API void MR::excludeLoneEdgesWithHistory ( const std::shared_ptr< ObjectMesh > & objMesh)

removes deleted edges from edge selection and from creases and adds history records for that; it is a good idea to make SCOPED_HISTORY before calling this function

◆ expand() [1/4]

MRMESH_API void MR::expand ( const MeshTopology & topology,
FaceBitSet & region,
int hops = 1 )

adds to the region all faces within given number of hops (stars) from the initial region boundary

◆ expand() [2/4]

MRMESH_API FaceBitSet MR::expand ( const MeshTopology & topology,
FaceId f,
int hops )

returns the region of all faces within given number of hops (stars) from the initial face

◆ expand() [3/4]

MRMESH_API void MR::expand ( const MeshTopology & topology,
VertBitSet & region,
int hops = 1 )

◆ expand() [4/4]

MRMESH_API VertBitSet MR::expand ( const MeshTopology & topology,
VertId v,
int hops )

returns the region of all vertices within given number of hops (stars) from the initial vertex

◆ expandFaces()

MRMESH_API FaceBitSet MR::expandFaces ( const MeshTopology & topology,
const FaceBitSet & region,
const UndirectedEdgeBitSet * stopEdges = nullptr )

returns given region with all faces sharing an edge with a region face;

Parameters
stopEdges- neighborhood via this edges will be ignored

◆ exportToolPathToGCode()

MRMESH_API std::shared_ptr< ObjectGcode > MR::exportToolPathToGCode ( const std::vector< GCommand > & commands)

◆ extractIsolines() [1/2]

MRMESH_API IsoLines MR::extractIsolines ( const MeshTopology & topology,
const VertMetric & vertValues,
const FaceBitSet * region = nullptr )

extracts all iso-lines from given scalar field and iso-value=0

◆ extractIsolines() [2/2]

MRMESH_API IsoLines MR::extractIsolines ( const MeshTopology & topology,
const VertScalars & vertValues,
float isoValue,
const FaceBitSet * region = nullptr )

extracts all iso-lines from given scalar field and iso-value

◆ extractPlaneSections()

MRMESH_API PlaneSections MR::extractPlaneSections ( const MeshPart & mp,
const Plane3f & plane )

extracts all plane sections of given mesh

◆ extractSectionsFromPolyline()

MRMESH_API std::vector< EdgeSegment > MR::extractSectionsFromPolyline ( const Polyline3 & polyline,
const Plane3f & plane,
float eps )

This function cuts polyline with a plane

Returns
Edge segments tha are closer to the plane than
Parameters
eps
polylineInput polyline that will be cut by the plane
planeInput plane to cut polyline with
epsMaximal distance from the plane

◆ extractXYPlaneSections()

MRMESH_API PlaneSections MR::extractXYPlaneSections ( const MeshPart & mp,
float zLevel )

extracts all sections of given mesh with the plane z=zLevel; this function works faster than general extractPlaneSections(...) for the same plane if the sections cross relatively small number of mesh triangles and AABB tree has already been constructed

◆ fillContourLeft() [1/2]

MRMESH_API FaceBitSet MR::fillContourLeft ( const MeshTopology & topology,
const EdgePath & contour )

◆ fillContourLeft() [2/2]

MRMESH_API FaceBitSet MR::fillContourLeft ( const MeshTopology & topology,
const std::vector< EdgePath > & contours )

◆ fillContours2D()

MRMESH_API VoidOrErrStr MR::fillContours2D ( Mesh & mesh,
const std::vector< EdgeId > & holeRepresentativeEdges )

fill holes with border in same plane (i.e. after cut by plane)

Parameters
mesh- mesh with holes
holeRepresentativeEdges- each edge here represents a hole borders that should be filled should be not empty edges should have invalid left face (FaceId == -1)
Returns
Expected with has_value()=true if holes filled, otherwise - string error

◆ filterCreaseEdges()

MRMESH_API void MR::filterCreaseEdges ( const Mesh & mesh,
UndirectedEdgeBitSet & creaseEdges,
float critLength,
bool filterComponents = true,
bool filterBranches = false )

filters given edges using the following criteria: if

Parameters
filterComponentsis true then connected components with summary length of their edges less than
critLengthwill be excluded if
filterBranchesis true then branches shorter than
critLengthwill be excluded

◆ filterHistoryActionsVector()

MRMESH_API std::pair< bool, int > MR::filterHistoryActionsVector ( HistoryActionsVector & historyVector,
HistoryStackFilter filteringCondition,
size_t firstRedoIndex = 0,
bool deepFiltering = true )

Remove actions from history actions vector that match the condition.

Parameters
firstRedoIndex- set redo index for calculate how many actions removed before it
deepFiltering- filter actions into combined actions
Returns
pair (anything removed, how many removed before firstRedoIndex)

◆ FilterHistoryByCondition()

MRVIEWER_API void MR::FilterHistoryByCondition ( HistoryStackFilter filteringCondition,
bool deepFiltering = true )

Remove actions from global history (if it is enabled) that match the condition

Parameters
deepFiltering- filter actions into combined actions

◆ findAlphaShapeAllTriangles()

MRMESH_API Triangulation MR::findAlphaShapeAllTriangles ( const PointCloud & cloud,
float radius )

find all triangles of alpha-shape with negative alpha = -1/radius

◆ findAlphaShapeNeiTriangles()

MRMESH_API void MR::findAlphaShapeNeiTriangles ( const PointCloud & cloud,
VertId v,
float radius,
Triangulation & appendTris,
std::vector< VertId > & neis,
bool onlyLargerVids )

if true then two other points must have larger ids (to avoid finding same triangles several times)

find all triangles of alpha-shape with negative alpha = -1/radius, where each triangle contains point #v and two other points

Parameters
appendTrisfound triangles will be appended here
neistemporary storage to avoid memory allocations, it will be filled with all neighbours within 2*radius

◆ findBestFreeformDeformation()

MRMESH_API std::vector< Vector3f > MR::findBestFreeformDeformation ( const Box3f & box,
const std::vector< Vector3f > & source,
const std::vector< Vector3f > & target,
const Vector3i & resolution = Vector3i::diagonal(2) )

◆ findClosestToMouseEdge() [1/2]

HoleEdgePoint MR::findClosestToMouseEdge ( const Vector2i & mousePos,
const std::vector< std::shared_ptr< ObjectLines > > & objsLines,
float accuracy = 5.5f )
inline

◆ findClosestToMouseEdge() [2/2]

MRVIEWER_API HoleEdgePoint MR::findClosestToMouseEdge ( const Vector2i & mousePos,
const std::vector< std::shared_ptr< ObjectLinesHolder > > & objsLines,
float accuracy = 5.5f )

find closest to mouse edge from polylines

Parameters
mousePosmouse position in screen
accuracymaximum distances from mouse position to line in viewport (screen) space
Returns
pair closest edge and according index of polyline

◆ findClosestToMouseHoleEdge()

MRVIEWER_API HoleEdgePoint MR::findClosestToMouseHoleEdge ( const Vector2i & mousePos,
const std::shared_ptr< ObjectMeshHolder > & objMesh,
const std::vector< EdgeId > & holeRepresentativeEdges,
float accuracy = 5.5f,
bool attractToVert = false,
float cornerAccuracy = 10.5f )

find closest to mouse edge from hole borders

Parameters
mousePosmouse position in screen
accuracy,cornerAccuracymaximum distances from mouse position to line / corner in viewport (screen) space
Returns
pair closest edge and according index of hole in holeRepresentativeEdges

◆ findCloseVertices() [1/4]

MRMESH_API std::optional< VertBitSet > MR::findCloseVertices ( const Mesh & mesh,
float closeDist,
const ProgressCallback & cb = {} )

finds all close vertices, where for each vertex there is another one located within given distance

◆ findCloseVertices() [2/4]

MRMESH_API std::optional< VertBitSet > MR::findCloseVertices ( const PointCloud & cloud,
float closeDist,
const ProgressCallback & cb = {} )

finds all close vertices, where for each vertex there is another one located within given distance

◆ findCloseVertices() [3/4]

MRMESH_API std::optional< VertBitSet > MR::findCloseVertices ( const VertCoords & points,
float closeDist,
const VertBitSet * valid = nullptr,
const ProgressCallback & cb = {} )

finds all close vertices, where for each vertex there is another one located within given distance

◆ findCloseVertices() [4/4]

MRMESH_API VertBitSet MR::findCloseVertices ( const VertMap & smallestMap)

finds all close vertices, where for each vertex there is another one located within given distance; smallestMap is the result of findSmallestCloseVertices function call

◆ findHalfSpacePoints()

MRMESH_API VertBitSet MR::findHalfSpacePoints ( const PointCloud & pc,
const Plane3f & plane )
Returns
All vertices on the positive side of the plane
Parameters
pcInput point cloud that will be cut by the plane
planeInput plane to cut point cloud with

◆ findIncidentFaces()

MRVIEWER_API FaceBitSet MR::findIncidentFaces ( const Viewport & viewport,
const BitSet & pixBs,
const ObjectMesh & obj,
bool onlyVisible = false,
bool includeBackfaces = true,
const std::vector< ObjectMesh * > * occludingMeshes = nullptr )

get faces ids of object located in selected area on viewport

Parameters
pixBsthe matrix of pixels (in local space of viewport) belonging selected area
onlyVisibleget only visible faces (that no covered another faces)
includeBackfacesget also faces from back side of object

◆ findInnerShellFacesWithSplits()

MRMESH_API FaceBitSet MR::findInnerShellFacesWithSplits ( const MeshPart & mp,
Mesh & shell,
Side side )

Finds inner-shell faces on bidirectional

Parameters
shellconstructed for an open
mp;
sidespecifies which side of shell is of interest: negative or positive relative to mesh normals; The function will return all shell faces (after some subdivision) that have distance to mesh of same sign as
sideexcluding the face projecting on mesh boundary

◆ findInnerShellVerts()

MRMESH_API VertBitSet MR::findInnerShellVerts ( const MeshPart & mp,
const Mesh & shell,
Side side,
float maxAbsDistSq = FLT_MAX )

Finds inner-shell vertices on bidirectional

Parameters
shellconstructed for an open
mp;
sidespecifies which side of shell is of interest: negative or positive relative to mesh normals; The function will return all shell vertices that have distance to mesh of same sign as
sideexcluding the vertices projecting on mesh boundary Vertices with squared distances to the mesh more than
maxAbsDistSqwill not be considered as shell vertices

◆ findLeftBoundary() [1/2]

std::vector< EdgeLoop > MR::findLeftBoundary ( const MeshTopology & topology,
const FaceBitSet & region )
inline

◆ findLeftBoundary() [2/2]

MRMESH_API std::vector< EdgeLoop > MR::findLeftBoundary ( const MeshTopology & topology,
const FaceBitSet * region = nullptr )

◆ findLeftBoundaryInsideMesh()

MRMESH_API std::vector< EdgePath > MR::findLeftBoundaryInsideMesh ( const MeshTopology & topology,
const FaceBitSet & region )

◆ findNeighborVerts()

MRMESH_API VertBitSet MR::findNeighborVerts ( const Mesh & mesh,
const PointOnFace & start,
float range )

calculates all neighbor vertices within a given

Parameters
rangeand to first vertices with the distance more or equal than range

◆ findOverhangs()

MRMESH_API Expected< std::vector< FaceBitSet > > MR::findOverhangs ( const Mesh & mesh,
const FindOverhangsSettings & settings )

Find face regions that might create overhangs.

Parameters
mesh- source mesh
settings- parameters
Returns
face regions

◆ findOverlappingTris()

MRMESH_API Expected< FaceBitSet, std::string > MR::findOverlappingTris ( const MeshPart & mp,
const FindOverlappingSettings & settings )

finds all triangles that have oppositely oriented close triangle in the mesh

◆ findPathWithExtension()

MRMESH_API std::filesystem::path MR::findPathWithExtension ( const std::filesystem::path & pathWithoutExtension)

given file name without final extension, finds in the same folder an existing file with same stem and any extension

◆ findRegionBoundary() [1/2]

std::vector< EdgeLoop > MR::findRegionBoundary ( const MeshTopology & topology,
const FaceBitSet & region )
inline

◆ findRegionBoundary() [2/2]

MRMESH_API std::vector< EdgeLoop > MR::findRegionBoundary ( const MeshTopology & topology,
const FaceBitSet * region = nullptr )

◆ findRegionBoundaryUndirectedEdgesInsideMesh()

MRMESH_API UndirectedEdgeBitSet MR::findRegionBoundaryUndirectedEdgesInsideMesh ( const MeshTopology & topology,
const FaceBitSet & region )

◆ findRegionOuterFaces()

MRMESH_API FaceBitSet MR::findRegionOuterFaces ( const MeshTopology & topology,
const FaceBitSet & region )
Returns
All out of region faces that have a common edge with at least one region face

◆ findRepeatedOrientedTriangles() [1/2]

MRMESH_API Triangulation MR::findRepeatedOrientedTriangles ( const AllLocalTriangulations & triangs,
int repetitions )

from local triangulations returns all oriented triangles with given number of repetitions each in [1,3]

◆ findRepeatedOrientedTriangles() [2/2]

MRMESH_API void MR::findRepeatedOrientedTriangles ( const AllLocalTriangulations & triangs,
Triangulation * outRep3,
Triangulation * outRep2 )

optional output with all oriented triangles that appear in exactly two local triangulations

from local triangulations returns all oriented triangles with 3 or 2 repetitions each; if both outRep3 and outRep2 are necessary then it is faster to call this function than above one

Parameters
outRep3optional output with all oriented triangles that appear in three local triangulations

◆ findRepeatedUnorientedTriangles()

MRMESH_API std::vector< UnorientedTriangle > MR::findRepeatedUnorientedTriangles ( const AllLocalTriangulations & triangs,
int repetitions )

from local triangulations returns all unoriented triangles with given number of repetitions each in [1,3]

◆ findRightBoundary() [1/2]

std::vector< EdgeLoop > MR::findRightBoundary ( const MeshTopology & topology,
const FaceBitSet & region )
inline

◆ findRightBoundary() [2/2]

MRMESH_API std::vector< EdgeLoop > MR::findRightBoundary ( const MeshTopology & topology,
const FaceBitSet * region = nullptr )

◆ findSegmentSegmentIntersectionPrecise() [1/2]

MRMESH_API Vector2f MR::findSegmentSegmentIntersectionPrecise ( const Vector2f & a,
const Vector2f & b,
const Vector2f & c,
const Vector2f & d,
CoordinateConverters2 converters )

finds intersection precise, using high precision int inside this function input should have intersection

◆ findSegmentSegmentIntersectionPrecise() [2/2]

MRMESH_API Vector2i MR::findSegmentSegmentIntersectionPrecise ( const Vector2i & a,
const Vector2i & b,
const Vector2i & c,
const Vector2i & d )

finds intersection precise, using high precision int inside this function input should have intersection

◆ findSkyRays()

MRMESH_API BitSet MR::findSkyRays ( const Mesh & terrain,
const VertCoords & samples,
const VertBitSet & validSamples,
const std::vector< SkyPatch > & skyPatches,
std::vector< MeshIntersectionResult > * outIntersections = nullptr )

In each valid sample point tests the rays from that point in the sky;

Returns
bitset where for every valid sample #i its rays are stored at indices [i*numPatches; (i+1)*numPatches), 0s for occluded rays (hitting the terrain) and 1s for the ones which don't hit anything and reach the sky
Parameters
outIntersections- optional output vector of MeshIntersectionResult for every valid sample point

◆ findSmallestCloseVertices() [1/3]

MRMESH_API std::optional< VertMap > MR::findSmallestCloseVertices ( const Mesh & mesh,
float closeDist,
const ProgressCallback & cb = {} )

returns a map where each valid vertex is mapped to the smallest valid vertex Id located within given distance (including itself), and this smallest vertex is mapped to itself, each vertex not from valid set is mapped to itself

◆ findSmallestCloseVertices() [2/3]

MRMESH_API std::optional< VertMap > MR::findSmallestCloseVertices ( const PointCloud & cloud,
float closeDist,
const ProgressCallback & cb = {} )

returns a map where each valid vertex is mapped to the smallest valid vertex Id located within given distance (including itself), and this smallest vertex is mapped to itself, each vertex not from valid set is mapped to itself

◆ findSmallestCloseVertices() [3/3]

MRMESH_API std::optional< VertMap > MR::findSmallestCloseVertices ( const VertCoords & points,
float closeDist,
const VertBitSet * valid = nullptr,
const ProgressCallback & cb = {} )

returns a map where each valid vertex is mapped to the smallest valid vertex Id located within given distance (including itself), and this smallest vertex is mapped to itself, each vertex not from valid set is mapped to itself; the search tree is constructe inside

◆ findSmallestCloseVerticesUsingTree()

MRMESH_API std::optional< VertMap > MR::findSmallestCloseVerticesUsingTree ( const VertCoords & points,
float closeDist,
const AABBTreePoints & tree,
const VertBitSet * valid,
const ProgressCallback & cb = {} )

returns a map where each valid vertex is mapped to the smallest valid vertex Id located within given distance (including itself), and this smallest vertex is mapped to itself, each vertex not from valid set is mapped to itself; given tree is used as is

◆ findTwinEdgeHashMap()

MRMESH_API EdgeHashMap MR::findTwinEdgeHashMap ( const Mesh & mesh,
float closeDist )

finds a mapping from an edge to a twin edge in given mesh (each twin edge will be present either in key or in the value of returned map)

◆ findTwinEdges() [1/2]

MRMESH_API EdgeBitSet MR::findTwinEdges ( const EdgeHashMap & emap)

finds all twin edges from given map

◆ findTwinEdges() [2/2]

MRMESH_API EdgeBitSet MR::findTwinEdges ( const Mesh & mesh,
float closeDist )

finds all twin edges in the mesh

◆ findTwinUndirectedEdges() [1/2]

MRMESH_API UndirectedEdgeBitSet MR::findTwinUndirectedEdges ( const EdgeHashMap & emap)

finds all twin edges from given map

◆ findTwinUndirectedEdges() [2/2]

MRMESH_API UndirectedEdgeBitSet MR::findTwinUndirectedEdges ( const Mesh & mesh,
float closeDist )

finds all twin edges in the mesh

◆ findVertsInViewportArea()

MRVIEWER_API VertBitSet MR::findVertsInViewportArea ( const Viewport & viewport,
const BitSet & bsVec,
const ObjectPoints & obj,
bool includeBackfaces = true,
bool onlyVisible = false )

get vertex ids of object located in selected area on viewport

Parameters
bsVecthe matrix of pixels (in local space of viewport) belonging to selected area
includeBackfacesget also vertices with normals not toward the camera
onlyVisibleget only visible vertices (that no covered with clipping plane)

◆ floatGridToVdbVolume()

MRMESH_API VdbVolume MR::floatGridToVdbVolume ( const FloatGrid & grid)

◆ fopen()

MRMESH_API FILE * MR::fopen ( const std::filesystem::path & filename,
const char * mode )

this version of fopen unlike std::fopen supports unicode file names on Windows

◆ formatNoTrailingZeros()

MRMESH_API char * MR::formatNoTrailingZeros ( char * fmt,
double v,
int digitsAfterPoint,
int precision = 6 )

returns printf-format for floating-point value in decimal notation with given precision in digits and without trailing zeros after the decimal point

Parameters
fmtpreallocated buffer of 5 bytes
vvalue to print
digitsAfterPointmaximal number of digits after decimal point
precisionmaximal number of not-zero decimal digits

◆ fromSceneMison() [1/2]

MRMESH_API Expected< std::shared_ptr< Object >, std::string > MR::fromSceneMison ( const std::filesystem::path & path,
std::string * loadWarn = nullptr,
ProgressCallback callback = {} )

load scene from MISON file
JSON file with array named "Objects" or root array:
element fields:
"Filename" : required full path to file for loading object "XF": optional xf for loaded object "Name": optional name for loaded object

◆ fromSceneMison() [2/2]

MRMESH_API Expected< std::shared_ptr< Object >, std::string > MR::fromSceneMison ( std::istream & in,
std::string * loadWarn = nullptr,
ProgressCallback callback = {} )

◆ generalOffsetMesh()

MRMESH_API Expected< Mesh > MR::generalOffsetMesh ( const MeshPart & mp,
float offset,
const GeneralOffsetParameters & params )

Offsets mesh by converting it to voxels and back using one of three modes specified in the parameters.

◆ get() [1/18]

template<size_t I, typename V >
constexpr std::tuple_element< I, AffineXf< V > >::type & MR::get ( AffineXf< V > & m)
constexprnoexcept

◆ get() [2/18]

template<size_t I>
constexpr uint8_t & MR::get ( Color & c)
constexprnoexcept

◆ get() [3/18]

template<size_t I, typename V >
constexpr const std::tuple_element< I, AffineXf< V > >::type & MR::get ( const AffineXf< V > & m)
constexprnoexcept

◆ get() [4/18]

template<size_t I>
constexpr const uint8_t & MR::get ( const Color & c)
constexprnoexcept

◆ get() [5/18]

template<size_t I, typename T >
constexpr const Matrix2< T >::VectorType & MR::get ( const Matrix2< T > & m)
constexprnoexcept

◆ get() [6/18]

template<size_t I, typename T >
constexpr const Matrix3< T >::VectorType & MR::get ( const Matrix3< T > & m)
constexprnoexcept

◆ get() [7/18]

template<size_t I, typename T >
constexpr const Matrix4< T >::VectorType & MR::get ( const Matrix4< T > & m)
constexprnoexcept

◆ get() [8/18]

template<size_t I, typename T >
constexpr int MR::get ( const MR::Id< T > & id)
constexprnoexcept

◆ get() [9/18]

template<size_t I, typename T >
constexpr const T & MR::get ( const Vector2< T > & v)
constexprnoexcept

◆ get() [10/18]

template<size_t I, typename T >
constexpr const T & MR::get ( const Vector3< T > & v)
constexprnoexcept

◆ get() [11/18]

template<size_t I, typename T >
constexpr const T & MR::get ( const Vector4< T > & v)
constexprnoexcept

◆ get() [12/18]

template<size_t I, typename T >
constexpr Matrix2< T >::VectorType & MR::get ( Matrix2< T > & m)
constexprnoexcept

◆ get() [13/18]

template<size_t I, typename T >
constexpr Matrix3< T >::VectorType & MR::get ( Matrix3< T > & m)
constexprnoexcept

◆ get() [14/18]

template<size_t I, typename T >
constexpr Matrix4< T >::VectorType & MR::get ( Matrix4< T > & m)
constexprnoexcept

◆ get() [15/18]

template<size_t I, typename T >
constexpr int & MR::get ( MR::Id< T > & id)
constexprnoexcept

◆ get() [16/18]

template<size_t I, typename T >
constexpr T & MR::get ( Vector2< T > & v)
constexprnoexcept

◆ get() [17/18]

template<size_t I, typename T >
constexpr T & MR::get ( Vector3< T > & v)
constexprnoexcept

◆ get() [18/18]

template<size_t I, typename T >
constexpr T & MR::get ( Vector4< T > & v)
constexprnoexcept

◆ getAt() [1/2]

template<typename T , typename I >
T MR::getAt ( const Buffer< T, I > & bmap,
I key )
inline

given some buffer map and a key, returns the value associated with the key, or default value if key is invalid

◆ getAt() [2/2]

template<typename T , typename I >
T MR::getAt ( const Vector< T, I > & a,
I id,
T def = {} )
inline

given some Vector and a key, returns the value associated with the key, or default value if key is invalid or outside the Vector

◆ GetAvailableLineWidthRange()

MRVIEWER_API const Vector2f & MR::GetAvailableLineWidthRange ( )

◆ getBoundaryFaces()

MRMESH_API FaceBitSet MR::getBoundaryFaces ( const MeshTopology & topology,
const FaceBitSet & region )

returns faces from given region that have at least one neighbor face with shared edge not from the region

◆ getBoundaryVerts()

MRMESH_API VertBitSet MR::getBoundaryVerts ( const MeshTopology & topology,
const FaceBitSet * region = nullptr )

◆ getCancelMessage()

std::string MR::getCancelMessage ( const std::filesystem::path & path)
inline

◆ GetClipboardText()

MRMESH_API std::string MR::GetClipboardText ( )

◆ GetCpuId()

MRMESH_API std::string MR::GetCpuId ( )

◆ getCurrentStacktrace()

MRMESH_API std::string MR::getCurrentStacktrace ( )

returns string representation of the current stacktrace

◆ getDefaultUnitParams()

template<UnitEnum E>
const UnitToStringParams< E > & MR::getDefaultUnitParams ( )

◆ getDepthFunctionLEqual()

int MR::getDepthFunctionLEqual ( DepthFunction funcType)
inline

◆ getDepthFunctionLess()

int MR::getDepthFunctionLess ( DepthFunction funcType)
inline

◆ GetDetailedOSName()

MRMESH_API std::string MR::GetDetailedOSName ( )

◆ getEdgeOrdering()

MRMESH_API UndirectedEdgeBMap MR::getEdgeOrdering ( const FaceBMap & faceMap,
const MeshTopology & topology )

compute the order of edges given the order of faces: edges near first faces also appear first;

Parameters
faceMapold face id -> new face id

◆ GetEmbeddedPythonDirectory()

MRMESH_API std::filesystem::path MR::GetEmbeddedPythonDirectory ( )

◆ GetExeDirectory()

MRMESH_API std::filesystem::path MR::GetExeDirectory ( )

◆ GetFontsDirectory()

MRMESH_API std::filesystem::path MR::GetFontsDirectory ( )

◆ getFragmentShaderClippingBlock()

MRVIEWER_API std::string MR::getFragmentShaderClippingBlock ( )

◆ getFragmentShaderEndBlock()

MRVIEWER_API std::string MR::getFragmentShaderEndBlock ( bool alphaSort)

◆ getFragmentShaderHeaderBlock()

MRVIEWER_API std::string MR::getFragmentShaderHeaderBlock ( bool gl4,
bool alphaSort )

◆ getFragmentShaderOnlyOddBlock()

MRVIEWER_API std::string MR::getFragmentShaderOnlyOddBlock ( bool sampleMask)

◆ getFragmentShaderPointSizeBlock()

MRVIEWER_API std::string MR::getFragmentShaderPointSizeBlock ( )

◆ GetHomeDirectory()

MRMESH_API std::filesystem::path MR::GetHomeDirectory ( )

◆ getICPStatusInfo()

MRMESH_API std::string MR::getICPStatusInfo ( int iterations,
ICPExitType exitType )

returns status info string

◆ getIncidentEdges()

MRMESH_API UndirectedEdgeBitSet MR::getIncidentEdges ( const MeshTopology & topology,
const FaceBitSet & faces )

◆ getIncidentFaces() [1/2]

MRMESH_API FaceBitSet MR::getIncidentFaces ( const MeshTopology & topology,
const UndirectedEdgeBitSet & edges )

◆ getIncidentFaces() [2/2]

MRMESH_API FaceBitSet MR::getIncidentFaces ( const MeshTopology & topology,
const VertBitSet & verts )

◆ getIncidentVerts() [1/4]

MRMESH_API VertBitSet MR::getIncidentVerts ( const MeshTopology & topology,
const FaceBitSet & faces )

◆ getIncidentVerts() [2/4]

MRMESH_API const VertBitSet & MR::getIncidentVerts ( const MeshTopology & topology,
const FaceBitSet * faces,
VertBitSet & store )

◆ getIncidentVerts() [3/4]

MRMESH_API VertBitSet MR::getIncidentVerts ( const MeshTopology & topology,
const UndirectedEdgeBitSet & edges )

◆ getIncidentVerts() [4/4]

MRMESH_API const VertBitSet & MR::getIncidentVerts ( const MeshTopology & topology,
const UndirectedEdgeBitSet * edges,
VertBitSet & store )

◆ getInnerEdges() [1/2]

MRMESH_API UndirectedEdgeBitSet MR::getInnerEdges ( const MeshTopology & topology,
const FaceBitSet & region )

◆ getInnerEdges() [2/2]

MRMESH_API UndirectedEdgeBitSet MR::getInnerEdges ( const MeshTopology & topology,
const VertBitSet & verts )

◆ getInnerFaces()

MRMESH_API FaceBitSet MR::getInnerFaces ( const MeshTopology & topology,
const VertBitSet & verts )

◆ getInnerVerts() [1/3]

MRMESH_API VertBitSet MR::getInnerVerts ( const MeshTopology & topology,
const FaceBitSet & region )

◆ getInnerVerts() [2/3]

MRMESH_API VertBitSet MR::getInnerVerts ( const MeshTopology & topology,
const FaceBitSet * region = nullptr )

◆ getInnerVerts() [3/3]

MRMESH_API VertBitSet MR::getInnerVerts ( const MeshTopology & topology,
const UndirectedEdgeBitSet & edges )

◆ GetLibsDirectory()

MRMESH_API std::filesystem::path MR::GetLibsDirectory ( )

◆ getLimitedPos()

template<typename V >
V MR::getLimitedPos ( const V & pos,
const V & guidePos,
typename V::ValueType maxGuideDistSq )
inline

if (pos) is within the ball with the center at (guidePos) and squared radius (maxGuideDistSq), then returns (pos); otherwise returns the point on the ball's border closest to (pos)

◆ getLinesFragmentShader()

MRVIEWER_API std::string MR::getLinesFragmentShader ( bool alphaSort)

◆ getLinesJointFragmentShader()

MRVIEWER_API std::string MR::getLinesJointFragmentShader ( )

◆ getLinesJointPickerVertexShader()

MRVIEWER_API std::string MR::getLinesJointPickerVertexShader ( )

◆ getLinesJointVertexShader()

MRVIEWER_API std::string MR::getLinesJointVertexShader ( )

◆ getLinesPickerVertexShader()

MRVIEWER_API std::string MR::getLinesPickerVertexShader ( )

◆ getLinesVertexShader()

MRVIEWER_API std::string MR::getLinesVertexShader ( )

◆ getMeanSqDistToPlane()

float MR::getMeanSqDistToPlane ( const PointPairs & pairs)
inline

computes root-mean-square deviation from points to target planes

◆ getMeanSqDistToPoint()

float MR::getMeanSqDistToPoint ( const PointPairs & pairs)
inline

computes root-mean-square deviation between points

◆ getMeshFragmentShader()

MRVIEWER_API std::string MR::getMeshFragmentShader ( bool gl4,
bool alphaSort )

◆ getMeshFragmentShaderArgumetsBlock()

MRVIEWER_API std::string MR::getMeshFragmentShaderArgumetsBlock ( )

◆ getMeshFragmentShaderColoringBlock()

MRVIEWER_API std::string MR::getMeshFragmentShaderColoringBlock ( )

◆ getMeshOrPoints()

MRMESH_API std::optional< MeshOrPoints > MR::getMeshOrPoints ( const VisualObject * obj)

constructs MeshOrPoints from ObjectMesh or ObjectPoints, otherwise returns nullopt

◆ getMeshVerticesShader()

MRVIEWER_API std::string MR::getMeshVerticesShader ( )

◆ getMouseModeString()

std::string MR::getMouseModeString ( MouseMode mode)
inline

◆ GetMRVersionString()

MRMESH_API std::string MR::GetMRVersionString ( )

◆ getNeighborFaces()

MRMESH_API FaceBitSet MR::getNeighborFaces ( const MeshTopology & topology,
const UndirectedEdgeBitSet & edges )

◆ getNumActivePairs()

MRMESH_API size_t MR::getNumActivePairs ( const PointPairs & pairs)

computes the number of active pairs

◆ getOneMeshIntersectionContours()

MRMESH_API OneMeshContours MR::getOneMeshIntersectionContours ( const Mesh & meshA,
const Mesh & meshB,
const ContinuousContours & contours,
bool getMeshAIntersections,
const CoordinateConverters & converters,
const AffineXf3f * rigidB2A = nullptr )

◆ getOptimalFaceOrdering()

MRMESH_API FaceBMap MR::getOptimalFaceOrdering ( const Mesh & mesh)

computes optimal order of faces: old face id -> new face id, the order is similar as in AABB tree, but faster to compute

◆ getOSNoSpaces()

MRMESH_API std::string MR::getOSNoSpaces ( )

◆ getPickerFragmentShader()

MRVIEWER_API std::string MR::getPickerFragmentShader ( bool points)

◆ getRegionBoundaryVerts()

MRMESH_API VertBitSet MR::getRegionBoundaryVerts ( const MeshTopology & topology,
const FaceBitSet & region )

◆ getRegionEdges()

MRMESH_API EdgeBitSet MR::getRegionEdges ( const MeshTopology & topology,
const FaceBitSet & faces )

◆ GetResourcesDirectory()

MRMESH_API std::filesystem::path MR::GetResourcesDirectory ( )

◆ getShaderMainBeginBlock()

MRVIEWER_API std::string MR::getShaderMainBeginBlock ( )

◆ getSumSqDistToPlane()

MRMESH_API NumSum MR::getSumSqDistToPlane ( const PointPairs & pairs)

computes the number of active pairs and the sum of squared deviation from points to target planes

◆ getSumSqDistToPoint()

MRMESH_API NumSum MR::getSumSqDistToPoint ( const PointPairs & pairs)

computes the number of active pairs and the sum of squared distances between points

◆ GetSystemInfoJson()

MRVIEWER_API Json::Value MR::GetSystemInfoJson ( )

◆ GetTempDirectory()

MRMESH_API std::filesystem::path MR::GetTempDirectory ( )

◆ getTrivialVertexShader()

MRVIEWER_API std::string MR::getTrivialVertexShader ( )

◆ getUnitInfo()

template<UnitEnum E>
const UnitInfo & MR::getUnitInfo ( E unit)
delete

◆ getUserConfigDir()

MRMESH_API std::filesystem::path MR::getUserConfigDir ( )

◆ getUserConfigFilePath()

MRMESH_API std::filesystem::path MR::getUserConfigFilePath ( )

◆ getVertexOrdering()

MRMESH_API VertBMap MR::getVertexOrdering ( const FaceBMap & faceMap,
const MeshTopology & topology )

compute the order of vertices given the order of faces: vertices near first faces also appear first;

Parameters
faceMapold face id -> new face id

◆ getViewerInstance()

MRVIEWER_API Viewer & MR::getViewerInstance ( )

◆ getVolumeFragmentShader()

MRVIEWER_API std::string MR::getVolumeFragmentShader ( )

◆ getVolumePickerFragmentShader()

MRVIEWER_API std::string MR::getVolumePickerFragmentShader ( )

◆ getXfFromOxyPlane() [1/2]

MRMESH_API AffineXf3f MR::getXfFromOxyPlane ( const Contours3f & contours)

computes the transformation that maps O into center mass of contours' points OXY into best plane containing the points

◆ getXfFromOxyPlane() [2/2]

MRMESH_API AffineXf3f MR::getXfFromOxyPlane ( const Mesh & mesh,
const std::vector< EdgePath > & paths )

◆ gridToMesh() [1/2]

MRMESH_API Expected< Mesh > MR::gridToMesh ( const FloatGrid & grid,
const GridToMeshSettings & settings )

converts OpenVDB Grid into mesh using Dual Marching Cubes algorithm

◆ gridToMesh() [2/2]

MRMESH_API Expected< Mesh > MR::gridToMesh ( FloatGrid && grid,
const GridToMeshSettings & settings )

converts OpenVDB Grid into mesh using Dual Marching Cubes algorithm; deletes grid in the middle to reduce peak memory consumption

◆ guessPrecision() [1/4]

template<detail::Units::Scalar T>
MRVIEWER_API int MR::guessPrecision ( T min,
T max )

◆ guessPrecision() [2/4]

template<typename T >
requires (VectorTraits<T>::size > 1 && detail::Units::Scalar<typename VectorTraits<T>::BaseType>)
int MR::guessPrecision ( T min,
T max )

◆ guessPrecision() [3/4]

template<detail::Units::Scalar T>
MRVIEWER_API int MR::guessPrecision ( T value)

◆ guessPrecision() [4/4]

template<typename T >
requires (VectorTraits<T>::size > 1 && detail::Units::Scalar<typename VectorTraits<T>::BaseType>)
int MR::guessPrecision ( T value)

◆ hasAnyIsoline() [1/2]

MRMESH_API bool MR::hasAnyIsoline ( const MeshTopology & topology,
const VertMetric & vertValues,
const FaceBitSet * region = nullptr )

quickly returns true if extractIsolines produce not-empty set for the same arguments

◆ hasAnyIsoline() [2/2]

MRMESH_API bool MR::hasAnyIsoline ( const MeshTopology & topology,
const VertScalars & vertValues,
float isoValue,
const FaceBitSet * region = nullptr )

quickly returns true if extractIsolines produce not-empty set for the same arguments

◆ hasAnyPlaneSection()

MRMESH_API bool MR::hasAnyPlaneSection ( const MeshPart & mp,
const Plane3f & plane )

quickly returns true if extractPlaneSections produce not-empty set for the same arguments

◆ hasAnyXYPlaneSection()

MRMESH_API bool MR::hasAnyXYPlaneSection ( const MeshPart & mp,
float zLevel )

quickly returns true if extractXYPlaneSections produce not-empty set for the same arguments

◆ hasProhibitedChars()

MRMESH_API bool MR::hasProhibitedChars ( const std::string & line)

returns true if line contains any of OS prohibited chars ('?', '*', '/', '\', '"', '<', '>')

◆ inflate()

MRMESH_API void MR::inflate ( Mesh & mesh,
const VertBitSet & verts,
const InflateSettings & settings )

Inflates (in one of two sides) given mesh region, putting given vertices in such positions to make smooth surface inside verts-region, but sharp on its boundary;

Parameters
vertsmust not include all vertices of a mesh connected component

◆ interpolateArcs()

MRMESH_API VoidOrErrStr MR::interpolateArcs ( std::vector< GCommand > & commands,
const ArcInterpolationParams & params,
Axis axis )

◆ interpolateLines()

MRMESH_API VoidOrErrStr MR::interpolateLines ( std::vector< GCommand > & commands,
const LineInterpolationParams & params,
Axis axis )

◆ isInnerShellVert()

MRMESH_API bool MR::isInnerShellVert ( const MeshPart & mp,
const Vector3f & shellPoint,
Side side,
float maxAbsDistSq = FLT_MAX )

Tests

Parameters
shellPointfrom bidirectional shell constructed for an open
mp;
sidespecifies which side of shell is of interest: negative or positive relative to mesh normals;
Returns
whether the distance from given point to given mesh part is of same sign as
Parameters
side,alwaysreturning false for the points projecting on mesh boundary if squared distance to the point is more than
maxAbsDistSq,returnsfalse

◆ isNanFast()

bool MR::isNanFast ( float f)
inline

quickly tests whether given float is not-a-number

◆ isPickedPointValid()

MRMESH_API bool MR::isPickedPointValid ( const VisualObject * object,
const PickedPoint & point )

◆ isRigid()

template<typename T >
bool MR::isRigid ( const Matrix3< T > & m)

Returns true if matrix scale is identity.

◆ isTIFFFile()

MRMESH_API bool MR::isTIFFFile ( const std::filesystem::path & path)

◆ lacingToolPath()

MRMESH_API Expected< ToolPathResult, std::string > MR::lacingToolPath ( const MeshPart & mp,
const ToolPathParams & params,
Axis cutDirection )

◆ launchDefaultViewer()

MRVIEWER_API int MR::launchDefaultViewer ( const Viewer::LaunchParams & params,
const ViewerSetup & setup )

◆ leftRing() [1/2]

IteratorRange< LeftRingIterator > MR::leftRing ( const MeshTopology & topology,
EdgeId edge )
inline

◆ leftRing() [2/2]

IteratorRange< LeftRingIterator > MR::leftRing ( const MeshTopology & topology,
FaceId f )
inline

◆ leftRing0()

IteratorRange< LeftRingIterator > MR::leftRing0 ( const MeshTopology & topology,
EdgeId edge )
inline

◆ levelSetDoubleConvertion()

MRMESH_API Expected< Mesh > MR::levelSetDoubleConvertion ( const MeshPart & mp,
const AffineXf3f & xf,
float voxelSize,
float offsetA,
float offsetB,
float adaptivity = 0.0f,
std::shared_ptr< IFastWindingNumber > fwn = {},
ProgressCallback cb = {} )
Parameters
fwndefines particular implementation of IFastWindingNumber interface that will compute windings. If it is not specified, default FastWindingNumber is used

◆ loadGL()

int MR::loadGL ( )
inline

◆ loadMeshDll()

MRMESH_API void MR::loadMeshDll ( )

◆ loadMRMeshPyModule()

MRMESHPY_API void MR::loadMRMeshPyModule ( )

◆ loadMRViewerDll()

MRVIEWER_API void MR::loadMRViewerDll ( )

◆ makeArrow()

MRMESH_API Mesh MR::makeArrow ( const Vector3f & base,
const Vector3f & vert,
const float & thickness = 0.05f,
const float & coneRadius = 0.1f,
const float coneSize = 0.2f,
const int qual = 32 )

◆ makeBasisAxes()

MRMESH_API Mesh MR::makeBasisAxes ( const float & size = 1.0f,
const float & thickness = 0.05f,
const float & coneRadius = 0.1f,
const float coneSize = 0.2f,
const int qual = 32 )

◆ makeCone()

MRMESH_API Mesh MR::makeCone ( float radius0 = 0.1f,
float length = 1.0f,
int resolution = 32 )

◆ makeConvexHull() [1/3]

MRMESH_API Mesh MR::makeConvexHull ( const Mesh & in)

◆ makeConvexHull() [2/3]

MRMESH_API Mesh MR::makeConvexHull ( const PointCloud & in)

◆ makeConvexHull() [3/3]

MRMESH_API Mesh MR::makeConvexHull ( const VertCoords & points,
const VertBitSet & validPoints )

◆ makeCube()

MRMESH_API Mesh MR::makeCube ( const Vector3f & size = Vector3f::diagonal(1.0f),
const Vector3f & base = Vector3f::diagonal(-0.5f) )

◆ makeCylinder()

MRMESH_API Mesh MR::makeCylinder ( float radius = 0.1f,
float length = 1.0f,
int resolution = 16 )

◆ makeCylinderAdvanced()

MRMESH_API Mesh MR::makeCylinderAdvanced ( float radius0 = 0.1f,
float radius1 = 0.1f,
float start_angle = 0.0f,
float arc_size = 2.0f *PI_F,
float length = 1.0f,
int resolution = 16 )

◆ makeDegenerate()

template<typename T >
Triangle3< T > MR::makeDegenerate ( const Triangle3< T > & t)

make degenerate triangle (all 3 points on a line) that maximally resembles the input one and has the same centroid

◆ makeDegenerateBandAroundRegion()

MRMESH_API void MR::makeDegenerateBandAroundRegion ( Mesh & mesh,
const FaceBitSet & region,
const MakeDegenerateBandAroundRegionParams & params = {} )

Create a band of degenerate faces along the border of the specified region and the rest of the mesh.

The function is useful for extruding the region without changing the existing faces and creating holes

Parameters
mesh- the target mesh
region- the region required to be separated by a band of degenerate faces
params- optional output parameters

◆ makeMovementBuildBody()

MRMESH_API Mesh MR::makeMovementBuildBody ( const Contours3f & body,
const Contours3f & trajectory,
const MovementBuildBodyParams & params = {} )

makes mesh by moving body along trajectory if allowRotation rotate it in corners

◆ makeOpenCone()

MRMESH_API Mesh MR::makeOpenCone ( float radius = 1,
float zApex = 0,
float zBase = 1,
int numCircleSegments = 16 )

◆ makeOpenCylinder()

MRMESH_API Mesh MR::makeOpenCylinder ( float radius = 1,
float z1 = -1,
float z2 = 1,
int numCircleSegments = 16 )

◆ makeOuterHalfTorus()

MRMESH_API Mesh MR::makeOuterHalfTorus ( float primaryRadius = 1.0f,
float secondaryRadius = 0.1f,
int primaryResolution = 16,
int secondaryResolution = 16,
std::vector< Vector3f > * points = nullptr )

◆ makeParallelepiped()

MRMESH_API Mesh MR::makeParallelepiped ( const Vector3f side[3],
const Vector3f & base )

◆ makePlane()

MRMESH_API Mesh MR::makePlane ( )

◆ makePrism()

MRMESH_API Mesh MR::makePrism ( float baseLength,
float leftAngle,
float rightAngle,
float height = 1.0f )

◆ makeRegularGridMesh() [1/2]

MRMESH_API Expected< Mesh, std::string > MR::makeRegularGridMesh ( size_t width,
size_t height,
const RegularGridLatticeValidator & validator,
const RegularGridLatticePositioner & positioner,
const RegularGridMeshFaceValidator & faceValidator = {},
ProgressCallback cb = {} )

◆ makeRegularGridMesh() [2/2]

MRMESH_API Expected< Mesh, std::string > MR::makeRegularGridMesh ( VertCoords pc,
ProgressCallback cb = {} )

◆ makeRenderObjectConstructor()

template<typename RenderObjType >
IRenderObjectConstructorLambda MR::makeRenderObjectConstructor ( )

◆ makeRigidXf()

MRMESH_API AffineXf3f MR::makeRigidXf ( const MeshPart & mp,
const AffineXf3f & meshXf )

◆ makeSignedWithFastWinding()

MRMESH_API VoidOrErrStr MR::makeSignedWithFastWinding ( FloatGrid & grid,
const Vector3f & voxelSize,
const Mesh & refMesh,
const AffineXf3f & meshToGridXf = {},
std::shared_ptr< IFastWindingNumber > fwn = {},
ProgressCallback cb = {} )

set signs for unsigned distance field grid using refMesh FastWindingNumber;

Parameters
meshToGridXfdefines the mapping from mesh reference from to grid reference frame
fwndefines particular implementation of IFastWindingNumber interface that will compute windings. If it is not specified, default FastWindingNumber is used

◆ makeSphere()

MRMESH_API Mesh MR::makeSphere ( const SphereParams & params)

creates a mesh of sphere with irregular triangulation

◆ makeTorus()

MRMESH_API Mesh MR::makeTorus ( float primaryRadius = 1.0f,
float secondaryRadius = 0.1f,
int primaryResolution = 16,
int secondaryResolution = 16,
std::vector< Vector3f > * points = nullptr )

◆ makeTorusWithComponents()

MRMESH_API Mesh MR::makeTorusWithComponents ( float primaryRadius = 1.0f,
float secondaryRadius = 0.1f,
int primaryResolution = 16,
int secondaryResolution = 16,
std::vector< Vector3f > * points = nullptr )

◆ makeTorusWithSelfIntersections()

MRMESH_API Mesh MR::makeTorusWithSelfIntersections ( float primaryRadius = 1.0f,
float secondaryRadius = 0.1f,
int primaryResolution = 16,
int secondaryResolution = 16,
std::vector< Vector3f > * points = nullptr )

◆ makeTorusWithSpikes()

MRMESH_API Mesh MR::makeTorusWithSpikes ( float primaryRadius = 1.0f,
float secondaryRadiusInner = 0.1f,
float secondaryRadiusOuter = 0.5f,
int primaryResolution = 16,
int secondaryResolution = 16,
std::vector< Vector3f > * points = nullptr )

◆ makeTorusWithUndercut()

MRMESH_API Mesh MR::makeTorusWithUndercut ( float primaryRadius = 1.0f,
float secondaryRadiusInner = 0.1f,
float secondaryRadiusOuter = 0.2f,
int primaryResolution = 16,
int secondaryResolution = 16,
std::vector< Vector3f > * points = nullptr )

◆ makeUVSphere()

MRMESH_API Mesh MR::makeUVSphere ( float radius = 1.0,
int horisontalResolution = 16,
int verticalResolution = 16 )

creates a mesh of sphere with regular triangulation (parallels and meridians)

◆ mapEdge() [1/3]

UndirectedEdgeId MR::mapEdge ( const UndirectedEdgeBMap & map,
UndirectedEdgeId src )
inline

given input edge (src), converts its id using given map

◆ mapEdge() [2/3]

EdgeId MR::mapEdge ( const WholeEdgeHashMap & map,
EdgeId src )
inline

given input edge (src), converts its id using given map

◆ mapEdge() [3/3]

EdgeId MR::mapEdge ( const WholeEdgeMap & map,
EdgeId src )
inline

given input edge (src), converts its id using given map

◆ mapEdges() [1/3]

MRMESH_API UndirectedEdgeBitSet MR::mapEdges ( const UndirectedEdgeBMap & map,
const UndirectedEdgeBitSet & src )

given input bit-set (src), converts each id corresponding to set bit using given map, and sets its bit in the resulting bit set

◆ mapEdges() [2/3]

MRMESH_API UndirectedEdgeBitSet MR::mapEdges ( const WholeEdgeHashMap & map,
const UndirectedEdgeBitSet & src )

given input bit-set (src), converts each id corresponding to set bit using given map, and sets its bit in the resulting bit set

◆ mapEdges() [3/3]

MRMESH_API UndirectedEdgeBitSet MR::mapEdges ( const WholeEdgeMap & map,
const UndirectedEdgeBitSet & src )

given input bit-set (src), converts each id corresponding to set bit using given map, and sets its bit in the resulting bit set

◆ mapEdgesWithHistory() [1/3]

MRVIEWER_API void MR::mapEdgesWithHistory ( const std::shared_ptr< ObjectMesh > & objMesh,
const UndirectedEdgeBMap & emap )

◆ mapEdgesWithHistory() [2/3]

MRVIEWER_API void MR::mapEdgesWithHistory ( const std::shared_ptr< ObjectMesh > & objMesh,
const WholeEdgeHashMap & emap )

◆ mapEdgesWithHistory() [3/3]

MRVIEWER_API void MR::mapEdgesWithHistory ( const std::shared_ptr< ObjectMesh > & objMesh,
const WholeEdgeMap & emap )

maps edge selection and creases and adds history records for that; it is a good idea to make SCOPED_HISTORY before calling this function

◆ mapNewToOldVector()

template<typename ValueT , typename IndexT >
void MR::mapNewToOldVector ( const Vector< ValueT, Id< IndexT > > & oldData,
const Vector< Id< IndexT >, Id< IndexT > > & newToOld,
Vector< ValueT, Id< IndexT > > & newData )

◆ mapOldToNewVector()

template<typename ValueT , typename IndexT >
void MR::mapOldToNewVector ( const Vector< ValueT, Id< IndexT > > & oldData,
const Vector< Id< IndexT >, Id< IndexT > > & newToOld,
Vector< ValueT, Id< IndexT > > & newData )

◆ marchingCubes() [1/3]

MRMESH_API Expected< Mesh > MR::marchingCubes ( const FunctionVolume & volume,
const MarchingCubesParams & params = {} )

◆ marchingCubes() [2/3]

MRMESH_API Expected< Mesh > MR::marchingCubes ( const SimpleVolume & volume,
const MarchingCubesParams & params = {} )

◆ marchingCubes() [3/3]

MRMESH_API Expected< Mesh > MR::marchingCubes ( const VdbVolume & volume,
const MarchingCubesParams & params = {} )

◆ marchingCubesAsTriMesh() [1/3]

MRMESH_API Expected< TriMesh > MR::marchingCubesAsTriMesh ( const FunctionVolume & volume,
const MarchingCubesParams & params = {} )

◆ marchingCubesAsTriMesh() [2/3]

MRMESH_API Expected< TriMesh > MR::marchingCubesAsTriMesh ( const SimpleVolume & volume,
const MarchingCubesParams & params = {} )

◆ marchingCubesAsTriMesh() [3/3]

MRMESH_API Expected< TriMesh > MR::marchingCubesAsTriMesh ( const VdbVolume & volume,
const MarchingCubesParams & params = {} )

◆ mcOffsetMesh()

MRMESH_API Expected< Mesh > MR::mcOffsetMesh ( const MeshPart & mp,
float offset,
const OffsetParameters & params = {},
Vector< VoxelId, FaceId > * outMap = nullptr )

Offsets mesh by converting it to distance field in voxels (using OpenVDB library if SignDetectionMode::OpenVDB or our implementation otherwise) and back using standard Marching Cubes, as opposed to Dual Marching Cubes in offsetMesh(...)

◆ mcShellMeshRegion()

MRMESH_API Expected< Mesh > MR::mcShellMeshRegion ( const Mesh & mesh,
const FaceBitSet & region,
float offset,
const BaseShellParameters & params,
Vector< VoxelId, FaceId > * outMap = nullptr )

Constructs a shell around selected mesh region with the properties that every point on the shall must

  1. be located not further than given distance from selected mesh part,
  2. be located not closer to not-selected mesh part than to selected mesh part.

◆ mergeVolumePart()

template<typename Volume >
VoidOrErrStr MR::mergeVolumePart ( Mesh & mesh,
std::vector< EdgePath > & cutContours,
Volume && volume,
float leftCutPosition,
float rightCutPosition,
const MergeVolumePartSettings & settings = {} )

Merge one mesh with another generated from a voxel volume part.

The helper function for generating a mesh from a voxel volume without full memory loading. It performs several actions:

  • converts the voxel volume part into a mesh;
  • cuts it to make its sides accurate;
  • appends to the result mesh with the matching side cut contours. The functions has requirements for the input parameters:
  • the result mesh must have side contours on leftCutPosition;
  • the voxel volume part must have enough data to generate a mesh with correct cut contours. The usual way is to make an overlap for each volume part.
See also
volumeToMeshByParts
Parameters
mesh- result mesh to which the generated mesh will be attached
cutContours- cut contours of the result mesh; must be placed at leftCutPosition
volume- voxel volume part
leftCutPosition- position on X axis where the left side of the generated mesh is cut; pass -FLT_MAX to omit a cut here
rightCutPosition- position on X axis where the right side of the generated mesh is cut; pass +FLT_MAX to omit a cut here
settings- additional parameters; see MergeVolumePartSettings
Returns
nothing if succeeds, an error string otherwise

◆ meshDenoiseViaNormals()

MRMESH_API VoidOrErrStr MR::meshDenoiseViaNormals ( Mesh & mesh,
const DenoiseViaNormalsSettings & settings = {} )

Reduces noise in given mesh, see the article "Mesh Denoising via a Novel Mumford-Shah Framework"

◆ meshRegionToIndicatorVolume()

MRMESH_API Expected< SimpleVolume, std::string > MR::meshRegionToIndicatorVolume ( const Mesh & mesh,
const FaceBitSet & region,
float offset,
const DistanceVolumeParams & params )

returns a volume filled with the values: v < 0: this point is within offset distance to region-part of mesh and it is closer to region-part than to not-region-part

◆ meshToDistanceField()

MRMESH_API FloatGrid MR::meshToDistanceField ( const MeshPart & mp,
const AffineXf3f & xf,
const Vector3f & voxelSize,
float surfaceOffset = 3,
ProgressCallback cb = {} )

◆ meshToDistanceFunctionVolume()

MRMESH_API Expected< FunctionVolume > MR::meshToDistanceFunctionVolume ( const MeshPart & mp,
const MeshToDistanceVolumeParams & params = {} )

makes FunctionVolume representing (signed or unsigned) distances from Mesh with given settings

◆ meshToDistanceVolume()

MRMESH_API Expected< SimpleVolume, std::string > MR::meshToDistanceVolume ( const MeshPart & mp,
const MeshToDistanceVolumeParams & params = {} )

makes SimpleVolume filled with (signed or unsigned) distances from Mesh with given settings

◆ meshToLevelSet()

MRMESH_API FloatGrid MR::meshToLevelSet ( const MeshPart & mp,
const AffineXf3f & xf,
const Vector3f & voxelSize,
float surfaceOffset = 3,
ProgressCallback cb = {} )

◆ meshToVolume()

MRMESH_API Expected< VdbVolume, std::string > MR::meshToVolume ( const Mesh & mesh,
const MeshToVolumeParams & params = {} )

◆ minTriangleAngle()

template<typename T >
T MR::minTriangleAngle ( const Vector3< T > & a,
const Vector3< T > & b,
const Vector3< T > & c )

◆ normal()

template<typename T >
Vector3< T > MR::normal ( const Vector3< T > & p,
const Vector3< T > & q,
const Vector3< T > & r )
inline

computes unitNormal of given triangle

◆ objectHasSelectableChildren()

bool MR::objectHasSelectableChildren ( const MR::Object & object)
inline

◆ offsetContours() [1/4]

MRMESH_API Expected< Contours2f > MR::offsetContours ( const Contours2f & contours,
ContoursVariableOffset offset,
const OffsetContoursParams & params = {} )

offsets 2d contours in plane

◆ offsetContours() [2/4]

MRMESH_API Expected< Contours2f > MR::offsetContours ( const Contours2f & contours,
float offset,
const OffsetContoursParams & params = {} )

offsets 2d contours in plane

◆ offsetContours() [3/4]

MRMESH_API Expected< Contours3f > MR::offsetContours ( const Contours3f & contours,
ContoursVariableOffset offset,
const OffsetContoursParams & params = {},
const OffsetContoursRestoreZParams & zParmas = {} )

offsets 3d contours in XY plane

◆ offsetContours() [4/4]

MRMESH_API Expected< Contours3f > MR::offsetContours ( const Contours3f & contours,
float offset,
const OffsetContoursParams & params = {},
const OffsetContoursRestoreZParams & zParmas = {} )

offsets 3d contours in XY plane

◆ offsetMesh()

MRMESH_API Expected< Mesh > MR::offsetMesh ( const MeshPart & mp,
float offset,
const OffsetParameters & params = {} )

Offsets mesh by converting it to distance field in voxels using OpenVDB library, signDetectionMode = Unsigned(from OpenVDB) | OpenVDB | HoleWindingRule, and then converts back using OpenVDB library (dual marching cubes), so result mesh is always closed

◆ offsetPolyline()

MRMESH_API Expected< Mesh > MR::offsetPolyline ( const Polyline3 & polyline,
float offset,
const OffsetParameters & params = {} )

Offsets polyline by converting it to voxels and building iso-surface do offset in all directions so result mesh is always closed params.signDetectionMode is ignored (always assumed SignDetectionMode::Unsigned)

◆ OpenDocument()

MRMESH_API bool MR::OpenDocument ( const std::filesystem::path & path)

◆ openFileDialog()

MRVIEWER_API std::filesystem::path MR::openFileDialog ( const FileParameters & params = {})

◆ openFileDialogAsync()

MRVIEWER_API void MR::openFileDialogAsync ( std::function< void(const std::filesystem::path &)> callback,
const FileParameters & params = {} )

◆ openFilesDialog()

MRVIEWER_API std::vector< std::filesystem::path > MR::openFilesDialog ( const FileParameters & params = {})

◆ openFilesDialogAsync()

MRVIEWER_API void MR::openFilesDialogAsync ( std::function< void(const std::vector< std::filesystem::path > &)> callback,
const FileParameters & params = {} )

◆ openFolderDialog()

MRVIEWER_API std::filesystem::path MR::openFolderDialog ( std::filesystem::path baseFolder = {})

◆ openFoldersDialog()

MRVIEWER_API std::vector< std::filesystem::path > MR::openFoldersDialog ( std::filesystem::path baseFolder = {})

◆ OpenLink()

MRMESH_API void MR::OpenLink ( const std::string & url)

◆ operator!=() [1/5]

bool MR::operator!= ( const Color & a,
const Color & b )
inline

◆ operator!=() [2/5]

bool MR::operator!= ( const DirectoryIterator & a,
const std::filesystem::directory_iterator & b )
inline

◆ operator!=() [3/5]

bool MR::operator!= ( const DirectoryRecursiveIterator & a,
const std::filesystem::recursive_directory_iterator & b )
inline

◆ operator!=() [4/5]

template<typename N >
bool MR::operator!= ( const RingIterator< N > & a,
const RingIterator< N > & b )
inline

◆ operator!=() [5/5]

bool MR::operator!= ( const UndirectedEdgeIterator & a,
const UndirectedEdgeIterator & b )
inline

◆ operator""_e()

constexpr EdgeId MR::operator""_e ( unsigned long long i)
inlineconstexprnoexcept

◆ operator""_f()

constexpr FaceId MR::operator""_f ( unsigned long long i)
inlineconstexprnoexcept

◆ operator""_ue()

constexpr UndirectedEdgeId MR::operator""_ue ( unsigned long long i)
inlineconstexprnoexcept

◆ operator""_v()

constexpr VertId MR::operator""_v ( unsigned long long i)
inlineconstexprnoexcept

◆ operator*() [1/2]

Color MR::operator* ( const Color & b,
float a )
inline

◆ operator*() [2/2]

Color MR::operator* ( float a,
const Color & b )
inline

◆ operator*=()

MRMESH_API TransformedMesh & MR::operator*= ( TransformedMesh & a,
const TransformedMesh & b )

intersection operation on two meshes

◆ operator+() [1/4]

Color MR::operator+ ( const Color & a,
const Color & b )
inline

◆ operator+() [2/4]

template<typename T >
Id< T > MR::operator+ ( Id< T > id,
int a )
inline

◆ operator+() [3/4]

template<typename T >
Id< T > MR::operator+ ( Id< T > id,
unsigned int a )
inline

◆ operator+() [4/4]

Id< VoxelTag > MR::operator+ ( Id< VoxelTag > id,
size_t a )
inline

◆ operator+=()

MRMESH_API TransformedMesh & MR::operator+= ( TransformedMesh & a,
const TransformedMesh & b )

union operation on two meshes

◆ operator-() [1/3]

Color MR::operator- ( const Color & a,
const Color & b )
inline

◆ operator-() [2/3]

template<typename T >
Id< T > MR::operator- ( Id< T > id,
int a )
inline

◆ operator-() [3/3]

Id< VoxelTag > MR::operator- ( Id< VoxelTag > id,
size_t a )
inline

◆ operator-=()

MRMESH_API TransformedMesh & MR::operator-= ( TransformedMesh & a,
const TransformedMesh & b )

difference operation on two meshes

◆ operator/()

Color MR::operator/ ( const Color & b,
float a )
inline

◆ operator<<() [1/11]

template<typename T >
std::ostream & MR::operator<< ( std::ostream & s,
const AffineXf3< T > & xf )
inline

◆ operator<<() [2/11]

template<typename V >
std::ostream & MR::operator<< ( std::ostream & s,
const Box< V > & box )
inline

◆ operator<<() [3/11]

template<typename T >
std::ostream & MR::operator<< ( std::ostream & s,
const Line3< T > & l )
inline

◆ operator<<() [4/11]

template<typename T >
std::ostream & MR::operator<< ( std::ostream & s,
const Matrix3< T > & mat )
inline

◆ operator<<() [5/11]

template<typename T >
std::ostream & MR::operator<< ( std::ostream & s,
const Matrix4< T > & mat )
inline

◆ operator<<() [6/11]

template<typename T >
std::ostream & MR::operator<< ( std::ostream & s,
const Plane3< T > & pl )
inline

◆ operator<<() [7/11]

std::ostream & MR::operator<< ( std::ostream & s,
const PointOnFace & pof )
inline

◆ operator<<() [8/11]

template<typename T >
std::ostream & MR::operator<< ( std::ostream & s,
const TriPoint< T > & tp )
inline

◆ operator<<() [9/11]

template<typename T >
std::ostream & MR::operator<< ( std::ostream & s,
const Vector2< T > & vec )
inline

◆ operator<<() [10/11]

template<typename T >
std::ostream & MR::operator<< ( std::ostream & s,
const Vector3< T > & vec )
inline

◆ operator<<() [11/11]

template<typename T >
std::ostream & MR::operator<< ( std::ostream & s,
const Vector4< T > & vec )
inline

◆ operator==() [1/7]

bool MR::operator== ( const Color & a,
const Color & b )
inline

◆ operator==() [2/7]

template<typename V >
bool MR::operator== ( const LineSegm< V > & a,
const LineSegm< V > & b )
inline

◆ operator==() [3/7]

template<typename N >
bool MR::operator== ( const RingIterator< N > & a,
const RingIterator< N > & b )
inline

◆ operator==() [4/7]

bool MR::operator== ( const SegmEndColors & a,
const SegmEndColors & b )
inline

◆ operator==() [5/7]

bool MR::operator== ( const UndirectedEdgeIterator & a,
const UndirectedEdgeIterator & b )
inline

◆ operator==() [6/7]

bool MR::operator== ( const ViewportLinesWithColors & a,
const ViewportLinesWithColors & b )
inline

◆ operator==() [7/7]

bool MR::operator== ( const ViewportPointsWithColors & a,
const ViewportPointsWithColors & b )
inline

◆ operator>>() [1/11]

template<typename T >
std::istream & MR::operator>> ( std::istream & s,
AffineXf3< T > & xf )
inline

◆ operator>>() [2/11]

template<typename V >
std::istream & MR::operator>> ( std::istream & s,
Box< V > & box )
inline

◆ operator>>() [3/11]

template<typename T >
std::istream & MR::operator>> ( std::istream & s,
Line3< T > & l )
inline

◆ operator>>() [4/11]

template<typename T >
std::istream & MR::operator>> ( std::istream & s,
Matrix3< T > & mat )
inline

◆ operator>>() [5/11]

template<typename T >
std::istream & MR::operator>> ( std::istream & s,
Matrix4< T > & mat )
inline

◆ operator>>() [6/11]

template<typename T >
std::istream & MR::operator>> ( std::istream & s,
Plane3< T > & pl )
inline

◆ operator>>() [7/11]

std::istream & MR::operator>> ( std::istream & s,
PointOnFace & pof )
inline

◆ operator>>() [8/11]

template<typename T >
std::istream & MR::operator>> ( std::istream & s,
TriPoint< T > & tp )
inline

◆ operator>>() [9/11]

template<typename T >
std::istream & MR::operator>> ( std::istream & s,
Vector2< T > & vec )
inline

◆ operator>>() [10/11]

template<typename T >
std::istream & MR::operator>> ( std::istream & s,
Vector3< T > & vec )
inline

◆ operator>>() [11/11]

template<typename T >
std::istream & MR::operator>> ( std::istream & s,
Vector4< T > & vec )
inline

◆ orderIntersectionContours()

MRMESH_API ContinuousContours MR::orderIntersectionContours ( const MeshTopology & topologyA,
const MeshTopology & topologyB,
const PreciseCollisionResult & intersections )

◆ orgRing() [1/2]

IteratorRange< OrgRingIterator > MR::orgRing ( const MeshTopology & topology,
EdgeId edge )
inline

◆ orgRing() [2/2]

IteratorRange< OrgRingIterator > MR::orgRing ( const MeshTopology & topology,
VertId v )
inline

◆ orgRing0()

IteratorRange< OrgRingIterator > MR::orgRing0 ( const MeshTopology & topology,
EdgeId edge )
inline

◆ orientLocalTriangulations() [1/2]

MRMESH_API void MR::orientLocalTriangulations ( AllLocalTriangulations & triangs,
const VertCoords & coords,
const VertBitSet & region,
const std::function< Vector3f(VertId)> & targetDir )

◆ orientLocalTriangulations() [2/2]

MRMESH_API void MR::orientLocalTriangulations ( AllLocalTriangulations & triangs,
const VertCoords & coords,
const VertBitSet & region,
const VertNormals & targetDir )

orient neighbors around each point in

Parameters
regionso they will be in clockwise order if look from the tip of target direction

◆ overloaded()

template<class... Ts>
MR::overloaded ( Ts... ) -> overloaded< Ts... >

◆ packPointsWithHistory() [1/2]

MRVIEWER_API void MR::packPointsWithHistory ( const std::shared_ptr< ObjectPoints > & objPoints,
Reorder reoder )

packs ObjectPoints optimally updating colors and adds history records for that; it is a good idea to make SCOPED_HISTORY before calling this function

◆ packPointsWithHistory() [2/2]

MRVIEWER_API void MR::packPointsWithHistory ( const std::shared_ptr< ObjectPoints > & objPoints,
Reorder reoder,
VertBitSet newValidVerts )

sets new valid vertices then packs ObjectPoints optimally updating colors and adds history records for that; it is a good idea to make SCOPED_HISTORY before calling this function

◆ parseAscCoordinate()

template<typename T >
VoidOrErrStr MR::parseAscCoordinate ( const std::string_view & str,
Vector3< T > & v,
Vector3< T > * n = nullptr,
Color * c = nullptr )

◆ parseFirstNum()

VoidOrErrStr MR::parseFirstNum ( const std::string_view & str,
int & num )

◆ parseObjCoordinate()

template<typename T >
VoidOrErrStr MR::parseObjCoordinate ( const std::string_view & str,
Vector3< T > & v,
Vector3< T > * c = nullptr )

◆ parsePolygon()

VoidOrErrStr MR::parsePolygon ( const std::string_view & str,
VertId * vertId,
int * numPoints )

◆ parsePtsCoordinate()

template<typename T >
VoidOrErrStr MR::parsePtsCoordinate ( const std::string_view & str,
Vector3< T > & v,
Color & c )

◆ parseResponse()

MRVIEWER_API Expected< Json::Value, std::string > MR::parseResponse ( const Json::Value & response)

◆ parseSingleNumber()

template<typename T >
VoidOrErrStr MR::parseSingleNumber ( const std::string_view & str,
T & num )

◆ parseTextCoordinate()

template<typename T >
VoidOrErrStr MR::parseTextCoordinate ( const std::string_view & str,
Vector3< T > & v,
Vector3< T > * n = nullptr,
Color * c = nullptr )

◆ partialOffsetMesh()

MRMESH_API Expected< Mesh > MR::partialOffsetMesh ( const MeshPart & mp,
float offset,
const GeneralOffsetParameters & params = {} )

Offsets mesh part by converting it to voxels and back and unite it with original mesh (via boolean) note: only OffsetParameters.signDetectionMode = SignDetectionMode::Unsigned will work in this function

◆ pickedPointToVector3()

MRMESH_API MR::Vector3f MR::pickedPointToVector3 ( const VisualObject * object,
const PickedPoint & point )

◆ planeSectionsToContours2f()

MRMESH_API Contours2f MR::planeSectionsToContours2f ( const Mesh & mesh,
const PlaneSections & sections,
const AffineXf3f & meshToPlane )

◆ planeSectionToContour2f()

MRMESH_API Contour2f MR::planeSectionToContour2f ( const Mesh & mesh,
const PlaneSection & section,
const AffineXf3f & meshToPlane )

converts PlaneSections in 2D contours by computing coordinate of each point, applying given xf to it, and retaining only x and y

◆ pointGridSampling()

MRMESH_API std::optional< VertBitSet > MR::pointGridSampling ( const PointCloud & cloud,
float voxelSize,
const ProgressCallback & cb = {} )

performs sampling of cloud points; subdivides point cloud bounding box on voxels of approximately given size and returns at most one point per voxel; returns std::nullopt if it was terminated by the callback

◆ pointOnObjectToPickedPoint()

MRMESH_API PickedPoint MR::pointOnObjectToPickedPoint ( const VisualObject * object,
const PointOnObject & pos )

◆ pointsToDistanceVolume()

MRMESH_API Expected< SimpleVolume > MR::pointsToDistanceVolume ( const PointCloud & cloud,
const PointsToDistanceVolumeParams & params )

makes SimpleVolume filled with signed distances to points with normals

◆ pointsToMeshFusion()

MRMESH_API Expected< Mesh > MR::pointsToMeshFusion ( const PointCloud & cloud,
const PointsToMeshParameters & params )

makes mesh from points with normals by constructing intermediate volume with signed distances and then using marching cubes algorithm to extract the surface from there

◆ posFromTriEdgeLengths()

template<typename T >
std::optional< Vector2< T > > MR::posFromTriEdgeLengths ( T a,
T b,
T c )

given the lengths of 3 edges of triangle ABC, and assuming that point B has coordinates (0,0); point A - (0,c); computes the coordinates of point C (where c.x >= 0) or returns std::nullopt if input lengths are invalid for a triangle

◆ position()

ImVec2 MR::position ( const ViewportRectangle & rect)
inline

◆ positionVertsSmoothly()

MRMESH_API void MR::positionVertsSmoothly ( Mesh & mesh,
const VertBitSet & verts,
Laplacian::EdgeWeights edgeWeightsType = Laplacian::EdgeWeights::Cotan,
const VertBitSet * fixedSharpVertices = nullptr )

Puts given vertices in such positions to make smooth surface both inside verts-region and on its boundary;

Parameters
vertsmust not include all vertices of a mesh connected component
fixedSharpVerticesin these vertices the surface can be not-smooth

◆ positionVertsSmoothlySharpBd()

MRMESH_API void MR::positionVertsSmoothlySharpBd ( Mesh & mesh,
const VertBitSet & verts,
const Vector< Vector3f, VertId > * vertShifts = nullptr )

Puts given vertices in such positions to make smooth surface inside verts-region, but sharp on its boundary;

Parameters
vertsmust not include all vertices of a mesh connected component
vertShiftsoptional additional shifts of each vertex relative to smooth position

◆ positionVertsWithSpacing()

MRMESH_API void MR::positionVertsWithSpacing ( Mesh & mesh,
const SpacingSettings & settings )

Moves given vertices to make the distances between them as specified.

◆ pushNotification()

MRVIEWER_API void MR::pushNotification ( const RibbonNotification & notification)

◆ pythonAppendOrRun()

template<typename F , typename... Args>
void MR::pythonAppendOrRun ( F func,
Args &&... args )

◆ pythonRunFromGUIThread() [1/3]

template<typename F >
auto MR::pythonRunFromGUIThread ( F && f)

◆ pythonRunFromGUIThread() [2/3]

template<typename R , typename T , typename... Args>
auto MR::pythonRunFromGUIThread ( R(T::*)(Args...) memFunction)

◆ pythonRunFromGUIThread() [3/3]

template<typename R , typename... Args>
auto MR::pythonRunFromGUIThread ( std::function< R(Args...)> && f) -> std::function<void( Args... )>

◆ quadrangleOtherDiagonal()

template<typename T >
std::optional< T > MR::quadrangleOtherDiagonal ( T a,
T b,
T c,
T a1,
T b1 )

given the lengths of 4 edges of a quadrangle, and one of its diagonals (c); returns the length of the other diagonal if the quadrangle is valid and convex or std::nullopt otherwise

◆ rayBoxIntersect() [1/2]

template<typename T = float>
bool MR::rayBoxIntersect ( const Box2< T > & box,
const Line2< T > & line,
T t0,
T t1 )

◆ rayBoxIntersect() [2/2]

template<typename T >
bool MR::rayBoxIntersect ( const Box2< T > & box,
const Vector2< T > & rayOrigin,
T & t0,
T & t1,
const IntersectionPrecomputes2< T > & prec )

◆ rayPolylineIntersect() [1/2]

MRMESH_API std::optional< PolylineIntersectionResult2 > MR::rayPolylineIntersect ( const Polyline2 & polyline,
const Line2d & line,
double rayStart = 0,
double rayEnd = DBL_MAX,
const IntersectionPrecomputes2< double > * prec = nullptr,
bool closestIntersect = true )

Finds ray and polyline intersection in double-precision. rayStart and rayEnd define the interval on the ray to detect an intersection. prec can be specified to reuse some precomputations (e.g. for checking many parallel rays). Finds the closest to ray origin intersection (or any intersection for better performance if !closestIntersect).

◆ rayPolylineIntersect() [2/2]

MRMESH_API std::optional< PolylineIntersectionResult2 > MR::rayPolylineIntersect ( const Polyline2 & polyline,
const Line2f & line,
float rayStart = 0,
float rayEnd = FLT_MAX,
const IntersectionPrecomputes2< float > * prec = nullptr,
bool closestIntersect = true )

Finds ray and polyline intersection in float-precision. rayStart and rayEnd define the interval on the ray to detect an intersection. prec can be specified to reuse some precomputations (e.g. for checking many parallel rays). Finds the closest to ray origin intersection (or any intersection for better performance if !closestIntersect).

◆ readByBlocks()

MRMESH_API bool MR::readByBlocks ( std::istream & in,
char * data,
size_t dataSize,
ProgressCallback callback = {},
size_t blockSize = (size_t(1)<< 16) )

read dataSize bytes from in stream to data by blocks blockSize bytes

if progress callback is not set, read all data by one block

Returns
false if process was canceled (callback is set and return false )

◆ readCharBuffer()

MRMESH_API Expected< Buffer< char >, std::string > MR::readCharBuffer ( std::istream & in)

◆ readRawTiff()

MRMESH_API VoidOrErrStr MR::readRawTiff ( const std::filesystem::path & path,
RawTiffOutput & output )

◆ readTiffParameters()

MRMESH_API Expected< TiffParameters, std::string > MR::readTiffParameters ( const std::filesystem::path & path)

◆ rearrangeVectorByMap()

template<typename T , typename I >
Vector< T, I > MR::rearrangeVectorByMap ( const Vector< T, I > & oldVector,
const BMap< I, I > & map )

◆ remesh()

MRMESH_API bool MR::remesh ( Mesh & mesh,
const RemeshSettings & settings )

◆ removeLoneContours()

MRMESH_API void MR::removeLoneContours ( ContinuousContours & contours)

◆ removeLoneDegeneratedContours()

MRMESH_API void MR::removeLoneDegeneratedContours ( const MeshTopology & edgesTopology,
OneMeshContours & faceContours,
OneMeshContours & edgeContours )

◆ replace()

MRMESH_API std::string MR::replace ( std::string target,
std::string_view from,
std::string_view to )

◆ replaceInplace()

MRMESH_API void MR::replaceInplace ( std::string & target,
std::string_view from,
std::string_view to )

◆ replaceProhibitedChars()

MRMESH_API std::string MR::replaceProhibitedChars ( const std::string & line,
char replacement = '_' )

replace OS prohibited chars ('?', '*', '/', '\', '"', '<', '>') with replacement char

◆ replicateZ()

MRMESH_API void MR::replicateZ ( Mesh & m,
const Mesh & target )

adjusts z-coordinates of (m) vertices to make adjusted (m) similar to (target)

◆ reportProgress() [1/4]

template<typename F >
bool MR::reportProgress ( ProgressCallback cb,
F && f )
inline

safely invokes

Parameters
cbwith the value produced by given functor; just returning true for empty callback and not evaluating the function

◆ reportProgress() [2/4]

template<typename F >
bool MR::reportProgress ( ProgressCallback cb,
F && f,
size_t counter,
int divider )
inline

safely invokes

Parameters
cbwith the value produced by given functor if
counteris divisible by
divider(preferably a power of 2); just returning true for empty callback and not evaluating the function

◆ reportProgress() [3/4]

bool MR::reportProgress ( ProgressCallback cb,
float v )
inline

safely invokes

Parameters
cbwith given value; just returning true for empty callback

◆ reportProgress() [4/4]

bool MR::reportProgress ( ProgressCallback cb,
float v,
size_t counter,
int divider )
inline

safely invokes

Parameters
cbwith given value if
counteris divisible by
divider(preferably a power of 2); just returning true for empty callback

◆ resolveMeshDegenerations()

MRMESH_API bool MR::resolveMeshDegenerations ( Mesh & mesh,
int maxIters,
float maxDeviation = 0,
float maxAngleChange = PI_F/3,
float criticalAspectRatio = 10000 )

◆ roundToPrecision() [1/2]

MRMESH_API double MR::roundToPrecision ( double v,
int precision )

returns given value rounded to given number of decimal digits

◆ roundToPrecision() [2/2]

float MR::roundToPrecision ( float v,
int precision )
inline

returns given value rounded to given number of decimal digits

◆ same()

MRMESH_API bool MR::same ( const MeshTopology & topology,
const EdgePoint & lhs,
const EdgePoint & rhs )

returns true if two edge-points are equal considering different representations

◆ sampleHalfSphere()

MRMESH_API std::vector< Vector3f > MR::sampleHalfSphere ( )

returns quasi-uniform 145 samples on unit half-sphere z>0

◆ saveFileDialog()

MRVIEWER_API std::filesystem::path MR::saveFileDialog ( const FileParameters & params = {})

◆ saveFileDialogAsync()

MRVIEWER_API void MR::saveFileDialogAsync ( std::function< void(const std::filesystem::path &)> callback,
const FileParameters & params = {} )

◆ saveObjectToFile()

MRVIEWER_API VoidOrErrStr MR::saveObjectToFile ( const Object & obj,
const std::filesystem::path & filename,
const SaveObjectSettings & settings = {} )

save visual object (mesh, lines, points or voxels) to file

Returns
empty string if no error or error text

◆ sceneSelectedAtLeast()

template<typename ObjectT , bool visualRepresentationCheck, bool modelCheck>
std::string MR::sceneSelectedAtLeast ( const std::vector< std::shared_ptr< const Object > > & objs,
unsigned n )

◆ sceneSelectedExactly()

template<typename ObjectT , bool visualRepresentationCheck, bool modelCheck>
std::string MR::sceneSelectedExactly ( const std::vector< std::shared_ptr< const Object > > & objs,
unsigned n )

◆ SegPoints()

MRMESH_API void MR::SegPoints ( Vector3f & VEC,
Vector3f & X,
Vector3f & Y,
const Vector3f & P,
const Vector3f & A,
const Vector3f & Q,
const Vector3f & B )

Returns closest points between an segment pair.

◆ SelectCurvaturePreference()

float MRVIEWER_API MR::SelectCurvaturePreference ( PathPreference * pp,
float menuScaling )

draws a Combo with three PathPreference options returns multiplier before dihedral angle sine in edge metric calculation (positive to prefer concave angles, negative - convex)

Parameters
ppis passed by pointer because in can be changed inside

◆ separateClosedContour()

MRMESH_API std::vector< FaceBitSet > MR::separateClosedContour ( const Mesh & mesh,
const std::vector< Vector3f > & contour,
const PathMeshEdgePointCallback & cb = {} )

◆ serializeObjectTreeToGltf()

MRMESH_API VoidOrErrStr MR::serializeObjectTreeToGltf ( const Object & root,
const std::filesystem::path & file,
ProgressCallback callback = {} )

◆ SetClipboardText()

MRMESH_API void MR::SetClipboardText ( const std::string & text)

◆ SetCurrentThreadName()

MRMESH_API void MR::SetCurrentThreadName ( const char * name)

◆ setDefaultUnitParams()

template<UnitEnum E>
void MR::setDefaultUnitParams ( const UnitToStringParams< E > & newParams)

◆ setNewHandlerIfNeeded()

MRMESH_API void MR::setNewHandlerIfNeeded ( )

◆ setTextureFilterType()

MRVIEWER_API void MR::setTextureFilterType ( FilterType filter,
bool dim3d = false )

◆ setTextureWrapType()

MRVIEWER_API void MR::setTextureWrapType ( WrapType wrap,
bool dim3d = false )

◆ sgn()

template<typename T >
constexpr int MR::sgn ( T x)
inlineconstexprnoexcept

◆ sharpenMarchingCubesMesh()

MRMESH_API void MR::sharpenMarchingCubesMesh ( const MeshPart & ref,
Mesh & vox,
Vector< VoxelId, FaceId > & face2voxel,
const SharpenMarchingCubesMeshSettings & settings )

adjust the mesh

Parameters
voxproduced by marching cubes method (NOT dual marching cubes) by 1) correcting positions of all vertices to given offset relative to
refmesh (if correctOldVertPos == true); 2) introducing new vertices in the voxels where the normals change abruptly.
face2voxelmapping from Face Id to Voxel Id where it is located

◆ sharpOffsetMesh()

MRMESH_API Expected< Mesh > MR::sharpOffsetMesh ( const MeshPart & mp,
float offset,
const SharpOffsetParameters & params = {} )

Offsets mesh by converting it to voxels and back post process result using reference mesh to sharpen features

◆ shrink() [1/2]

MRMESH_API void MR::shrink ( const MeshTopology & topology,
FaceBitSet & region,
int hops = 1 )

removes from the region all faces within given number of hops (stars) from the initial region boundary

◆ shrink() [2/2]

MRMESH_API void MR::shrink ( const MeshTopology & topology,
VertBitSet & region,
int hops = 1 )

removes from the region all vertices within given number of hops (stars) from the initial region boundary

◆ shrinkFaces()

MRMESH_API FaceBitSet MR::shrinkFaces ( const MeshTopology & topology,
const FaceBitSet & region,
const UndirectedEdgeBitSet * stopEdges = nullptr )

returns given region without all faces sharing an edge with not-region face;

Parameters
stopEdges- neighborhood via this edges will be ignored

◆ simpleVolumeToDenseGrid()

MRMESH_API FloatGrid MR::simpleVolumeToDenseGrid ( const SimpleVolume & simpleVolume,
ProgressCallback cb = {} )

◆ simpleVolumeToVdbVolume()

MRMESH_API VdbVolume MR::simpleVolumeToVdbVolume ( const SimpleVolume & simpleVolume,
ProgressCallback cb = {} )

◆ size()

ImVec2 MR::size ( const ViewportRectangle & rect)
inline

◆ smoothSelection()

MRMESH_API FaceBitSet MR::smoothSelection ( Mesh & mesh,
const FaceBitSet & region,
float expandOffset,
float shrinkOffset )

◆ split()

template<typename F >
bool MR::split ( std::string_view str,
std::string_view sep,
F && func )

◆ splitByLines()

MRMESH_API std::vector< size_t > MR::splitByLines ( const char * data,
size_t size )

◆ sqr()

template<typename T >
constexpr T MR::sqr ( T x)
inlineconstexprnoexcept

◆ stitchContours()

MRMESH_API void MR::stitchContours ( MeshTopology & topology,
const EdgePath & c0,
const EdgePath & c1 )

given two contours: 1) of equal size; 2) all edges of c0 have no left faces; 3) all edges of c1 have no right faces; merge the surface along corresponding edges of two contours, and deletes all vertices and edges from c1

◆ stringOperationCanceled()

std::string MR::stringOperationCanceled ( )
inline

Common operation canceled line for all.

◆ subdivideLoneContours()

MRMESH_API void MR::subdivideLoneContours ( Mesh & mesh,
const OneMeshContours & contours,
FaceMap * new2oldMap = nullptr )

◆ subdividePolylineWithPlane()

MRMESH_API EdgeBitSet MR::subdividePolylineWithPlane ( Polyline3 & polyline,
const Plane3f & plane,
std::function< void(EdgeId, EdgeId, float)> onEdgeSplitCallback = nullptr )

This function splits edges intersected by the plane

Returns
New edges with origin on the plane and oriented to the positive direction
Parameters
polylineInput polyline that will be cut by the plane
planeInput plane to cut polyline with
onEdgeSplitCallbackis invoked each time when an edge is split. Receives edge ID before split, edge ID after split, and weight of the origin vertex

◆ subdivideWithPlane()

MRMESH_API FaceBitSet MR::subdivideWithPlane ( Mesh & mesh,
const Plane3f & plane,
FaceHashMap * new2Old = nullptr,
float eps = 0,
std::function< void(EdgeId, EdgeId, float)> onEdgeSplitCallback = nullptr )

subdivides all triangles intersected by given plane, leaving smaller triangles that only touch the plane;

Returns
all triangles on the positive side of the plane
Parameters
new2Oldreceive mapping from newly appeared triangle to its original triangle (part to full)
epsif existing vertex is within eps distance from the plane, then move the vertex not introducing new ones
onEdgeSplitCallbackis invoked each time when an edge is split. Receives edge ID before split, edge ID after split, and weight of the origin vertex

◆ subprogress() [1/3]

template<typename F >
ProgressCallback MR::subprogress ( ProgressCallback cb,
F && f )
inline

returns a callback that maps the value with given function

Parameters
fbefore calling
cb(which can be empty)

◆ subprogress() [2/3]

ProgressCallback MR::subprogress ( ProgressCallback cb,
float from,
float to )
inline

returns a callback that maps [0,1] linearly into [from,to] in the call to

Parameters
cb(which can be empty)

◆ subprogress() [3/3]

ProgressCallback MR::subprogress ( ProgressCallback cb,
size_t index,
size_t count )
inline

returns a callback that maps [0,1] linearly into [(index+0)/count,(index+1)/count] in the call to

Parameters
cb(which can be empty)

◆ suggestVoxelSize()

MRMESH_API float MR::suggestVoxelSize ( const MeshPart & mp,
float approxNumVoxels )

computes size of a cubical voxel to get approximately given number of voxels during rasterization

◆ terrainTriangulation()

MRMESH_API Expected< Mesh, std::string > MR::terrainTriangulation ( std::vector< Vector3f > points,
ProgressCallback cb = {} )

◆ thickenMesh()

MRMESH_API Expected< Mesh > MR::thickenMesh ( const Mesh & mesh,
float offset,
const GeneralOffsetParameters & params = {} )

in case of positive offset, returns the mesh consisting of offset mesh merged with inversed original mesh (thickening mode); in case of negative offset, returns the mesh consisting of inversed offset mesh merged with original mesh (hollowing mode); if your input mesh is closed then please specify params.signDetectionMode = SignDetectionMode::Unsigned, and you will get closed mesh on output; if your input mesh is open then please specify another sign detection mode, and you will get open mesh on output

◆ throwExceptionFromExpected()

template<typename E >
void MR::throwExceptionFromExpected ( const E & err)

◆ toString()

MRMESH_API std::string_view MR::toString ( DimensionsVisualizePropertyType value)

◆ toVec4()

template<typename T >
Vector4< T > MR::toVec4 ( const ViewportRectangle & rect)
inline

◆ trackLeftBoundaryLoop() [1/2]

EdgeLoop MR::trackLeftBoundaryLoop ( const MeshTopology & topology,
const FaceBitSet & region,
EdgeId e0 )
inline

◆ trackLeftBoundaryLoop() [2/2]

MRMESH_API EdgeLoop MR::trackLeftBoundaryLoop ( const MeshTopology & topology,
EdgeId e0,
const FaceBitSet * region = nullptr )

◆ trackRegionBoundaryLoop() [1/2]

EdgeLoop MR::trackRegionBoundaryLoop ( const MeshTopology & topology,
const FaceBitSet & region,
EdgeId e0 )
inline

◆ trackRegionBoundaryLoop() [2/2]

MRMESH_API EdgeLoop MR::trackRegionBoundaryLoop ( const MeshTopology & topology,
EdgeId e0,
const FaceBitSet * region = nullptr )

◆ trackRightBoundaryLoop() [1/2]

EdgeLoop MR::trackRightBoundaryLoop ( const MeshTopology & topology,
const FaceBitSet & region,
EdgeId e0 )
inline

◆ trackRightBoundaryLoop() [2/2]

MRMESH_API EdgeLoop MR::trackRightBoundaryLoop ( const MeshTopology & topology,
EdgeId e0,
const FaceBitSet * region = nullptr )

◆ trackSection()

MRMESH_API PlaneSection MR::trackSection ( const MeshPart & mp,
const MeshTriPoint & start,
MeshTriPoint & end,
const Vector3f & direction,
float distance )

track section of plane set by start point, direction and surface normal in start point in given direction while given distance or mesh boundary is not reached, or track looped negative distance means moving in opposite direction returns track on surface and end point (same as start if path has looped)

◆ transformNormals()

MRMESH_API const VertNormals & MR::transformNormals ( const VertNormals & normals,
const VertBitSet & validVerts,
const Matrix3d * m,
VertNormals & buf )

if (m) is null then just returns (normals); otherwise copies transformed normals in (buf) and returns it

◆ transformPoints()

MRMESH_API const VertCoords & MR::transformPoints ( const VertCoords & verts,
const VertBitSet & validVerts,
const AffineXf3d * xf,
VertCoords & buf,
const VertRenumber * vertRenumber = nullptr )

if (xf) is null then just returns (verts); otherwise copies transformed points in (buf) and returns it

◆ translateToZero()

template<typename GredT >
void MR::translateToZero ( GredT & grid)

◆ triangleWithNormal()

template<typename T >
Triangle3< T > MR::triangleWithNormal ( const Triangle3< T > & t,
const Vector3< T > & n )

project given triangle on a plane passing via its centroid and having unit normal (n); if after projection triangle normal turns out to be inversed, then collapses the triangle into degenerate line segment

◆ TriDist()

MRMESH_API float MR::TriDist ( Vector3f & p,
Vector3f & q,
const Vector3f s[3],
const Vector3f t[3] )

computes the closest points on two triangles, and returns the squared distance between them.

Parameters
s,tare the triangles, stored tri[point][dimension].

If the triangles are disjoint, p and q give the closest points of s and t respectively. However, if the triangles overlap, p and q are basically a random pair of points from the triangles, not coincident points on the intersection of the triangles, as might be expected.

◆ trimWithPlane() [1/3]

MRMESH_API void MR::trimWithPlane ( Mesh & mesh,
const Plane3f & plane,
std::vector< EdgeLoop > * outCutContours,
FaceHashMap * new2Old = nullptr,
float eps = 0,
std::function< void(EdgeId, EdgeId, float)> onEdgeSplitCallback = nullptr )

trim mesh by plane

This function cuts mesh with plane, leaving only part of mesh that lay in positive direction of normal

Parameters
meshInput mesh that will be cut
planeInput plane to cut mesh with
outCutContoursoptionally return newly appeared hole contours where each edge does not have right face
new2Oldreceive mapping from newly appeared triangle to its original triangle (part to full)
epsif existing vertex is within eps distance from the plane, then move the vertex not introducing new ones
onEdgeSplitCallbackis invoked each time when an edge is split. Receives edge ID before split, edge ID after split, and weight of the origin vertex

◆ trimWithPlane() [2/3]

MRMESH_API void MR::trimWithPlane ( Mesh & mesh,
const Plane3f & plane,
UndirectedEdgeBitSet * outCutEdges = nullptr,
FaceHashMap * new2Old = nullptr,
float eps = 0,
std::function< void(EdgeId, EdgeId, float)> onEdgeSplitCallback = nullptr )

trim mesh by plane

This function cuts mesh with plane, leaving only part of mesh that lay in positive direction of normal

Parameters
meshInput mesh that will be cut
planeInput plane to cut mesh with
outCutEdgesoptionally return newly appeared hole boundary edges
new2Oldreceive mapping from newly appeared triangle to its original triangle (part to full)
epsif existing vertex is within eps distance from the plane, then move the vertex not introducing new ones
onEdgeSplitCallbackis invoked each time when an edge is split. Receives edge ID before split, edge ID after split, and weight of the origin vertex

◆ trimWithPlane() [3/3]

MRMESH_API void MR::trimWithPlane ( Mesh & mesh,
const TrimWithPlaneParams & params,
const TrimOptionalOutput & optOut = {} )

trim mesh by plane

This function cuts mesh with plane, leaving only part of mesh that lay in positive direction of normal

Parameters
meshInput mesh that will be cut
paramsstores basic params for trimWithPlane function
optOutstores optional output params for trimWithPlane function

◆ undirectedEdges()

IteratorRange< UndirectedEdgeIterator > MR::undirectedEdges ( const MeshTopology & topology)
inline

◆ unexpected()

template<class E >
auto MR::unexpected ( E && e)
inline

◆ unexpectedOperationCanceled()

auto MR::unexpectedOperationCanceled ( )
inline

Returns Expected error with stringOperationCanceled()

◆ uniteLocalTriangulations()

MRMESH_API std::optional< AllLocalTriangulations > MR::uniteLocalTriangulations ( const std::vector< SomeLocalTriangulations > & in,
const ProgressCallback & progress = {} )

converts a set of SomeLocalTriangulations containing local triangulations of all points arbitrary distributed among them into one AllLocalTriangulations with records for all points

◆ uniteManyMeshes()

MRMESH_API Expected< Mesh, std::string > MR::uniteManyMeshes ( const std::vector< const Mesh * > & meshes,
const UniteManyMeshesParams & params = {} )

◆ unitsAreEquivalent()

template<UnitEnum E>
bool MR::unitsAreEquivalent ( E a,
E b )

◆ updateIndicator()

MRMESH_API void MR::updateIndicator ( const Mesh & mesh,
Vector< float, UndirectedEdgeId > & v,
const FaceNormals & normals,
float beta,
float gamma )

Compute edge indicator function (1 - smooth edge, 0 - crease edge) by solving large system of linear equations

Parameters
meshcontains topology information and coordinates for equation weights
normalsper-face normals
beta0.001 - sharp edges, 0.01 - moderate edges, 0.1 - smooth edges
gammathe amount of smoothing: 0 - no smoothing, 1 - average smoothing, ... see the article "Mesh Denoising via a Novel Mumford-Shah Framework", equation (20)

◆ updateIndicatorFast()

MRMESH_API void MR::updateIndicatorFast ( const MeshTopology & topology,
Vector< float, UndirectedEdgeId > & v,
const FaceNormals & normals,
float beta,
float gamma )

Compute edge indicator function (1 - smooth edge, 0 - crease edge) by approximation without solving the system of linear equations

Parameters
normalsper-face normals
beta0.001 - sharp edges, 0.01 - moderate edges, 0.1 - smooth edges
gammathe amount of smoothing: 0 - no smoothing, 1 - average smoothing, ... see the article "Mesh Denoising via a Novel Mumford-Shah Framework", equation (20)

◆ updatePointPairs()

void MR::updatePointPairs ( PointPairs & pairs,
const MeshOrPointsXf & src,
const MeshOrPointsXf & tgt,
float cosTreshold,
float distThresholdSq,
bool mutualClosest )

in each pair updates the target data and performs basic filtering (activation)

◆ valueToImGuiFormatString()

template<UnitEnum E, detail::Units::Scalar T>
MRVIEWER_API std::string MR::valueToImGuiFormatString ( T value,
const UnitToStringParams< E > & params = getDefaultUnitParams< E >() )

◆ valueToString()

template<UnitEnum E, detail::Units::Scalar T>
MRVIEWER_API std::string MR::valueToString ( T value,
const UnitToStringParams< E > & params = getDefaultUnitParams< E >() )

◆ vdbVolumeToSimpleVolume()

MRMESH_API Expected< SimpleVolume, std::string > MR::vdbVolumeToSimpleVolume ( const VdbVolume & vdbVolume,
const Box3i & activeBox = Box3i(),
ProgressCallback cb = {} )

◆ vdbVolumeToSimpleVolumeU16()

MRMESH_API Expected< SimpleVolumeU16, std::string > MR::vdbVolumeToSimpleVolumeU16 ( const VdbVolume & vdbVolume,
const Box3i & activeBox = Box3i(),
ProgressCallback cb = {} )

◆ vertexAttributeGradient()

MRMESH_API Vector< Vector3f, VertId > MR::vertexAttributeGradient ( const Mesh & mesh,
const VertScalars & vertexAttribute )

Calculates gradient for each vertex in mesh, based on vertexAttribute.

◆ verticesGridSampling()

MRMESH_API std::optional< VertBitSet > MR::verticesGridSampling ( const MeshPart & mp,
float voxelSize,
const ProgressCallback & cb = {} )

performs sampling of mesh vertices; subdivides mesh bounding box on voxels of approximately given size and returns at most one vertex per voxel; returns std::nullopt if it was terminated by the callback

◆ volumeToMeshByParts()

template<typename Volume >
Expected< Mesh, std::string > MR::volumeToMeshByParts ( const VolumePartBuilder< Volume > & builder,
const Vector3i & dimensions,
const Vector3f & voxelSize,
const VolumeToMeshByPartsSettings & settings = {},
const MergeVolumePartSettings & mergeSettings = {} )

converts a voxel volume into a mesh without full memory loading

See also
mergeVolumePart
Parameters
builder- functor returning a voxel volume part within the specified range
dimensions- full voxel volume dimensions
voxelSize- voxel size used for mesh generation
settings- additional parameters; see VolumeToMeshByPartsSettings
mergeSettings- additional parameters for merging function; see MergeVolumePartSettings
Returns
a generated mesh or an error string

◆ voxelizeAndComputeVolume()

MRMESH_API float MR::voxelizeAndComputeVolume ( const std::vector< std::shared_ptr< Mesh > > & meshes,
const AffineXf3f & xf,
const Vector3f & voxelSize )

◆ voxelPositionerLinear()

MRMESH_API Vector3f MR::voxelPositionerLinear ( const Vector3f & pos0,
const Vector3f & pos1,
float v0,
float v1,
float iso )

◆ writeByBlocks()

MRMESH_API bool MR::writeByBlocks ( std::ostream & out,
const char * data,
size_t dataSize,
ProgressCallback callback = {},
size_t blockSize = (size_t(1)<< 16) )

write dataSize bytes from data to out stream by blocks blockSize bytes

if progress callback is not set, write all data by one block

Returns
false if process was canceled (callback is set and return false )

◆ writeRawTiff()

MRMESH_API VoidOrErrStr MR::writeRawTiff ( const uint8_t * bytes,
const std::filesystem::path & path,
const BaseTiffParameters & params )

◆ zlibCompressStream()

MRMESH_API VoidOrErrStr MR::zlibCompressStream ( std::istream & in,
std::ostream & out,
int level = -1 )

compress the input data using the Deflate algorithm

Parameters
in- input data stream
out- output data stream
level- compression level (0 - no compression, 1 - the fastest but the most inefficient compression, 9 - the most efficient but the slowest compression)
Returns
nothing or error string

◆ zlibDecompressStream()

MRMESH_API VoidOrErrStr MR::zlibDecompressStream ( std::istream & in,
std::ostream & out )

/brief decompress the input data compressed using the Deflate algorithm

Parameters
in- input data stream
out- output data stream
Returns
nothing or error string

Variable Documentation

◆ AABBTree

class MRMESH_CLASS MR::AABBTree

◆ AABBTreePoints

class MRMESH_CLASS MR::AABBTreePoints

◆ AABBTreePolyline

template<typename V >
class MRMESH_CLASS MR::AABBTreePolyline

◆ BitSet

class MRMESH_CLASS MR::BitSet

◆ BMap

template<typename T , typename I >
struct MRMESH_CLASS MR::BMap

◆ Buffer

template<typename T , typename I = size_t>
class MRMESH_CLASS MR::Buffer

◆ cBigFontSize

constexpr int MR::cBigFontSize = 15
constexpr

◆ cBigIconSize

constexpr float MR::cBigIconSize = 20.0f
constexpr

◆ cButtonPadding

constexpr float MR::cButtonPadding = 8.0f
constexpr

◆ cCheckboxPadding

constexpr float MR::cCheckboxPadding = 2.0f
constexpr

◆ cDefaultFontSize

constexpr int MR::cDefaultFontSize = 13
constexpr

◆ cDefaultInnerSpacing

constexpr float MR::cDefaultInnerSpacing = 8.0f
constexpr

◆ cDefaultItemSpacing

constexpr float MR::cDefaultItemSpacing = 8.0f
constexpr

◆ cDefaultWindowPaddingX

constexpr float MR::cDefaultWindowPaddingX = 8.0f
constexpr

◆ cDefaultWindowPaddingY

constexpr float MR::cDefaultWindowPaddingY = 12.0f
constexpr

◆ cGradientButtonFramePadding

constexpr float MR::cGradientButtonFramePadding = 7.5f
constexpr

◆ ChangeSceneAction

class MRMESH_CLASS MR::ChangeSceneAction

◆ cHeaderQuickAccessFrameRounding

constexpr float MR::cHeaderQuickAccessFrameRounding = 3.0f
constexpr

◆ cHeaderQuickAccessFrameSize

constexpr float MR::cHeaderQuickAccessFrameSize = 24.0f
constexpr

◆ cHeaderQuickAccessIconSize

constexpr float MR::cHeaderQuickAccessIconSize = 14.0f
constexpr

◆ cHeaderQuickAccessXSpacing

constexpr float MR::cHeaderQuickAccessXSpacing = 12.0f
constexpr

◆ cHeadlineFontSize

constexpr int MR::cHeadlineFontSize = 20
constexpr

◆ cInputPadding

constexpr float MR::cInputPadding = 9.0f
constexpr

◆ cItemInfoIndent

constexpr float MR::cItemInfoIndent = 16.0f
constexpr

◆ CloudPartMapping

struct MRMESH_CLASS MR::CloudPartMapping

◆ cMiddleIconSize

constexpr float MR::cMiddleIconSize = 15.0f
constexpr

◆ cModalButtonWidth

constexpr float MR::cModalButtonWidth = 104.0f
constexpr

◆ cModalWindowPaddingX

constexpr float MR::cModalWindowPaddingX = 28.0f
constexpr

◆ cModalWindowPaddingY

constexpr float MR::cModalWindowPaddingY = 20.0f
constexpr

◆ cModalWindowWidth

constexpr float MR::cModalWindowWidth = 368.0f
constexpr

◆ ColorMapAggregator

template<typename Tag >
class MRMESH_CLASS MR::ColorMapAggregator

◆ cQuickAccessBarHeight

constexpr float MR::cQuickAccessBarHeight = 40.0f
constexpr

◆ cQuietNan

constexpr float MR::cQuietNan = std::numeric_limits<float>::quiet_NaN()
constexpr

◆ cQuietNanBits

constexpr int MR::cQuietNanBits = std::bit_cast< int >( cQuietNan )
constexpr

◆ cRadioButtonSize

constexpr float MR::cRadioButtonSize = 20.0f
constexpr

◆ cRadioInnerSpacingX

const float MR::cRadioInnerSpacingX = 12.f

◆ cRibbonButtonWindowPaddingX

constexpr float MR::cRibbonButtonWindowPaddingX = 6.0f
constexpr

◆ cRibbonButtonWindowPaddingY

constexpr float MR::cRibbonButtonWindowPaddingY = 4.0f
constexpr

◆ cRibbonItemInterval

constexpr float MR::cRibbonItemInterval = 4.0f
constexpr

◆ cRibbonItemMinWidth

constexpr float MR::cRibbonItemMinWidth = 86.0f
constexpr

◆ cScrollBarSize

constexpr float MR::cScrollBarSize = 10.0f
constexpr

◆ cSeparateBlocksSpacing

constexpr float MR::cSeparateBlocksSpacing = 12.0f
constexpr

◆ cSmallFontSize

constexpr int MR::cSmallFontSize = 11
constexpr

◆ cSmallIconSize

constexpr float MR::cSmallIconSize = 10.0f
constexpr

◆ cSmallItemDropSizeModifier

constexpr float MR::cSmallItemDropSizeModifier = 0.5f
constexpr

◆ cTabFrameRounding

constexpr float MR::cTabFrameRounding = 5.0f
constexpr

◆ cTabHeight

constexpr float MR::cTabHeight = 28.0f
constexpr

◆ cTabLabelMinPadding

constexpr float MR::cTabLabelMinPadding = 12.0f
constexpr

◆ cTabMinimumWidth

constexpr float MR::cTabMinimumWidth = 68.0f
constexpr

◆ cTabsInterval

constexpr float MR::cTabsInterval = 8.0f
constexpr

◆ cTabYOffset

constexpr float MR::cTabYOffset = 4.0f
constexpr

◆ cTopPanelAditionalButtonSize

constexpr float MR::cTopPanelAditionalButtonSize = cTabHeight - cTabYOffset
constexpr

◆ cTopPanelScrollBtnSize

constexpr float MR::cTopPanelScrollBtnSize = 20.0f
constexpr

◆ cTopPanelScrollStep

constexpr float MR::cTopPanelScrollStep = 50.0f
constexpr

◆ DemoPluginInstance

MRVIEWER_API DemoPlugin MR::DemoPluginInstance
extern

◆ dependent_false

template<typename... >
constexpr bool MR::dependent_false = false
inlineconstexpr

◆ EdgeTag

class MRMESH_CLASS MR::EdgeTag

◆ FaceTag

class MRMESH_CLASS MR::FaceTag

◆ HistoryStore

class MRVIEWER_CLASS MR::HistoryStore

◆ Id

template<typename T >
class MRMESH_CLASS MR::Id

◆ Mesh

struct MRMESH_CLASS MR::Mesh

◆ MeshOrPoints

class MRMESH_CLASS MR::MeshOrPoints

◆ MeshOrPointsTag

class MRMESH_CLASS MR::MeshOrPointsTag

◆ MeshPart

struct MRMESH_CLASS MR::MeshPart

◆ MeshTopology

class MRMESH_CLASS MR::MeshTopology

◆ NoDefInit

template<typename T >
struct MRMESH_CLASS MR::NoDefInit

◆ noInit

constexpr NoInit MR::noInit
inlineconstexpr

◆ PartMapping

struct MRMESH_CLASS MR::PartMapping

◆ PixelTag

class MRMESH_CLASS MR::PixelTag

◆ PointCloud

struct MRMESH_CLASS MR::PointCloud

◆ RegionTag

class MRMESH_CLASS MR::RegionTag

◆ SetBitIteratorT

template<typename T >
class MRMESH_CLASS MR::SetBitIteratorT

◆ TaggedBitSet

template<typename T >
class MRMESH_CLASS MR::TaggedBitSet

◆ UndirectedEdgeTag

class MRMESH_CLASS MR::UndirectedEdgeTag

◆ Vector

template<typename T , typename I >
class MRMESH_CLASS MR::Vector

◆ Vector2

template<typename T >
struct MRMESH_CLASS MR::Vector2

◆ Vector3

template<typename T >
struct MRMESH_CLASS MR::Vector3

◆ VertTag

class MRMESH_CLASS MR::VertTag

◆ VoxelTag

class MRMESH_CLASS MR::VoxelTag