MeshLib C++ Docs
Loading...
Searching...
No Matches
MR Namespace Reference

only for bindings generation More...

Namespaces

namespace  AsyncObjectLoad
 namespace ObjectSave
 
namespace  BitSetParallel
 
namespace  Cuda
 
namespace  detail
 
namespace  DistanceMapLoad
 namespace SceneSave
 
namespace  DistanceMapSave
 namespace ImageSave
 
namespace  Features
 
namespace  FileDialog
 
namespace  FillingSurface
 
namespace  FixUndercuts
 
namespace  FloatGridComponents
 
namespace  GcodeLoad
 
namespace  ImageLoad
 namespace PointsSave
 
namespace  ImageSave
 namespace ImageLoad
 
namespace  ImageTransform
 
namespace  ImGuiMath
 Utilities.
 
namespace  ImGuiMeasurementIndicators
 
namespace  ImGuiMV
 namespace for easy access to functions related to ImGui MultiViewport
 
namespace  LinesLoad
 namespace MeshSave
 
namespace  LinesSave
 namespace LinesLoad
 
namespace  MeshBuilder
 Building topologies by triangles.
 
namespace  MeshComponents
 
namespace  MeshLoad
 compatibility names
 
namespace  MeshSave
 namespace MeshLoad
 
namespace  Meta
 Metaprogramming helpers.
 
namespace  ObjectLoad
 namespace ImageSave
 
namespace  ObjectSave
 namespace ObjectLoad
 
namespace  Parallel
 
namespace  PlanarTriangulation
 
namespace  PointCloudComponents
 
namespace  PointsLoad
 namespace MeshSave
 
namespace  PointsSave
 namespace PointsLoad
 
namespace  PolylineComponents
 
namespace  ProgressBar
 Utilities to show application progress bar for long operations.
 
namespace  QualityControl
 Specialized UI for quality-control things.
 
namespace  RenderDimensions
 
namespace  RenderFeatures
 
namespace  RenderWrapObject
 
namespace  SceneLoad
 namespace AsyncObjectLoad
 
namespace  SceneSave
 namespace SceneLoad
 
namespace  SelfIntersections
 
namespace  SpaceMouse
 
namespace  StyleConsts
 
namespace  TriangulationHelpers
 
namespace  UI
 
namespace  UnitSettings
 This abstracts away the UI measurement unit configuration. Internally this uses setDefaultUnitParams().
 
namespace  Unsigned
 Additional support for unsigned types.
 
namespace  VoxelsLoad
 
namespace  VoxelsSave
 namespace VoxelsLoad
 
namespace  WeightedShell
 

Classes

class  AABBTree
 
class  AABBTreeBase
 base class for most AABB-trees (except for AABBTreePoints) More...
 
struct  AABBTreeNode
 
class  AABBTreeObjects
 
class  AABBTreePoints
 bounding volume hierarchy for point cloud structure More...
 
class  AABBTreePolyline
 bounding volume hierarchy for line segments More...
 
struct  AABBTreeTraits
 
class  AddCustomThemePlugin
 
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  AncillaryPlane
 small struct to simplify creating and clearing ancillary plane object in tools More...
 
struct  AncillaryPoints
 Helper class to manage ancillary visual points used by plugins. More...
 
class  AngleMeasurementObject
 Represents an angle measurement. More...
 
class  AnyVisualizeMaskEnum
 
struct  ArcInterpolationParams
 
class  AsyncRequest
 
class  AsyncTimer
 the object to set timer from any thread and wait for alert time from another thread More...
 
struct  Ball
 a ball = points surrounded by a sphere in arbitrary space with vector type V More...
 
struct  BaseFitParams
 
struct  BaseRenderParams
 Common rendering parameters for meshes and UI. More...
 
struct  BaseShellParameters
 
struct  BaseTiffParameters
 
class  BasicClickableRectUiRenderTask
 
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  BendContoursAlongCurveParams
 Parameters for aligning 2d contours along given curve. More...
 
struct  BendTextAlongCurveParams
 
class  BestFitParabola
 accumulates a number of (x,y) points to find the best-least-squares parabola approximating them More...
 
class  BestFitPolynomial
 
class  BinaryOperations
 
struct  BindVertexAttribArraySettings
 
class  BitSet
 
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
 Undo action for ObjectVoxels active bounds change. More...
 
class  ChangeBoundarySelectionHistoryAction
 
class  ChangeColoringType
 
class  ChangeDualMarchingCubesAction
 Undo action for ObjectVoxels dual/standard marching cubes change. More...
 
class  ChangeFacesColorMapAction
 
class  ChangeGridAction
 Undo action for ObjectVoxels all data change (need for faster undo redo) More...
 
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  ChangeMeshDataAction
 Undo action for ObjectMeshData change. 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  ChangeMeshTexturePerFaceAction
 Undo action for ObjectMeshHolder texturePerFace 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  ChangeOneNormalInCloudAction
 
class  ChangeOnePointInCloudAction
 
class  ChangeOnePointInPolylineAction
 
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  ChangeScaleAction
 
class  ChangeSceneAction
 
class  ChangeSceneObjectsOrder
 
class  ChangeSurfaceAction
 Undo action for ObjectVoxels surface change (need for faster undo redo) More...
 
class  ChangeTextureAction
 
class  ChangeValue
 
class  ChangeVertsColorMapAction
 
class  ChangeVisualizePropertyAction
 
class  ChangeXfAction
 
class  ChangVoxelSelectionAction
 Undo action for ObjectVoxels face selection. More...
 
struct  CharPressedListener
 
struct  Chunk
 array chunk representation More...
 
struct  ChunkIterator
 iterator class for array chunks More...
 
class  CircleObject
 
struct  CloseToMeshVolumeParams
 
struct  CloudPartMapping
 mapping among elements of source point cloud, from which a part is taken, and target (this) point cloud More...
 
struct  CmpOld
 argument of this type indicates that the object is already in new state, and the following argument is old state More...
 
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
 Additional command loop for external app control. More...
 
struct  CompensateRadiusParams
 structure with parameters for compensateRadius function More...
 
struct  ComputeSteepestDescentPathSettings
 
struct  ComputeSweptVolumeParameters
 Parameters for computeSweptVolume* functions. More...
 
class  Cone3
 Base class for cone parameterization. More...
 
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  ContoursMeshAlignParams
 Parameters for aligning 2d contours onto mesh surface. More...
 
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  CornerControllerObject
 class that holds and manages corner controller object More...
 
struct  CubicBezierCurve
 Cubic Bezier curve. 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  CurveFunc
 
struct  CurvePoint
 
struct  CustomButtonParameters
 
struct  CutByProjectionSettings
 Settings structurer for cutMeshByProjection function. More...
 
struct  CutMeshParameters
 Parameters of MR::cutMesh. More...
 
struct  CutMeshResult
 
class  Cylinder3
 
class  Cylinder3Approximation
 
class  CylinderObject
 
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
 
class  DentalId
 This class represents tooth id. More...
 
class  DepthPeelingGL
 class to encapsulate depth peeling rendering passes as fall back if alpha sort is not available More...
 
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
 
struct  DistanceFromWeightedPointsComputeParams
 
struct  DistanceFromWeightedPointsParams
 
class  DistanceMap
 
struct  DistanceMapLoadSettings
 settings for loading distance maps from external formats More...
 
struct  DistanceMapSaveSettings
 determines how to save distance maps More...
 
struct  DistanceMapToWorld
 This structure store data to transform distance map to world coordinates. More...
 
class  DistanceMeasurementObject
 Represents a distance measurement. More...
 
struct  DistanceToMeshOptions
 options determining computation of distance from a point to a mesh More...
 
struct  DistanceVolumeParams
 
struct  DividePointCloudOptionalOutput
 
struct  DividePolylineParameters
 
struct  DoubleOffsetSettings
 
struct  DragDropListener
 
struct  DragEndListener
 
struct  DragEntranceListener
 
struct  DragListener
 
struct  DragOverListener
 
struct  DragStartListener
 
struct  DrawButtonParams
 
struct  DrawListener
 
struct  DrawSceneUiListener
 A helper base class to subscribe to ImGuiMenu::drawSceneUiSignal. More...
 
class  DrawViewportWidgetsItem
 This sits in the background and renders various per-viewport buttons. More...
 
struct  EdgeLengthMesh
 
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
 Parameters of structure embedding in terrain. More...
 
struct  EndMillCutter
 end mill cutter specifications More...
 
struct  EndMillTool
 end mill tool specifications More...
 
class  EnumNeihbourFaces
 
class  EnumNeihbourVertices
 
struct  FaceDistancesSettings
 
struct  FaceFace
 a pair of faces More...
 
struct  FaceFaceFace
 a triple of faces More...
 
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  FileDialogSignals
 This structure contains global signals for file dialogs, that are called on valid selection of file or folder. More...
 
struct  FileLoadOptions
 
struct  FileParameters
 
struct  FillHoleItem
 
struct  FillHoleMetric
 Holds metrics for fillHole and buildCylinderBetweenTwoHoles triangulation
. More...
 
struct  FillHoleNicelySettings
 
struct  FillHoleParams
 Parameters structure for MR::fillHole
Structure has some options to control MR::fillHole. More...
 
struct  FillHolesWithExtraPointsParams
 
struct  FindDisorientationParams
 Parameters for findDisorientedFaces function. More...
 
struct  FindInnerShellSettings
 
struct  FindOutliersParams
 Outlier point search parameters. More...
 
struct  FindOverhangsSettings
 parameters for MR::findOverhangs More...
 
struct  FindOverlappingSettings
 
struct  FindProjectionOnPointsSettings
 settings for IPointsProjector::findProjections More...
 
struct  FitBoxParams
 
class  FitDataMenuItem
 
struct  FitDataParams
 
class  FitSelectedObjectsMenuItem
 
class  FitSelectedPrimitivesMenuItem
 
struct  FixCreasesParams
 Parameters structure for fixMeshCreases function. More...
 
struct  FixMeshDegeneraciesParams
 
struct  FlatTree
 
class  FloatGrid
 wrapper class that helps mrbind to avoid excess MRVDBFloatGrid.h includes More...
 
class  FlowAggregator
 this class can track multiple flows and find in each mesh vertex the amount of water reached it More...
 
struct  FlowOrigin
 
class  FormatRegistry
 
class  FramebufferData
 class for easier rendering in framebuffer texture More...
 
class  FrameCounter
 
class  FrameRedrawRequest
 class for requesting frame redraw in some time More...
 
class  FreeFormBestFit
 
class  FreeFormDeformer
 Class for deforming mesh using Bernstein interpolation. More...
 
class  FunctionRef
 
class  FunctionRef< R(Args...)>
 Simplified implementation of std::function_ref from C++26. More...
 
class  GcodeProcessor
 class to process g-code source and generate toolpath More...
 
class  GcodeToolsLibrary
 class for storing CNC tools More...
 
struct  GCommand
 
struct  GeneralOffsetParameters
 allows the user to select in the parameters which offset algorithm to call More...
 
struct  GeodesicPath
 
class  GlBuffer
 represents OpenGL buffer owner, and allows uploading data in it remembering buffer size More...
 
class  GLStaticHolder
 
class  GlTexture
 represents OpenGL texture owner, and allows uploading data in it remembering texture size More...
 
class  GlTexture2
 represents OpenGL 2D texture owner, and allows uploading data in it remembering texture size More...
 
class  GlTexture2DArray
 represents OpenGL array texture 2D owner, and allows uploading data in it remembering texture size More...
 
class  GlTexture3
 represents OpenGL 3D texture owner, and allows uploading data in it remembering texture size More...
 
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  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...
 
class  IComputeToolDistance
 Interface for custom tool distance computation implementations. More...
 
struct  IConnectable
 
class  ICP
 
struct  ICPGroupPair
 
struct  ICPGroupPairs
 
struct  ICPPairData
 
struct  ICPProperties
 parameters of ICP algorithm More...
 
class  Id
 stores index of some element, it is made as template class to avoid mixing faces, edges and vertices More...
 
class  Id< EdgeTag >
 
class  Id< VoxelTag >
 
class  IDragDropHandler
 this class is needed to emit detailed Drag & Drop events to Viewer on different platforms More...
 
struct  IdRange
 range of indices [beg, end) More...
 
class  IFastWindingNumber
 Abstract class for fast approximate computation of generalized winding number for a mesh (using its AABB tree) More...
 
class  IFastWindingNumberByParts
 Abstract class that complements IFastWindingNumber with chunked processing variants of its methods. More...
 
class  IICPTreeIndexer
 structure to find leafs and groups of each in cascade mode More...
 
struct  Image
 
class  ImGuiImage
 
class  ImGuiMenu
 
struct  ImproveSamplingSettings
 
struct  InflateSettings
 
class  InplaceStack
 Container class implementing in-place static sized stack. More...
 
struct  InSphere
 found maximal inscribed sphere touching input point with center along given direction More...
 
struct  InSphereSearchSettings
 controls the finding of maximal inscribed sphere in mesh More...
 
struct  InterruptCloseListener
 
struct  IntersectionPrecomputes
 
struct  IntersectionPrecomputes2
 
class  InTreePathBuilder
 
struct  IntrinsicDeloneSettings
 
struct  IOFilter
 
class  IPluginUpdate
 Interface for automatically update StatePlugins internal data. More...
 
struct  IPointPairs
 Simple interface for pairs holder. More...
 
class  IPointsProjector
 abstract class for computing the closest points of point clouds More...
 
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
 Interface for processing scene state change in RibbonItems. More...
 
class  ISceneStateCheck
 Interface for checking scene state, to determine availability, also can return string with requirements. More...
 
struct  IsVisualizeMaskEnum
 
struct  IsVisualizeMaskEnum< DimensionsVisualizePropertyType >
 
struct  IsVisualizeMaskEnum< FeatureVisualizePropertyType >
 
struct  IsVisualizeMaskEnum< LabelVisualizePropertyType >
 
struct  IsVisualizeMaskEnum< LinesVisualizePropertyType >
 
struct  IsVisualizeMaskEnum< MeshVisualizePropertyType >
 
struct  IsVisualizeMaskEnum< PointMeasurementVisualizePropertyType >
 
struct  IsVisualizeMaskEnum< PointsVisualizePropertyType >
 
struct  IsVisualizeMaskEnum< VisualizeMaskType >
 
class  ItemEnabledPerViewport
 
struct  IteratorRange
 
class  ITransformControls
 Interface class for ObjectTransformWidget custom visualization. More...
 
class  IViewerSettingsManager
 
struct  KeyDownListener
 
struct  KeyRepeatListener
 
struct  KeyUpListener
 
class  LambdaRibbonItem
 Simple ribbon item acting given lambda. More...
 
class  Laplacian
 
struct  LaunchParams
 This struct contains rules for viewer launch. More...
 
struct  Line
 
struct  Line3Mesh
 
struct  LineInterpolationParams
 
class  LineObject
 
struct  LineSegm
 a segment of straight dimensional line More...
 
struct  LinesLoadSettings
 setting for polyline loading from external format, and locations of optional output data More...
 
struct  LoadedObjects
 result of loading (e.g. from a file) as a number of objects More...
 
struct  LoadedObjectT
 result of loading (e.g. from a file) as one object (with possible subobjects) More...
 
class  Logger
 Make default spd logger. More...
 
class  LoggingStreambuf
 A custom streambuf that outputs things directly to the default spdlog logger. More...
 
struct  MakeBridgeResult
 
struct  MakeDegenerateBandAroundRegionParams
 holds together settings for makeDegenerateBandAroundRegion More...
 
struct  MakeSignedByWindingNumberSettings
 
struct  MapOrHashMap
 
class  MarchingCubesByParts
 
struct  MarchingCubesParams
 
struct  MarkedContour3f
 
class  MarkedVoxelSlice
 ImGui visualization of a slice from voxel object and seed marks on it. More...
 
struct  Matrix
 
struct  Matrix2
 
struct  Matrix3
 
struct  Matrix4
 
struct  MaxArg
 
class  MeasurementObject
 
struct  MenuItemCaptionSize
 
struct  MenuItemInfo
 
struct  MergeVolumePartSettings
 Parameters' structure for MR::mergeVolumePart. More...
 
struct  Mesh
 
struct  MeshApproxRelaxParams
 
struct  MeshAttributesToUpdate
 the attribute data of the mesh that needs to be updated More...
 
class  MeshDiff
 
struct  MeshEqualizeTriAreasParams
 
struct  MeshIntersectionResult
 
struct  MeshLoadSettings
 setting for mesh loading from external format, and locations of optional output data More...
 
struct  MeshMeshConverter
 
struct  MeshMeshDistanceResult
 
struct  MeshMeshSignedDistanceResult
 
class  MeshModifier
 
struct  MeshNormals
 
class  MeshOnVoxelsT
 
class  MeshOrPoints
 
class  MeshOrPointsObject
 
struct  MeshOrPointsXf
 an object and its transformation to global space with other objects More...
 
struct  MeshPoint
 describes the point of measurement on mesh More...
 
struct  MeshPointAndDistance
 
struct  MeshProjectionParameters
 
struct  MeshProjectionResult
 
struct  MeshProjectionTransforms
 
struct  MeshRegion
 
struct  MeshRelaxParams
 
struct  MeshTexture
 
struct  MeshToDirectionVolumeParams
 
struct  MeshToDistanceMapParams
 
struct  MeshToDistanceVolumeParams
 
class  MeshTopology
 
class  MeshTopologyDiff
 
struct  MeshToVolumeParams
 Parameters structure for meshToVolume function. More...
 
struct  MeshTriPoint
 
struct  MeshVoxelsConverter
 converter of meshes in or from signed distance volumetric representation More...
 
struct  MetricToAStarPenalty
 
struct  MinArg
 
struct  MinMaxArg
 
class  ModalDialog
 Helper class to display modal dialogs. ModalDialogSettings. More...
 
struct  ModalDialogSettings
 Settings for ModalDialog. More...
 
struct  ModelBaseRenderParams
 
struct  ModelPointsData
 structure to contain pointers to model data More...
 
struct  ModelRenderParams
 Mesh rendering parameters for primary rendering (as opposed to the picker). More...
 
struct  MouseClickListener
 
class  MouseController
 
struct  MouseDownListener
 
struct  MouseMoveListener
 
struct  MouseScrollListener
 
struct  MouseUpListener
 
struct  MovementBuildBodyParams
 
struct  MoveMeshToVoxelMaxDerivSettings
 
class  MoveObjectByMouse
 
class  MoveObjectByMouseImpl
 
struct  MruFormatParameters
 Parameters of mesh / point / voxel object storage formats inside an .mru file. More...
 
struct  MultiListener
 
struct  MultiMeshIntersectionResult
 
struct  MultiRayMeshIntersectResult
 
class  MultiwayAligningTransform
 
class  MultiwayICP
 
struct  MultiwayICPSamplingParameters
 Parameters that are used for sampling of the MultiwayICP objects. More...
 
struct  MutexOwner
 
struct  NameTagClickListener
 A helper base class to subscribe to ImGuiMenu::manuallySelectObjectSignal. More...
 
struct  NewEdgesMap
 
class  NextEdgeSameLeft
 
class  NextEdgeSameOrigin
 
struct  NoCtor
 
struct  NoCtor< T >
 for trivial types, return the type itself More...
 
struct  NoDefInit
 this class is similar to T, but does not make default initialization of the fields for best performance More...
 
struct  NodeNode
 
class  NoInitId
 Variant of Id<T> with omitted initialization by default. Useful for containers. More...
 
struct  NoiseSettings
 
struct  NoModelCheck
 special struct for disabling model check More...
 
class  NormalsToPoints
 
struct  NotificationTags
 
struct  NoVisualRepresentationCheck
 special struct for disabling visual representation check More...
 
struct  NumSum
 
class  Object
 named object in the data model More...
 
class  ObjectChildrenHolder
 
class  ObjectComparableWithReference
 A base class for a data-model object that is a feature/measurement that can be compared between two models. More...
 
class  ObjectDistanceMap
 
class  ObjectFactory
 
class  ObjectFactoryBase
 
class  ObjectGcode
 
class  ObjectImGuiLabel
 
class  ObjectLabel
 
class  ObjectLines
 
class  ObjectLinesHolder
 
class  ObjectMesh
 
struct  ObjectMeshData
 mesh and its per-element attributes for ObjectMeshHolder More...
 
class  ObjectMeshHolder
 
struct  ObjectMeshMergeOptions
 options to better control MR::merge function More...
 
class  ObjectPoints
 
class  ObjectPointsHolder
 
class  ObjectTagEventDispatcher
 class for dispatching object tag addition/removal events More...
 
class  ObjectTransformWidget
 
class  ObjectVoxels
 
struct  ObjKindTraits
 Various information about different types of objects. More...
 
struct  ObjKindTraits< FeaturesObjectKind::Circle >
 
struct  ObjKindTraits< FeaturesObjectKind::Cone >
 
struct  ObjKindTraits< FeaturesObjectKind::Cylinder >
 
struct  ObjKindTraits< FeaturesObjectKind::Line >
 
struct  ObjKindTraits< FeaturesObjectKind::Plane >
 
struct  ObjKindTraits< FeaturesObjectKind::Point >
 
struct  ObjKindTraits< FeaturesObjectKind::Sphere >
 
struct  ObjTreeTraits
 
struct  ObjVertId
 
struct  OffsetContourIndex
 
struct  OffsetContoursOrigins
 
struct  OffsetContoursParams
 
struct  OffsetContoursRestoreZParams
 Parameters of restoring Z coordinate of XY offset 3d contours. More...
 
struct  OffsetParameters
 
struct  OneMeshContour
 One contour on mesh. More...
 
struct  OneMeshIntersection
 Simple point on mesh, represented by primitive id and coordinate in mesh space. More...
 
class  OpenDICOMsMenuItem
 
class  OpenDirectoryMenuItem
 
class  OpenFilesMenuItem
 
class  OpenRawVoxelsPlugin
 
struct  OpenVdbFloatGrid
 this class just hides very complex type of typedef openvdb::FloatGrid More...
 
struct  OriginAndDimensions
 shift of zero voxel in 3D space and dimensions of voxel-grid More...
 
struct  OutlierParams
 Parameters of various criteria for detecting outlier points. More...
 
class  OutliersDetector
 
struct  OutputFlows
 
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  Parabola
 Represents quadratic function f(x) = a*x*x + b*x + c. More...
 
class  ParallelProgressReporter
 
class  PartialChangeMeshAction
 Undo action for efficiently storage of partial change in mesh (e.g. a modification of small region) More...
 
class  PartialChangeMeshDataAction
 Undo action for ObjectMeshData change partially. More...
 
class  PartialChangeMeshPointsAction
 Undo action for efficiently storage of partial change in mesh points (e.g. a modification of small region) More...
 
class  PartialChangeMeshTopologyAction
 Undo action for efficiently storage of partial change in mesh topology (e.g. a modification of small region) More...
 
struct  PartMapping
 mapping among elements of source mesh, from which a part is taken, and target mesh More...
 
class  Pdf
 
struct  PdfParameters
 Parameters of document style. More...
 
class  PickPointManager
 
struct  Plane3
 
class  PlaneAccumulator
 Class to accumulate planes to find then their crossing point. More...
 
class  PlaneObject
 
class  PlaneWidget
 
class  PluginCloseOnChangeMesh
 
class  PluginCloseOnChangePointCloud
 
class  PluginCloseOnEscPressed
 Helper class to close a dialog-less plugin when the Esc key is pressed. More...
 
class  PluginCloseOnSelectedObjectRemove
 
class  PluginUpdateOnChangeMeshPart
 
class  PluginUpdateOr
 
struct  PlyLoadParams
 optional load artifacts and other setting for PLY file loading More...
 
class  PointAccumulator
 Class to accumulate points and make best line / plane approximation. More...
 
struct  PointAndDistance
 
struct  PointCloud
 
struct  PointCloudApproxRelaxParams
 
struct  PointCloudPart
 represents full point cloud (if region is nullptr) or some portion of point cloud (if region pointer is valid) More...
 
struct  PointCloudRelaxParams
 
struct  PointInAllSpaces
 
class  PointMeasurementObject
 
class  PointObject
 
struct  PointOnFace
 a point located on some mesh's face More...
 
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
 structure with settings and side output parameters for loading point cloud More...
 
struct  PointsProjectionResult
 
class  PointsProjector
 default implementation of IPointsProjector More...
 
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  PolylineProjectionResult3Arg
 
struct  PolylineProjectionWithOffsetResult
 
struct  PolylineSubdivideSettings
 
struct  PolylineToDistanceVolumeParams
 
class  PolylineTopology
 
struct  PolylineToVolumeParams
 Settings to conversion polyline to volume. More...
 
struct  PolylineTraits
 
struct  PolylineTraits< Vector2f >
 
struct  PolylineTraits< Vector3f >
 
class  PolylineUndirectedEdgeIterator
 
struct  Polynomial
 
struct  PolynomialWrapper
 This is a unifying interface for a polynomial of some degree, known only in runtime. More...
 
struct  PositionedText
 
struct  PositionVertsSmoothlyParams
 
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  PreciseVertCoord
 
struct  PreciseVertCoords
 
struct  PreciseVertCoords2
 
struct  PreDrawListener
 
struct  PreSetupViewListener
 
class  PriorityQueue
 similar to std::priority_queue, but with ability to access underlying vector to custom modify its elements More...
 
struct  ProgressInterrupter
 This class implements OpenVdb interrupter interface and provides ability to use MR::ProgressCallback in some OpenVdb operations. More...
 
struct  ProjectAttributeParams
 this structure contains transformation for projection from one mesh to another and progress callback More...
 
class  ProvidesViewportWidget
 Inherit your plugin from this to draw viewport widgets from there. More...
 
class  PythonExport
 
struct  PythonFunctionAdder
 
struct  QuadraticForm
 
class  QuadricApprox
 
class  QuadTextureVertexObject
 class for rendering simple texture More...
 
struct  Quaternion
 
class  RadiusMeasurementObject
 Represents a radius measurement. More...
 
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
 
struct  RebuildMeshSettings
 
class  RecentFilesStore
 
class  RectIndexer
 a class for converting 2D integer coordinates into 1D linear coordinates and backward More...
 
class  RedoMenuItem
 
struct  RefineParameters
 Optional parameters for refineFeatureObject. More...
 
class  RegisterRenderObjectConstructor
 
class  RegularMapMesher
 Class for making mesh from regular distance map. More...
 
struct  RelaxParams
 
struct  RemeshSettings
 
class  RenderAngleObject
 
class  RenderBufferRef
 provides access to shared buffer with type casting More...
 
class  RenderDistanceObject
 
class  RenderImGuiLabelObject
 The implementation of IRenderObject used by ObjectImGuiLabel. Draws an label using ImGui. More...
 
class  RenderLabelObject
 
class  RenderLinesObject
 
class  RenderMeshObject
 
class  RenderNameObject
 
class  RenderObjectBuffer
 provides shared buffer for loading different types of data to GL memory More...
 
class  RenderObjectCombinator
 Combines several different IRenderObjects into one in a meaningful way. More...
 
class  RenderPointObject
 
class  RenderPointsObject
 
class  RenderRadiusObject
 
class  RenderResetDirtyComponent
 Simple render object to clear dirty flags in render objects combinations. More...
 
class  RenderVolumeObject
 
class  ResetSceneMenuItem
 
struct  ResolveMeshDegenSettings
 
class  RestoringStreamsSink
 
class  RibbonButtonDrawer
 class for drawing ribbon menu buttons More...
 
struct  RibbonConfig
 
class  RibbonFontHolder
 class for convenient use of ImGui::PushFont / ImGui::PopFont with ribbon fonts More...
 
class  RibbonFontManager
 
class  RibbonIcons
 this class holds icons for ribbon items More...
 
class  RibbonMenu
 
class  RibbonMenuItem
 
class  RibbonMenuItemAdder
 
class  RibbonMenuItemAdderT
 
class  RibbonMenuItemCall
 
class  RibbonMenuSearch
 separate class for search in ribbon menu More...
 
struct  RibbonMenuUIConfig
 
struct  RibbonNotification
 
class  RibbonNotifier
 class to hold and operate with notifications More...
 
class  RibbonSceneHideAll
 
class  RibbonSceneObjectsListDrawer
 class for drawing a list of scene objects in RibbonMenu style More...
 
class  RibbonSceneRemoveSelected
 
class  RibbonSceneRename
 
class  RibbonSceneSelectAll
 
class  RibbonSceneShowAll
 
class  RibbonSceneShowOnlyNext
 
class  RibbonSceneShowOnlyPrev
 
class  RibbonSceneSortByName
 
class  RibbonSceneUnselectAll
 
struct  RibbonSchema
 This structure describes UI schema of ribbon menu. More...
 
class  RibbonSchemaHolder
 
class  RibbonSchemaLoader
 Class for loading ribbon schema from structure files (basically called from RibbonMenu, but can be called separately) More...
 
class  RibbonSchemaLoadListener
 
struct  RibbonTab
 
struct  RigidScaleXf3
 
struct  RigidXf3
 
class  RingIterator
 The iterator to find all edges in a ring of edges (e.g. all edges with same origin or all edges with same left face) More...
 
class  SaveObjectMenuItem
 
struct  SaveObjectSettings
 
class  SaveOnClosePlugin
 this plugin will show a message to the user if she closes the application when something is modified More...
 
class  SaveSceneAsMenuItem
 
class  SaveSceneMenuItem
 
class  SaveSelectedMenuItem
 
struct  SaveSettings
 determines how to save points/lines/mesh More...
 
class  SceneCache
 class to cached scene objects data More...
 
struct  SceneColors
 
class  SceneObjectsListDrawer
 class for drawing a list of scene objects (and handling interaction with it) More...
 
struct  SceneReorder
 
class  SceneRoot
 
class  SceneRootObject
 Object that is parent of all scene. More...
 
class  SceneSelectionChangeClose
 close on state change More...
 
class  SceneSelectionChangeRestart
 restart on state change More...
 
class  SceneSettings
 
class  SceneStateAndCheck
 checks that all of argument checks are true More...
 
class  SceneStateAtLeastCheck
 checks that given vector has at least N objects if type ObjectT More...
 
class  SceneStateAtLeastCheck< N, ObjectT, NoModelCheck >
 
class  SceneStateAtLeastCheck< N, ObjectT, NoVisualRepresentationCheck >
 
class  SceneStateExactCheck
 check that given vector has exactly N objects if type ObjectT More...
 
class  SceneStateExactCheck< N, ObjectT, NoModelCheck >
 
class  SceneStateExactCheck< N, ObjectT, NoVisualRepresentationCheck >
 
class  SceneStateOrCheck
 checks that at least one of argument checks is true More...
 
class  SceneTextureGL
 Class for rendering 3d scene into texture. More...
 
class  ScopeHistory
 The purpose of this class is to combine all actions appended to global history store in one big action to undo/redo them all at once. More...
 
struct  SearchPathSettings
 Geo path search settings. More...
 
struct  SegmEndColors
 colors of segment ends More...
 
struct  SegmentSegmentIntersectResult
 
struct  SegmPoint
 encodes a point inside a line segment using relative distance in [0,1] More...
 
class  SelectObjectByClick
 
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...
 
struct  SetNew
 argument of this type indicates that the object is in old state, and the following argument is new state to be set More...
 
class  SetViewportConfigPresetMenuItem
 
class  SetViewPresetMenuItem
 
struct  ShaderWarning
 
class  ShadowsGL
 
class  SharedThreadSafeOwner
 
struct  SharpenMarchingCubesMeshSettings
 
struct  SharpOffsetParameters
 
struct  ShellVertexInfo
 information about shell vertex More...
 
class  ShiftTransformer
 functor for shifting voxels More...
 
struct  ShortcutKey
 
class  ShortcutManager
 
struct  Signal
 
struct  SignedDistanceToMeshOptions
 options determining computation of signed distance from a point to a mesh More...
 
struct  SignedDistanceToMeshResult
 
struct  SimpleTimeRecord
 
struct  SkyPatch
 this class represents a portion of the sky, and its radiation More...
 
struct  SliceInfo
 
struct  SliceInfoBase
 
struct  SomeLocalTriangulations
 describes a number of local triangulations of some points (e.g. assigned to a thread) More...
 
struct  SortIntersectionsData
 Special data to sort intersections more accurate. More...
 
struct  SpaceMouseDownListener
 class to subscribe on SpaceMouseDownSgnal More...
 
struct  SpaceMouseMoveListener
 class to subscribe on SpaceMouseMoveSignal More...
 
struct  SpaceMouseUpListener
 class to subscribe on SpaceMouseUpSignal More...
 
struct  SpacingSettings
 
class  SparsePolynomial
 
struct  Sphere
 
class  SphereObject
 
struct  SphereParams
 
class  SplashWindow
 
struct  SplineSettings
 
class  Src2TgtMaps
 use this adapter to call functions expecting PartMapping parameter to receive src2tgt dense maps More...
 
class  StateBasePlugin
 
class  StateListenerPlugin
 
struct  StitchHolesParams
 Parameters structure for MR::buildCylinderBetweenTwoHoles
Structure has some options to control MR::buildCylinderBetweenTwoHoles. More...
 
struct  StopOnTrueCombiner
 Pass this as a second template argument to boost::signals2::signal<...> to stop the execution of handlers when one of them returns true. More...
 
struct  SubdivideSettings
 
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
 Widget for controlling point on surface with mouse. More...
 
class  SwapRootAction
 
struct  SymbolMeshParams
 
struct  SymMatrix2
 
struct  SymMatrix3
 
struct  SymMatrix4
 
struct  SystemMemory
 
class  SystemPath
 system directory path manager More...
 
struct  TbbTaskArenaAndGroup
 
class  TbbThreadMutex
 
class  TeethMaskToDirectionVolumeConvertor
 
struct  TerminalVertex
 
struct  TextMeshAlignParams
 
class  Tgt2SrcMaps
 use this adapter to call functions expecting PartMapping parameter to receive tgt2src dense maps More...
 
struct  ThickenParams
 
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
 Basic implementation of ITransformControls. More...
 
struct  TransformedMesh
 just stores a mesh and its transformation to some fixed reference frame More...
 
struct  TransformVdbVolumeResult
 
struct  TransparencyMode
 struct to determine transparent rendering mode More...
 
struct  TriangleSegmentIntersectResult
 
struct  TriangulationParameters
 Parameters of point cloud triangulation. More...
 
struct  TriIntersectResult
 
struct  TriMesh
 
struct  TrimOptionalOutput
 stores optional output params for trimWithPlane function More...
 
struct  TrimWithPlaneParams
 stores basic params for trimWithPlane function More...
 
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...
 
class  TypedBitSet
 
struct  TypedFlatTree
 
struct  UiRenderManager
 
struct  UiRenderParams
 
class  UndirectedEdgeIterator
 The iterator to find all not-lone undirected edges in the mesh. More...
 
struct  UndirectedEdgeUndirectedEdge
 a pair of undirected edges More...
 
class  UndoMenuItem
 
class  UnifiedPythonStream
 
struct  UniformSamplingSettings
 
class  UnionFind
 Union-find data structure for representing disjoin sets of elements with few very quick operations: 1) union of two sets in one, 2) checking whether two elements pertain to the same set, 3) finding representative element (root) of each set by any set's element. More...
 
struct  UniquePtr
 
class  UniqueTemporaryFolder
 helper class to create a temporary folder; the folder will be removed on the object's destruction More...
 
class  UniqueThreadSafeOwner
 
struct  UniteManyMeshesParams
 Parameters structure for uniteManyMeshes function. More...
 
struct  UnitInfo
 Information about a single measurement unit. More...
 
struct  UnitToStringParams
 Controls how a value with a unit is converted to a string. More...
 
struct  UnorientedTriangle
 
struct  VarEdgeTri
 
class  Vector
 std::vector<T>-like container that requires specific indexing type, More...
 
struct  Vector2
 
struct  Vector3
 
struct  Vector4
 
struct  VectorTraits
 Common traits for (mathematical) vectors. More...
 
struct  VectorTraits< ImVec2 >
 
struct  VectorTraits< ImVec4 >
 
struct  VectorTraits< Vector2< T > >
 
struct  VectorTraits< Vector3< T > >
 
struct  VectorTraits< Vector4< T > >
 
class  VertCoordsDiff
 
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
 GLFW-based mesh viewer. More...
 
class  ViewerEventQueue
 queue to ignore multiple mouse moves in one frame More...
 
class  ViewerPlugin
 
class  ViewerSettingsManager
 
class  ViewerSettingsPlugin
 
class  ViewerSetup
 
struct  ViewerSignals
 
class  ViewerTitle
 
class  Viewport
 
class  ViewportGL
 This class holds data needed to render viewport primitives and accumulative picker via OpenGL. More...
 
class  ViewportGlobalBasis
 Class to unify Global Basis control. More...
 
class  ViewportId
 
class  ViewportIterator
 iterates over all ViewportIds in given ViewportMask More...
 
class  ViewportMask
 stores mask of viewport unique identifiers More...
 
class  ViewportParametersAction
 
struct  ViewportPointsWithColors
 stores points and corresponding colors (sizes of vectors should be the same) More...
 
class  ViewportProperty
 
class  VisualObject
 Visual Object. More...
 
struct  VisualObjectTag
 modified color set for visual objects More...
 
class  VisualObjectTagManager
 class for storing and changing visual object properties based on the object tags 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  VoxelLocation
 contains both linear Id and 3D coordinates of the same voxel 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 >
 VoxelsVolumeAccessor specialization for VDB volume. More...
 
class  VoxelsVolumeAccessor< VoxelsVolume< Vector< T, VoxelId > > >
 VoxelsVolumeAccessor specialization for simple volumes. More...
 
class  VoxelsVolumeAccessor< VoxelsVolume< VoxelValueGetter< T > > >
 VoxelsVolumeAccessor specialization for value getters. More...
 
class  VoxelsVolumeAccessor< VoxelsVolumeMinMax< Vector< T, VoxelId > > >
 VoxelsVolumeAccessor specialization for simple volumes with min/max. More...
 
class  VoxelsVolumeCachingAccessor
 
class  VoxelsVolumeInterpolatedAccessor
 
struct  VoxelsVolumeMinMax
 
struct  VoxelTraits
 
struct  VoxelTraits< FloatGrid >
 
struct  VoxelTraits< Vector< T, VoxelId > >
 
struct  VoxelTraits< VoxelBitSet >
 
struct  VoxelTraits< VoxelValueGetter< T > >
 
class  WatershedGraph
 graphs representing rain basins on the mesh More...
 
class  WebRequest
 this class is needed to unify cpp and wasm requests More...
 
struct  WeightedVertex
 
struct  Writer
 the purpose of this struct is to invalidate object cache in its destructor More...
 
struct  WriteRawTiffParams
 
class  XfBasedCache
 
struct  ZCompensateParams
 
struct  ZeroOnMove
 

Concepts

concept  Trivial
 
concept  HasGetNormalMethod
 
concept  HasGetDirectionMethod
 
concept  UnitEnum
 Whether E is one of the unit enums: NoUnit, LengthUnit, AngleUnit, ...
 
concept  AnyVisualizeMaskEnumType
 Wraps IsVisualizeMaskEnum and adds some sanity checks.
 

Typedefs

using FileNamesStack = std::vector<std::filesystem::path>
 
using PdfGeneralFont = std::variant<PdfBuildinFont, std::filesystem::path>
 
using FaceTreeTraits3 = AABBTreeTraits<FaceTag, Box3f>
 
template<typename V >
using LineTreeTraits = AABBTreeTraits<UndirectedEdgeTag, Box<V>>
 
using LineTreeTraits2 = LineTreeTraits<Vector2f>
 
using LineTreeTraits3 = LineTreeTraits<Vector3f>
 
template<typename T >
using AABBTreeNodeVec = Vector<AABBTreeNode<T>, NodeId>
 
template<size_t degree>
using Polynomialf = Polynomial<float, degree>
 
template<size_t degree>
using Polynomiald = Polynomial<double, degree>
 
template<typename T >
using Polynomialx
 
using PolynomialWrapperf = PolynomialWrapper<float>
 
using PolynomialWrapperd = PolynomialWrapper<double>
 
template<size_t degree>
using BestFitPolynomialf = BestFitPolynomial<float, degree>
 
template<size_t degree>
using BestFitPolynomiald = BestFitPolynomial<double, degree>
 
using PathMeshEdgePointCallback = std::function<void( const MeshEdgePoint& mep )>
 Callback for each MeshEdgePoint in path.
 
using CurvePoints = std::vector<CurvePoint>
 curve given as a number of points on it samples at arbitrary steps
 
template<class T , class E = std::string>
using Expected = tl::expected<T, E>
 
template<class E = std::string>
using Unexpected = tl::unexpected<E>
 
using FastInt128 = __int128_t
 
using FeaturesPropertyTypesVariant = std::variant<float, Vector3f>
 
using MultiObjsSamples = std::vector<ObjVertId>
 
using Int128 = boost::multiprecision::int128_t
 
using Int256 = boost::multiprecision::int256_t
 
using Vector2i128 = Vector2<Int128>
 
using Vector3i128 = Vector3<Int128>
 
using Vector2i128fast = Vector2<FastInt128>
 no bindings since no operator << and no sqrt for FastInt128
 
using Vector3i128fast = Vector3<FastInt128>
 
using Vector2i256 = Vector3<Int256>
 
using Vector3i256 = Vector3<Int256>
 
using HistoryStackFilter = std::function<bool( const std::shared_ptr<HistoryAction>& )>
 
using HistoryActionsVector = std::vector<std::shared_ptr<HistoryAction>>
 
using OneMeshContours = std::vector<OneMeshContour>
 Special data type for MR::cutMesh.
 
using ContinuousContour = std::vector<VarEdgeTri>
 
using ContinuousContours = std::vector<ContinuousContour>
 
using IOFilters = std::vector<IOFilter>
 
using IRenderObjectConstructorLambda = std::function<std::unique_ptr<IRenderObject>( const VisualObject& )>
 
using ObjectPtr = std::shared_ptr<Object>
 
using LoadedObject = LoadedObjectT<Object>
 
using LoadedObjectMesh = LoadedObjectT<ObjectMesh>
 
using LoadedObjectPoints = LoadedObjectT<ObjectPoints>
 
using LoadedObjectLines = LoadedObjectT<ObjectLines>
 
using LoadedObjectVoxels = LoadedObjectT<ObjectVoxels>
 
using TrianglesRepetitions = std::array<int, 4>
 
using MR_BIND_IGNORE = std::array<Vector3f, 3>
 
using PreciseCollisionResult = std::vector<VarEdgeTri>
 
using TriangleCallback = std::function<ProcessOneResult( const Vector3f & p, FaceId f, const Vector3f & q, float distSq )>
 
using MultipleEdge = VertPair
 finds multiple edges in the mesh
 
using Line3fMesh = Line3Mesh<float>
 
using Line3dMesh = Line3Mesh<double>
 
using MeshIntersectionCallback = std::function<bool(const MeshIntersectionResult &)>
 
using FillTriangleMetric = std::function<double( VertId a, VertId b, VertId c )>
 args: three vertices of candidate triangle
 
using FillEdgeMetric = std::function<double( VertId a, VertId b, VertId l, VertId r )>
 
using FillCombineMetric = std::function<double( double, double )>
 args: two metric weights to combine (usualy it is simple sum of them)
 
using TriangleCornerNormals = std::array<Vector3f, 3>
 normals in three corner of a triangle
 
using ProjectOnAllCallback = std::function<void( ObjId, MeshOrPoints::ProjectionResult )>
 to receive object id + projection result on it
 
using FoundBoxedTriCallback = std::function<Processing( FaceId found, Ball3f & ball )>
 
using FoundTriCallback = std::function<Processing( const MeshProjectionResult & found, Ball3f & ball )>
 this callback is invoked on every triangle at least partially in the ball, and allows changing (shrinking only) the ball
 
using ICPObjects = Vector<MeshOrPointsXf, ObjId>
 
using ICPLayer = int
 
using ICPElementId = Id<ICPElemtTag>
 
using ICPElementBitSet = TaggedBitSet<ICPElemtTag>
 
using ICPGroupProjector = std::function<void( const Vector3f& p, MeshOrPoints::ProjectionResult& res, ObjId& resId )>
 
using ICPPairsGrid = Vector<Vector<ICPGroupPairs, ICPElementId>, ICPElementId>
 
using GcodeSource = std::vector<std::string>
 
using DashPattern = Vector4<uint8_t>
 
using OffsetContoursVertMap = std::vector<OffsetContoursOrigins>
 
using OffsetContoursVertMaps = std::vector<OffsetContoursVertMap>
 
using ContoursVariableOffset = std::function<float( int, int )>
 
using MeshTriPointsConnector = std::function<Expected<SurfacePath>( const MeshTriPoint& start, const MeshTriPoint& end, int startIndex, int endIndex )>
 
using PickedPoint = std::variant<std::monostate, MeshTriPoint, EdgePoint, VertId>
 
using FoundPointCallback = std::function<void( VertId, const Vector3f& )>
 
using OnPointInBallFound = std::function<Processing( const PointsProjectionResult & found, const Vector3f & foundXfPos, Ball3f & ball )>
 this callback is invoked on every point located within the ball, and allows changing the ball for search continuation
 
template<typename T >
using PolylineIntersectionCallback2 = std::function<Processing(const EdgePoint & polylinePoint, T rayPos, T & rayStart, T & rayEnd)>
 
using PolylineIntersectionCallback2f = PolylineIntersectionCallback2<float>
 
using PolylineIntersectionCallback2d = PolylineIntersectionCallback2<double>
 
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 )>
 Lambda for validating grid lattice.
 
using RegularGridLatticePositioner = std::function<Vector3f( size_t x, size_t y )>
 Lambda for getting lattice position.
 
using RegularGridMeshFaceValidator
 Lambda for validating mesh face.
 
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 Time = std::chrono::time_point<std::chrono::system_clock>
 
using DisabledWarnings = std::vector<ShaderWarning>
 
using FilesLoadedCallback = std::function<void( const std::vector<std::shared_ptr<Object>>& objs, const std::string& errors, const std::string& warnings )>
 
using TransformModesValidator = std::function<ControlBit( const Vector3f& center, const AffineXf3f& xf, ViewportId )>
 
using RenderDefaultUiObject = RenderObjectCombinator<RenderNameObject>
 Combines all the default UI IRenderObjects.
 
using RenderDimensionObject = RenderObjectCombinator<RenderDefaultUiObject, RenderResetDirtyComponent>
 
using MenuItemsList = std::vector<std::string>
 
using NotificationTagMask = unsigned
 
using SplitCaptionInfo = std::vector<std::pair<std::string_view, float>>
 needed for big buttons text aligning
 
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 VarUnitToStringParams
 The std::variant of UnitToStringParams<E> for all known Es (unit kinds).
 
using WebResponseCallback = std::function<void( const Json::Value& response )>
 
using VoxelPointPositioner = std::function<Vector3f( const Vector3f&, const Vector3f&, float, float, float )>
 
using MeshOnVoxelsVdb = MeshOnVoxelsT<Mesh, VdbVolume>
 
using MeshOnVoxelsVdbC = MeshOnVoxelsT<const Mesh, VdbVolume>
 
using MeshOnVoxelsSimple = MeshOnVoxelsT<Mesh, SimpleVolumeMinMax>
 
using MeshOnVoxelsSimpleC = MeshOnVoxelsT<const Mesh, SimpleVolumeMinMax>
 
using MeshOnVoxelsFunction = MeshOnVoxelsT<Mesh, FunctionVolume>
 
using MeshOnVoxelsFunctionC = MeshOnVoxelsT<const Mesh, FunctionVolume>
 
using VoxelsMetric = std::function<float( size_t from, size_t to )>
 
template<typename Volume >
using VolumePartBuilder = std::function<Expected<Volume> ( int begin, int end, std::optional<Vector3i>& offset )>
 
using VertPathInfoMap = HashMap<VertId, VertPathInfo>
 
using EdgePathsBuilder = EdgePathsBuilderT<TrivialMetricToPenalty>
 

Enumerations

enum class  PdfBuildinFont {
  PdfBuildinFont::Courier , PdfBuildinFont::CourierBold , PdfBuildinFont::CourierOblique , PdfBuildinFont::CourierBoldOblique ,
  PdfBuildinFont::Helvetica , PdfBuildinFont::HelveticaBold , PdfBuildinFont::HelveticaOblique , PdfBuildinFont::HelveticaBoldOblique ,
  PdfBuildinFont::TimesRoman , PdfBuildinFont::TimesBold , PdfBuildinFont::TimesItalic , PdfBuildinFont::TimesBoldItalic ,
  PdfBuildinFont::Symbol , PdfBuildinFont::ZapfDingbats , PdfBuildinFont::Count
}
 
enum class  Axis { Axis::X , Axis::Y , Axis::Z , Axis::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 { ConeFitterType::ApproximationPCM , ConeFitterType::HemisphereSearchFit , ConeFitterType::SpecificAxisFit }
 
enum class  FilterType : char { FilterType::Linear , FilterType::Discrete }
 
enum class  WrapType : char { WrapType::Repeat , WrapType::Mirror , WrapType::Clamp }
 
enum class  Reorder : char { Reorder::None , Reorder::Lexicographically , Reorder::AABBTree }
 determines how points to be ordered More...
 
enum class  VertexMass { VertexMass::Unit = 0 , VertexMass::NeiArea }
 determines the weight or mass of each vertex in applications like Laplacian More...
 
enum class  EdgeWeights { EdgeWeights::Unit = 0 , EdgeWeights::Cotan }
 determines the weight of each edge in applications like Laplacian More...
 
enum class  Processing : bool { Processing::Continue , Processing::Stop }
 typically returned from callbacks to control the behavior of main algorithm More...
 
enum class  OrientNormals { OrientNormals::TowardOrigin , OrientNormals::AwayFromOrigin , OrientNormals::Smart }
 the method how to choose between two opposite normal orientations More...
 
enum class  OffsetMode : int { OffsetMode::Smooth , OffsetMode::Standard , OffsetMode::Sharpening }
 
enum class  ColoringType {
  ColoringType::SolidColor , ColoringType::PrimitivesColorMap , ColoringType::FacesColorMap = PrimitivesColorMap , ColoringType::LinesColorMap = PrimitivesColorMap ,
  ColoringType::VertsColorMap
}
 
enum class  UseAABBTree : char { UseAABBTree::No , UseAABBTree::Yes , UseAABBTree::YesIfAlreadyConstructed }
 
enum class  GeodesicPathApprox : char { GeodesicPathApprox::DijkstraBiDir , GeodesicPathApprox::DijkstraAStar , GeodesicPathApprox::FastMarching }
 the algorithm to compute approximately geodesic path More...
 
enum class  Turn : bool { Turn::Leftmost , Turn::Rightmost }
 what way a path can follow in case of several alternatives More...
 
enum class  FeaturesObjectKind {
  FeaturesObjectKind::Point , FeaturesObjectKind::Line , FeaturesObjectKind::Plane , FeaturesObjectKind::Circle ,
  FeaturesObjectKind::Sphere , FeaturesObjectKind::Cylinder , FeaturesObjectKind::Cone , FeaturesObjectKind::_count
}
 
enum class  FeaturePropertyKind {
  FeaturePropertyKind::position , FeaturePropertyKind::linearDimension , FeaturePropertyKind::direction , FeaturePropertyKind::angle ,
  FeaturePropertyKind::other
}
 Classifies FeatureObjectSharedProperty, mostly for informational purposes. More...
 
enum class  ICPMethod { ICPMethod::Combined = 0 , ICPMethod::PointToPoint = 1 , ICPMethod::PointToPlane = 2 }
 The method how to update transformation from point pairs. More...
 
enum class  ICPMode {
  ICPMode::RigidScale , ICPMode::AnyRigidXf , ICPMode::OrthogonalAxis , ICPMode::FixedAxis ,
  ICPMode::TranslationOnly
}
 The group of transformations, each with its own degrees of freedom. More...
 
enum class  ICPExitType {
  ICPExitType::NotStarted , ICPExitType::NotFoundSolution , ICPExitType::MaxIterations , ICPExitType::MaxBadIterations ,
  ICPExitType::StopMsdReached
}
 types of exit conditions in calculation More...
 
enum class  Side { Side::Negative , Side::Positive }
 
enum class  DepthFunction {
  DepthFunction::Never = 0 , DepthFunction::Less = 1 , DepthFunction::Equal = 2 , DepthFunction::Greater = 4 ,
  DepthFunction::LessOrEqual = Less | Equal , DepthFunction::GreaterOrEqual = Greater | Equal , DepthFunction::NotEqual = Less | Greater , DepthFunction::Always = Less | Equal | Greater ,
  DepthFunction::Default = 8
}
 
enum  DecimateStrategy { MinimizeError , ShortestEdgeFirst }
 Defines the order of edge collapses inside Decimate algorithm. More...
 
enum class  FlipEdge : int { FlipEdge::Can , FlipEdge::Cannot , FlipEdge::Must }
 
enum class  ProcessOneResult : bool { ProcessOneResult::StopProcessing = false , ProcessOneResult::ContinueProcessing = true }
 
enum class  OutlierTypeMask {
  OutlierTypeMask::SmallComponents = 1 << 0 , OutlierTypeMask::WeaklyConnected = 1 << 1 , OutlierTypeMask::FarSurface = 1 << 2 , OutlierTypeMask::AwayNormal = 1 << 3 ,
  OutlierTypeMask::All = SmallComponents | WeaklyConnected | FarSurface | AwayNormal
}
 Types of outlier points. More...
 
enum class  OutEdge2 : signed char {
  OutEdge2::Invalid = -1 , OutEdge2::PlusY , OutEdge2::MinusY , OutEdge2::PlusX ,
  OutEdge2::MinusX , OutEdge2::Count
}
 
enum class  RelaxApproxType { RelaxApproxType::Planar , RelaxApproxType::Quadric }
 
enum class  RenderModelPassMask {
  RenderModelPassMask::Opaque = 1 << 0 , RenderModelPassMask::Transparent = 1 << 1 , RenderModelPassMask::VolumeRendering = 1 << 2 , RenderModelPassMask::NoDepthTest = 1 << 3 ,
  RenderModelPassMask::All
}
 Various passes of the 3D rendering. More...
 
enum class  NeighborDir { NeighborDir::X , NeighborDir::Y , NeighborDir::Z , NeighborDir::Count }
 
enum class  SignDetectionMode {
  SignDetectionMode::Unsigned , SignDetectionMode::OpenVDB , SignDetectionMode::ProjectionNormal , SignDetectionMode::WindingRule ,
  SignDetectionMode::HoleWindingRule
}
 how to determine the sign of distances from a mesh More...
 
enum class  SignDetectionModeShort { SignDetectionModeShort::Auto , SignDetectionModeShort::HoleWindingNumber , SignDetectionModeShort::ProjectionNormal }
 how to determine the sign of distances from a mesh, short version including auto-detection More...
 
enum class  PathError { PathError::StartEndNotConnected , PathError::InternalError }
 
enum class  ExtremeEdgeType { ExtremeEdgeType::Ridge , ExtremeEdgeType::Gorge }
 
enum class  NestedComponenetsMode { NestedComponenetsMode::Remove , NestedComponenetsMode::Merge , NestedComponenetsMode::Union }
 Mode of processing components. More...
 
enum class  NoUnit { NoUnit::_count }
 A stub measurement unit representing no unit. More...
 
enum class  LengthUnit {
  LengthUnit::microns , LengthUnit::millimeters , LengthUnit::centimeters , LengthUnit::meters ,
  LengthUnit::inches , LengthUnit::feet , LengthUnit::_count
}
 Measurement units of length. More...
 
enum class  AngleUnit { AngleUnit::radians , AngleUnit::degrees , AngleUnit::_count }
 Measurement units of angle. More...
 
enum class  PixelSizeUnit { PixelSizeUnit::pixels , PixelSizeUnit::_count }
 Measurement units of screen sizes. More...
 
enum class  RatioUnit { RatioUnit::factor , RatioUnit::percents , RatioUnit::_count }
 Measurement units for factors / ratios. More...
 
enum class  TimeUnit { TimeUnit::seconds , TimeUnit::milliseconds , TimeUnit::_count }
 Measurement units for time. More...
 
enum class  MovementSpeedUnit {
  MovementSpeedUnit::micronsPerSecond , MovementSpeedUnit::millimetersPerSecond , MovementSpeedUnit::centimetersPerSecond , MovementSpeedUnit::metersPerSecond ,
  MovementSpeedUnit::inchesPerSecond , MovementSpeedUnit::feetPerSecond , MovementSpeedUnit::_count
}
 Measurement units for movement speed. More...
 
enum class  AreaUnit {
  AreaUnit::microns2 , AreaUnit::millimeters2 , AreaUnit::centimeters2 , AreaUnit::meters2 ,
  AreaUnit::inches2 , AreaUnit::feet2 , AreaUnit::_count
}
 Measurement units for surface area. More...
 
enum class  VolumeUnit {
  VolumeUnit::microns3 , VolumeUnit::millimeters3 , VolumeUnit::centimeters3 , VolumeUnit::meters3 ,
  VolumeUnit::inches3 , VolumeUnit::feet3 , VolumeUnit::_count
}
 Measurement units for body volume. More...
 
enum class  InvLengthUnit {
  InvLengthUnit::inv_microns , InvLengthUnit::inv_millimeters , InvLengthUnit::inv_centimeters , InvLengthUnit::inv_meters ,
  InvLengthUnit::inv_inches , InvLengthUnit::inv_feet , InvLengthUnit::_count
}
 Measurement units for 1/length. More...
 
enum  DirtyFlags {
  DIRTY_NONE = 0x0000 , DIRTY_POSITION = 0x0001 , DIRTY_UV = 0x0002 , DIRTY_VERTS_RENDER_NORMAL = 0x0004 ,
  DIRTY_FACES_RENDER_NORMAL = 0x0008 , DIRTY_RENDER_NORMALS = DIRTY_VERTS_RENDER_NORMAL | DIRTY_FACES_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_TEXTURE_PER_FACE = 0x0400 , DIRTY_MESH = 0x07FF , DIRTY_BORDER_LINES = 0x1000 ,
  DIRTY_EDGES_SELECTION = 0x2000 , DIRTY_VOLUME = 0x4000 , DIRTY_ALL = 0x7FFF
}
 
enum class  OutEdge : signed char {
  OutEdge::Invalid = -1 , OutEdge::PlusZ = 0 , OutEdge::MinusZ , OutEdge::PlusY ,
  OutEdge::MinusY , OutEdge::PlusX , OutEdge::MinusX , OutEdge::Count
}
 
enum  AlignType { Left , Center , Right }
 
enum class  SelectedTypesMask {
  SelectedTypesMask::ObjectBit = 1 << 0 , SelectedTypesMask::ObjectPointsHolderBit = 1 << 1 , SelectedTypesMask::ObjectLinesHolderBit = 1 << 2 , SelectedTypesMask::ObjectMeshHolderBit = 1 << 3 ,
  SelectedTypesMask::ObjectLabelBit = 1 << 4 , SelectedTypesMask::ObjectMeshBit = 1 << 5 , SelectedTypesMask::ObjectFeatureBit = 1 << 6 , SelectedTypesMask::ObjectMeasurementBit = 1 << 7
}
 
enum class  FitMode {
  FitMode::Visible , FitMode::SelectedPrimitives , FitMode::SelectedObjects , FitMode::SelectableObjects ,
  FitMode::CustomObjectsList
}
 Fit mode ( types of objects for which the fit is applied ) More...
 
enum class  MouseButton {
  MouseButton::Left = 0 , MouseButton::Right = 1 , MouseButton::Middle = 2 , MouseButton::Count ,
  MouseButton::NoButton = Count
}
 
enum class  MouseMode {
  MouseMode::None , MouseMode::Rotation , MouseMode::Translation , MouseMode::Roll ,
  MouseMode::Count
}
 Standard mouse functions for camera control. More...
 
enum class  NotificationType {
  NotificationType::Error , NotificationType::Warning , NotificationType::Info , NotificationType::Time ,
  NotificationType::Count
}
 
enum class  ControlBit {
  ControlBit::None = 0 , ControlBit::RotX = 0x1 , ControlBit::RotY = 0x2 , ControlBit::RotZ = 0x4 ,
  ControlBit::RotMask = RotX | RotY | RotZ , ControlBit::MoveX = 0x8 , ControlBit::MoveY = 0x10 , ControlBit::MoveZ = 0x20 ,
  ControlBit::MoveMask = MoveX | MoveY | MoveZ , ControlBit::FullMask = RotMask | MoveMask
}
 
enum class  RibbonItemType { RibbonItemType::Button , RibbonItemType::ButtonWithDrop }
 
enum class  RibbonTopPanelLayoutMode { RibbonTopPanelLayoutMode::None , RibbonTopPanelLayoutMode::RibbonNoTabs , RibbonTopPanelLayoutMode::RibbonWithTabs }
 
enum class  RibbonNotificationCorner { RibbonNotificationCorner::LowerLeft , RibbonNotificationCorner::LowerRight }
 corner where notifications will appear More...
 
enum class  PathPreference { PathPreference::Geodesic , PathPreference::Convex , PathPreference::Concave }
 
enum class  ShaderTransparencyMode : char { ShaderTransparencyMode::None , ShaderTransparencyMode::AlphaSort , ShaderTransparencyMode::DepthPeel }
 
enum class  ShortcutCategory : char {
  ShortcutCategory::Info , ShortcutCategory::Edit , ShortcutCategory::View , ShortcutCategory::Scene ,
  ShortcutCategory::Objects , ShortcutCategory::Selection , ShortcutCategory::Count
}
 
enum class  StatePluginTabs {
  StatePluginTabs::Basic , StatePluginTabs::Mesh , StatePluginTabs::DistanceMap , StatePluginTabs::PointCloud ,
  StatePluginTabs::Selection , StatePluginTabs::Voxels , StatePluginTabs::Analysis , StatePluginTabs::Test ,
  StatePluginTabs::Other , StatePluginTabs::Count
}
 
enum class  NumberStyle { NumberStyle::normal , NumberStyle::distributePrecision , NumberStyle::exponential , NumberStyle::maybeExponential }
 
enum class  DegreesMode { DegreesMode::degrees , DegreesMode::degreesMinutes , DegreesMode::degreesMinutesSeconds , DegreesMode::_count }
 This controls how the degrees are printed. More...
 
enum class  ZeroMode { ZeroMode::asIs , ZeroMode::alwaysPositive , ZeroMode::alwaysNegative }
 
enum class  SideRegions { SideRegions::CCWArrow = 26 , SideRegions::CWArrow = 27 }
 
enum class  ScalarType {
  ScalarType::UInt8 , ScalarType::Int8 , ScalarType::UInt16 , ScalarType::Int16 ,
  ScalarType::UInt32 , ScalarType::Int32 , ScalarType::UInt64 , ScalarType::Int64 ,
  ScalarType::Float32 , ScalarType::Float64 , ScalarType::Float32_4 , ScalarType::Unknown ,
  ScalarType::Count
}
 scalar value's binary format type More...
 
enum class  BypassDirection { BypassDirection::Clockwise , BypassDirection::CounterClockwise }
 
enum class  MoveType {
  MoveType::None = -1 , MoveType::FastLinear = 0 , MoveType::Linear = 1 , MoveType::ArcCW = 2 ,
  MoveType::ArcCCW = 3
}
 
enum class  ArcPlane { ArcPlane::None = -1 , ArcPlane::XY = 17 , ArcPlane::XZ = 18 , ArcPlane::YZ = 19 }
 
enum class  VoxelFilterType : int { VoxelFilterType::Median , VoxelFilterType::Mean , VoxelFilterType::Gaussian }
 
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...
 

Functions

MRIOEXTRAS_API Expected< LoadedObjectdeserializeObjectTreeFrom3mf (const std::filesystem::path &file, const ProgressCallback &callback={})
 loads scene from 3MF file in a new container object
 
MRIOEXTRAS_API Expected< LoadedObjectdeserializeObjectTreeFromModel (const std::filesystem::path &file, const ProgressCallback &callback={})
 loads scene from .model file in a new container object
 
MRIOEXTRAS_API Expected< std::shared_ptr< Object > > deserializeObjectTreeFromGltf (const std::filesystem::path &file, ProgressCallback callback={})
 loads scene from glTF file in a new container object
 
MRIOEXTRAS_API Expected< void > serializeObjectTreeToGltf (const Object &root, const std::filesystem::path &file, const ObjectSave::Settings &settings)
 saves scene to a glTF file
 
MRIOEXTRAS_API void loadIOExtras ()
 
MRIOEXTRAS_API Expected< void > zlibCompressStream (std::istream &in, std::ostream &out, int level=-1)
 compress the input data using the Deflate algorithm
 
MRIOEXTRAS_API Expected< void > zlibDecompressStream (std::istream &in, std::ostream &out)
 
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)
 
int getNumNodesPoints (int numPoints)
 returns the number of nodes in the binary tree with given number of points
 
MRMESH_API Expected< void > addNoise (VertCoords &points, const VertBitSet &validVerts, NoiseSettings settings)
 Adds noise to the points, using a normal distribution.
 
MRMESH_API Expected< void > addNoise (Mesh &mesh, const VertBitSet *region=nullptr, const 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< MeshalignContoursToMesh (const Mesh &mesh, const Contours2f &contours, const ContoursMeshAlignParams &params)
 Creates planar mesh out of given contour and aligns it to given surface.
 
MRMESH_API Expected< MeshbendContoursAlongCurve (const Contours2f &contours, const CurveFunc &curve, const BendContoursAlongCurveParams &params)
 Converts contours in thick mesh, and deforms it along given path.
 
MRMESH_API Expected< MeshbendContoursAlongSurfacePath (const Contours2f &contours, const Mesh &mesh, const MeshTriPoint &start, const SurfacePath &path, const MeshTriPoint &end, const BendContoursAlongCurveParams &params)
 Converts contours in thick mesh, and deforms it along given surface path: start->path->end.
 
MRMESH_API Expected< MeshbendContoursAlongSurfacePath (const Contours2f &contours, const Mesh &mesh, const SurfacePath &path, const BendContoursAlongCurveParams &params)
 Converts contours in thick mesh, and deforms it along given surface path.
 
MRMESH_API Expected< std::vector< float > > findPartialLens (const CurvePoints &cp, float *outCurveLen=nullptr)
 
MRMESH_API CurvePoint getCurvePoint (const CurvePoints &cp, const std::vector< float > &lens, float p)
 
MRMESH_API Expected< CurveFunccurveFromPoints (const CurvePoints &cp, float *outCurveLen=nullptr)
 
MRMESH_API Expected< CurveFunccurveFromPoints (CurvePoints &&cp, float *outCurveLen=nullptr)
 
MRMESH_API CurvePoints meshPathCurvePoints (const Mesh &mesh, const MeshTriPoint &start, const SurfacePath &path, const MeshTriPoint &end)
 converts polyline given as a number of MeshTriPoint/MeshEdgePoint into CurvePoints
 
MRMESH_API CurvePoints meshPathCurvePoints (const Mesh &mesh, const SurfacePath &path)
 
MRMESH_API void addBaseToPlanarMesh (Mesh &mesh, float zOffset)
 
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)
 creates hollow arrow from the 'base' to the 'vert'. Number of points on the circle 'qual' is between 3 and 256
 
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)
 creates the mesh with 3 axis arrows
 
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 PointCloudPart &pcp, const AffineXf3f *xf=nullptr)
 Adds in existing PointAccumulator all points from the cloud (region) with weight 1.
 
constexpr bool canSolvePolynomial (auto degree)
 
constexpr bool canMinimizePolynomial (auto degree)
 
size_t heapBytes (const BitSet &bs)
 returns the amount of memory given BitSet occupies on heap
 
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 I >
bool operator== (const TypedBitSet< I > &a, const TypedBitSet< I > &b)
 
template<typename T , typename U >
void operator== (const TypedBitSet< T > &a, const TypedBitSet< U > &b)=delete
 prohibit comparison of unrelated sets
 
template<typename I >
std::function< bool(I)> makePredicate (const TypedBitSet< I > *bitset)
 
template<typename I >
std::function< bool(I)> makePredicate (const TypedBitSet< I > &bitset)
 
template<typename I >
bool contains (const TypedBitSet< I > *bitset, I id)
 
template<typename I >
bool contains (const TypedBitSet< I > &bitset, I id)
 
MR_BIND_IGNORE_PY auto begin (const BitSet &a)
 
MR_BIND_IGNORE_PY auto end (const BitSet &)
 
template<typename I >
MR_BIND_IGNORE_PY auto begin (const TypedBitSet< I > &a)
 
template<typename I >
MR_BIND_IGNORE_PY auto end (const TypedBitSet< I > &)
 
template<typename I >
Vector< int, I > makeVectorWithSeqNums (const TypedBitSet< I > &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 I >
HashMap< I, int > makeHashMapWithSeqNums (const TypedBitSet< I > &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 BS , typename ... F>
auto BitSetParallelForAllRanged (const BS &bs, F &&... f)
 namespace BitSetParallel
 
template<typename BS , typename L , typename ... F>
auto BitSetParallelForAllRanged (const BS &bs, tbb::enumerable_thread_specific< L > &e, F &&... f)
 
template<typename BS , typename F , typename ... Cb>
auto BitSetParallelForAll (const BS &bs, F &&f, Cb &&... cb)
 
template<typename BS , typename L , typename F , typename ... Cb>
auto BitSetParallelForAll (const BS &bs, tbb::enumerable_thread_specific< L > &e, F &&f, Cb &&... cb)
 
template<typename BS , typename F , typename ... Cb>
auto BitSetParallelFor (const BS &bs, F &&f, Cb &&... cb)
 
template<typename BS , typename L , typename F , typename ... Cb>
auto BitSetParallelFor (const BS &bs, tbb::enumerable_thread_specific< L > &e, F &&f, Cb &&... cb)
 
MRMESH_API Expected< MeshdoBooleanOperation (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 >
MinMax< typename Box< V >::T > getTouchPlanes (const Box< V > &box, const V &n)
 
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 V >
auto findSortedBoxDims (const Box< V > &box) -> typename VectorTraits< V >::template ChangeBaseType< int >
 
template<size_t I, typename V >
constexpr const V & get (const Box< V > &box) noexcept
 get<0> returns min, get<1> returns max
 
template<size_t I, typename V >
constexpr V & get (Box< V > &box) noexcept
 
template<typename T , typename I >
getAt (const Buffer< T, I > &bmap MR_LIFETIMEBOUND_NESTED, I key, T def={})
 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)
 
template<typename T >
BMap< T, T > compose (const BMap< T, T > &a, const BMap< T, T > &b)
 computes the composition of two mappings x -> a(b(x))
 
MRMESH_API MR_BIND_IGNORE std::optional< std::tm > Localtime (std::time_t time)
 A threadsafe equivalent for std::localtime(). Returns null on failure.
 
MRMESH_API MR_BIND_IGNORE std::tm LocaltimeOrZero (std::time_t time)
 Same, but returns a struct full of zeroes on error.
 
MRMESH_API size_t chunkCount (size_t totalSize, size_t chunkSize, size_t overlap=0)
 returns the amount of chunks of given size required to cover the full array
 
MRMESH_API IteratorRange< ChunkIteratorsplitByChunks (size_t totalSize, size_t chunkSize, size_t overlap=0)
 returns a pair of iterators for chunks covering the array of given size
 
MRMESH_API PointAndDistance findClosestWeightedPoint (const Vector3f &loc, const AABBTreePoints &tree, const DistanceFromWeightedPointsComputeParams &params)
 
MRMESH_API MeshPointAndDistance findClosestWeightedMeshPoint (const Vector3f &loc, const Mesh &mesh, const DistanceFromWeightedPointsComputeParams &params)
 
MRMESH_API std::optional< VertMap > findSmallestCloseVertices (const Mesh &mesh, float closeDist, const ProgressCallback &cb={})
 
MRMESH_API std::optional< VertMap > findSmallestCloseVertices (const PointCloud &cloud, float closeDist, const ProgressCallback &cb={})
 
MRMESH_API std::optional< VertMap > findSmallestCloseVertices (const VertCoords &points, float closeDist, const VertBitSet *valid=nullptr, const ProgressCallback &cb={})
 
MRMESH_API std::optional< VertMap > findSmallestCloseVerticesUsingTree (const VertCoords &points, float closeDist, const AABBTreePoints &tree, const VertBitSet *valid, const ProgressCallback &cb={})
 
MRMESH_API std::optional< VertBitSet > 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
 
MRMESH_API std::optional< VertBitSet > 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
 
MRMESH_API std::optional< VertBitSet > 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
 
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 std::vector< EdgePair > findTwinEdgePairs (const Mesh &mesh, float closeDist)
 definition: if A,B and C,D are close vertices, then let us name AC and BD twin edges
 
MRMESH_API EdgeBitSet findTwinEdges (const Mesh &mesh, float closeDist)
 finds all directed twin edges
 
MRMESH_API EdgeBitSet findTwinEdges (const std::vector< EdgePair > &pairs)
 
MRMESH_API UndirectedEdgeBitSet findTwinUndirectedEdges (const Mesh &mesh, float closeDist)
 finds all undirected twin edges
 
MRMESH_API UndirectedEdgeBitSet findTwinUndirectedEdges (const std::vector< EdgePair > &pairs)
 
MRMESH_API UndirectedEdgeHashMap findTwinUndirectedEdgeHashMap (const Mesh &mesh, float closeDist)
 provided that each edge has at most one twin, composes bidirectional mapping between twins
 
MRMESH_API UndirectedEdgeHashMap findTwinUndirectedEdgeHashMap (const std::vector< EdgePair > &pairs)
 
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)
 
MRMESH_API Color blend (const Color &front, const Color &back)
 
template<typename V >
Box< V > computeBoundingBox (const Vector< V, VertId > &points, VertId firstVert, VertId lastVert, const VertBitSet *region=nullptr, 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 V >
Box< V > computeBoundingBox (const Vector< V, VertId > &points, const VertBitSet &region, 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 V , typename R = typename V::ValueType>
calcLength (const Contour< V > &contour)
 
template<typename V , typename R = typename V::ValueType>
size_t findContourPointByLength (const Contour< V > &contour, R targetLen)
 
template<typename To , typename From >
MR_BIND_IGNORE To convertContour (const From &from)
 
template<typename To , typename From >
MR_BIND_IGNORE To convertContours (const From &from)
 
template<typename From >
Contour2f convertContourTo2f (const From &from)
 Instantiate the templates when generating bindings.
 
template<typename From >
Contour3f convertContourTo3f (const From &from)
 
template<typename From >
Contour2d convertContourTo2d (const From &from)
 
template<typename From >
Contour3d convertContourTo3d (const From &from)
 
template<typename From >
Contours2f convertContoursTo2f (const From &from)
 
template<typename From >
Contours3f convertContoursTo3f (const From &from)
 
template<typename From >
Contours2d convertContoursTo2d (const From &from)
 
template<typename From >
Contours3d convertContoursTo3d (const From &from)
 
MRMESH_API CutMeshResult cutMesh (Mesh &mesh, const OneMeshContours &contours, const CutMeshParameters &params={})
 Cuts mesh by given contours.
 
MRMESH_API Expected< FaceBitSet > cutMeshByContour (Mesh &mesh, const Contour3f &contour, const AffineXf3f &xf={})
 
MRMESH_API Expected< FaceBitSet > cutMeshByContours (Mesh &mesh, const Contours3f &contours, const AffineXf3f &xf={})
 
MRMESH_API Expected< std::vector< EdgePath > > cutMeshByProjection (Mesh &mesh, const Contours3f &contours, const CutByProjectionSettings &settings)
 Performs orthographic projection with of given contours to mesh and cut result lines, fails if any point of contours has missed mesh on projection stage or cut contours contains self-intersections.
 
MRMESH_API Expected< OneMeshContoursconvertMeshTriPointsSurfaceOffsetToMeshContours (const Mesh &mesh, const std::vector< MeshTriPoint > &surfaceLine, float offset, SearchPathSettings searchSettings={})
 Makes continuous contour by iso-line from mesh tri points, if first and last meshTriPoint is the same, makes closed contour.
 
MRMESH_API Expected< OneMeshContoursconvertMeshTriPointsSurfaceOffsetToMeshContours (const Mesh &mesh, const std::vector< MeshTriPoint > &surfaceLine, const std::function< float(int)> &offsetAtPoint, SearchPathSettings searchSettings={})
 Makes continuous contour by iso-line from mesh tri points, if first and last meshTriPoint is the same, makes closed contour.
 
MRMESH_API std::vector< FaceBitSet > separateClosedContour (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)
 computes the mesh of convex hull from given input points
 
MRMESH_API Mesh makeConvexHull (const Mesh &in)
 
MRMESH_API Mesh makeConvexHull (const PointCloud &in)
 
MRMESH_API Contour2f makeConvexHull (Contour2f points)
 computes the contour of convex hull from given input points
 
MRMESH_API MeshTopology makeCubeTopology ()
 
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)
 creates parallelepiped mesh with given min-corner base and given directional vectors size
 
MRMESH_API Mesh makeBoxMesh (const Box3f &box)
 creates mesh visualizing a box
 
MRMESH_API Mesh makeCylinder (float radius=0.1f, float length=1.0f, int resolution=16)
 Z-looking.
 
MRMESH_API Mesh makeOpenCylinder (float radius=1, float z1=-1, float z2=1, int numCircleSegments=16)
 A hollow cylinder.
 
MRMESH_API Mesh makeOpenCone (float radius=1, float zApex=0, float zBase=1, int numCircleSegments=16)
 A hollow cone.
 
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)
 Makes cone mesh by calling makeCylinderAdvanced with the top radius 0.
 
MRMESH_API void calcDipoles (Dipoles &dipoles, const AABBTree &tree, const Mesh &mesh)
 calculates dipoles for given mesh and AABB-tree
 
MRMESH_API Dipoles calcDipoles (const AABBTree &tree, const Mesh &mesh)
 
MRMESH_API float calcFastWindingNumber (const Dipoles &dipoles, const AABBTree &tree, const Mesh &mesh, const Vector3f &q, float beta, FaceId skipFace)
 
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 VertId findDirMax (const Vector3f &dir, const Mesh &m, UseAABBTree u=UseAABBTree::Yes)
 
MRMESH_API VertId findDirMax (const Vector3f &dir, const MeshPart &mp, UseAABBTree u=UseAABBTree::Yes)
 
MRMESH_API VertId findDirMax (const Vector3f &dir, const MeshVertPart &mp, UseAABBTree u=UseAABBTree::Yes)
 
MRMESH_API VertId findDirMax (const Vector3f &dir, const Polyline3 &polyline, UseAABBTree u=UseAABBTree::Yes)
 
MRMESH_API VertId findDirMax (const Vector2f &dir, const Polyline2 &polyline, UseAABBTree u=UseAABBTree::Yes)
 
MRMESH_API VertId findDirMax (const Vector3f &dir, const PointCloud &cloud, const VertBitSet *region=nullptr, UseAABBTree u=UseAABBTree::Yes)
 
MRMESH_API VertId findDirMax (const Vector3f &dir, const AABBTreePoints &tree, const VertBitSet *region=nullptr)
 
MRMESH_API VertId findDirMaxBruteForce (const Vector3f &dir, const VertCoords &points, const VertBitSet *region=nullptr)
 finds the point having the largest projection on given direction by traversing all region points
 
MRMESH_API VertId findDirMaxBruteForce (const Vector2f &dir, const VertCoords2 &points, const VertBitSet *region=nullptr)
 finds the point having the largest projection on given direction by traversing all region points
 
MRMESH_API VertId findDirMaxBruteForce (const Vector3f &dir, const PointCloud &cloud, const VertBitSet *region=nullptr)
 finds the point in the cloud having the largest projection on given direction by traversing all valid points
 
MRMESH_API VertId findDirMaxBruteForce (const Vector3f &dir, const Polyline3 &polyline)
 finds the vertex in the polyline having the largest projection on given direction by traversing all valid vertices
 
MRMESH_API VertId findDirMaxBruteForce (const Vector2f &dir, const Polyline2 &polyline)
 finds the vertex in the polyline having the largest projection on given direction by traversing all valid vertices
 
MRMESH_API VertId findDirMaxBruteForce (const Vector3f &dir, const MeshPart &mp)
 finds the vertex in the mesh part having the largest projection on given direction by traversing all (region) faces
 
MRMESH_API VertId findDirMaxBruteForce (const Vector3f &dir, const MeshVertPart &mp)
 finds the vertex in the mesh part having the largest projection on given direction by traversing all (region) vertices
 
MRMESH_API MinMaxArg< float, VertId > findDirMinMaxBruteForce (const Vector3f &dir, const VertCoords &points, const VertBitSet *region=nullptr)
 finds the points having the smallest and the largest projections on given direction by traversing all region points
 
MRMESH_API MinMaxArg< float, VertId > findDirMinMaxBruteForce (const Vector2f &dir, const VertCoords2 &points, const VertBitSet *region=nullptr)
 finds the points having the smallest and the largest projections on given direction by traversing all region points
 
MRMESH_API MinMaxArg< float, VertId > findDirMinMaxBruteForce (const Vector3f &dir, const PointCloud &cloud, const VertBitSet *region=nullptr)
 finds the points in the cloud having the smallest and the largest projections on given direction by traversing all valid points
 
MRMESH_API MinMaxArg< float, VertId > findDirMinMaxBruteForce (const Vector3f &dir, const Polyline3 &polyline)
 finds the vertex in the polyline having the smallest and the largest projections on given direction by traversing all valid vertices
 
MRMESH_API MinMaxArg< float, VertId > findDirMinMaxBruteForce (const Vector2f &dir, const Polyline2 &polyline)
 finds the vertex in the polyline having the smallest and the largest projections on given direction by traversing all valid vertices
 
MRMESH_API MinMaxArg< float, VertId > findDirMinMaxBruteForce (const Vector3f &dir, const MeshPart &mp)
 finds the vertices in the mesh part having the smallest and the largest projections on given direction by traversing all (region) faces
 
MRMESH_API MinMaxArg< float, VertId > findDirMinMaxBruteForce (const Vector3f &dir, const MeshVertPart &mp)
 finds the vertices in the mesh part having the smallest and the largest projections on given direction by traversing all (region) vertices
 
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< Vector3f > edgePointsFromContours (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, AffineXf3f > distanceMapTo2DIsoPolyline (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 Image convertDistanceMapToImage (const DistanceMap &distMap, float threshold=1.f/255)
 
MRMESH_API Expected< DistanceMapconvertImageToDistanceMap (const Image &image, float threshold=1.f/255, bool invert=true)
 
template<class T >
divRound (T n, T d)
 
template<class T >
Vector2< T > divRound (const Vector2< T > &n, T d)
 computes division n/d with rounding of each components to the nearest integer, all signs of n and d are supported
 
template<class T >
Vector3< T > divRound (const Vector3< T > &n, T d)
 computes division n/d with rounding of each components to the nearest integer, all signs of n and d are supported
 
template<class T >
Vector4< T > divRound (const Vector4< T > &n, T d)
 computes division n/d with rounding of each components to the nearest integer, all signs of n and d are supported
 
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< MeshembedStructureToTerrain (const Mesh &terrain, const Mesh &structure, const EmbeddedStructureParameters &params)
 
MRMESH_API void serializeToJson (const EndMillCutter &cutter, Json::Value &root)
 
MRMESH_API void serializeToJson (const EndMillTool &tool, Json::Value &root)
 
MRMESH_API Expected< void > deserializeFromJson (const Json::Value &root, EndMillCutter &cutter)
 
MRMESH_API Expected< void > deserializeFromJson (const Json::Value &root, EndMillTool &tool)
 
MRMESH_API VertScalars computeSpaceDistances (const Mesh &mesh, const PointOnFace &start, float range)
 
MRMESH_API VertBitSet findNeighborVerts (const Mesh &mesh, const PointOnFace &start, float rangeSq)
 
MRMESH_API const char * asString (ColoringType ct)
 returns string representation of enum values
 
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)
 adds to the region all vertices within given number of hops (stars) from the initial region boundary
 
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 >
MR_BIND_IGNORE auto unexpected (E &&e)
 
MR_BIND_IGNORE std::string stringOperationCanceled ()
 common message about user termination of an operation
 
MR_BIND_IGNORE auto unexpectedOperationCanceled ()
 returns Expected error with stringOperationCanceled()
 
MR_BIND_IGNORE std::string stringUnsupportedFileExtension ()
 common message about unknown file extension
 
MR_BIND_IGNORE auto unexpectedUnsupportedFileExtension ()
 returns Expected error with stringUnsupportedFileExtension()
 
MR_BIND_IGNORE std::string stringUnsupportedFileFormat ()
 common message prefix about unsupported file format
 
MR_BIND_IGNORE auto unexpectedUnsupportedFileFormat ()
 returns Expected error with stringUnsupportedFileFormat()
 
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, UseAABBTree u=UseAABBTree::Yes)
 extracts all plane sections of given mesh
 
MRMESH_API bool hasAnyPlaneSection (const MeshPart &mp, const Plane3f &plane, UseAABBTree u=UseAABBTree::Yes)
 quickly returns true if extractPlaneSections produce not-empty set for the same arguments
 
MRMESH_API PlaneSections extractXYPlaneSections (const MeshPart &mp, float zLevel, UseAABBTree u=UseAABBTree::Yes)
 extracts all sections of given mesh with the plane z=zLevel
 
MRMESH_API bool hasAnyXYPlaneSection (const MeshPart &mp, float zLevel, UseAABBTree u=UseAABBTree::Yes)
 quickly returns true if extractXYPlaneSections produce not-empty set for the same arguments
 
MRMESH_API std::vector< LineSegm3f > findTriangleSectionsByXYPlane (const MeshPart &mp, float zLevel, std::vector< FaceId > *faces=nullptr, UseAABBTree u=UseAABBTree::Yes)
 
MRMESH_API PlaneSection trackSection (const MeshPart &mp, const MeshTriPoint &start, MeshTriPoint &end, const Vector3f &direction, float distance)
 
MRMESH_API Expected< PlaneSection > trackSection (const MeshPart &mp, const MeshTriPoint &start, const MeshTriPoint &end, const Vector3f &planePoint, bool ccw)
 
MRMESH_API bool isConsistentlyOriented (const MeshTopology &topology, const IsoLine &isoline)
 
MRMESH_API FaceBitSet getCrossedFaces (const MeshTopology &topology, const IsoLine &isoline)
 for a consistently oriented isoline, returns all faces it goes inside
 
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< FaceScalars > calcFaceDistances (const MeshTopology &topology, const EdgeMetric &metric, const FaceBitSet &starts, const FaceDistancesSettings &settings={})
 
template<typename F >
bool forEachObjectKind (F &&func)
 Calls func, which is ( auto kind ) -> bool, for each known object kind. If it returns true, stops immediately and also returns true.
 
template<typename ... P>
std::shared_ptr< VisualObjectmakeObjectFromEnum (FeaturesObjectKind kind, P &&... params)
 Allocates an object of type kind, passing params... to its constructor.
 
template<typename ... P>
std::shared_ptr< VisualObjectmakeObjectFromClassName (std::string className, P &&... params)
 Allocates an object of type kind, passing params... to its constructor.
 
MRMESH_API std::optional< Vector3f > getFeatureNormal (FeatureObject *feature)
 Using forEachObjectKind the template collects a list of features for which the method ...->getNormal() is available.
 
MRMESH_API std::optional< Vector3f > getFeatureDirection (FeatureObject *feature)
 Using forEachObjectKind the template collects a list of features for which the method ...->getDirection() is available.
 
MRMESH_API std::unordered_set< std::string > getFeaturesTypeWithNormals ()
 Try to getNormal from specific feature using forEachObjectKind template. Returns nullopt is ...->getNormal() is not available for given feature type.
 
MRMESH_API std::unordered_set< std::string > getFeaturesTypeWithDirections ()
 Try to getDirection from specific feature using forEachObjectKind template. Returns nullopt is ...->getDirection() is not available for given feature type.
 
MRMESH_API Expected< AffineXf3f > refineFeatureObject (const FeatureObject &featObj, const Mesh &mesh, const RefineParameters &params={})
 Recalculate the feature object's position so it would better fit with the given mesh.
 
MRMESH_API Expected< AffineXf3f > refineFeatureObject (const FeatureObject &featObj, const PointCloud &pointCloud, const RefineParameters &params={})
 Recalculate the feature object's position so it would better fit with the given point cloud.
 
MR_BIND_IGNORE 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)
 fill region located to the left from given edges
 
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, const ProgressCallback &progress={})
 Fills region located to the left from given contour, by minimizing the sum of metric over the boundary If the computations are terminated by progress, then returns the best approximation found by the moment of termination.
 
MRMESH_API FaceBitSet fillContourLeftByGraphCut (const MeshTopology &topology, const std::vector< EdgePath > &contours, const EdgeMetric &metric, const ProgressCallback &progress={})
 Fills region located to the left from given contours, by minimizing the sum of metric over the boundary If the computations are terminated by progress, then returns the best approximation found by the moment of termination.
 
MRMESH_API FaceBitSet segmentByGraphCut (const MeshTopology &topology, const FaceBitSet &source, const FaceBitSet &sink, const EdgeMetric &metric, const ProgressCallback &progress={})
 Finds segment that divide mesh on source and sink (source included, sink excluded), by minimizing the sum of metric over the boundary If the computations are terminated by progress, then returns the best approximation found by the moment of termination.
 
MRMESH_API Expected< void > 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 Expected< void > fillPlanarHole (ObjectMeshData &data, std::vector< EdgeLoop > &holeContours)
 
MRMESH_API FaceBitSet fillHoleNicely (Mesh &mesh, EdgeId holeEdge, const FillHoleNicelySettings &settings)
 
MRMESH_API void filterCreaseEdges (const Mesh &mesh, UndirectedEdgeBitSet &creaseEdges, float critLength, bool filterComponents=true, bool filterBranches=false)
 
MRMESH_API std::vector< Vector3f > makeFreeFormOriginGrid (const Box3f &box, const Vector3i &resolution)
 Returns positions of grid points in given box with given resolution.
 
MRMESH_API std::vector< Vector3f > findBestFreeformDeformation (const Box3f &box, const std::vector< Vector3f > &source, const std::vector< Vector3f > &target, const Vector3i &resolution=Vector3i::diagonal(2), const AffineXf3f *samplesToBox=nullptr)
 
template<typename R , typename... Args>
constexpr void swap (FunctionRef< R(Args...)> &lhs, FunctionRef< R(Args...)> &rhs) noexcept
 
MRMESH_API std::optional< VertBitSet > verticesGridSampling (const MeshPart &mp, float voxelSize, const ProgressCallback &cb={})
 
MRMESH_API std::optional< VertBitSet > pointGridSampling (const PointCloudPart &pcp, float voxelSize, const ProgressCallback &cb={})
 
MRMESH_API std::optional< MultiObjsSamplesmultiModelGridSampling (const Vector< ModelPointsData, ObjId > &models, 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 , typename U >
size_t heapBytes (const Vector< T, U > &vec)
 
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
 
template<typename T >
 MR_REQUIRES_IF_SUPPORTED (std::is_function_v< T >) inline size_t heapBytes(const std
 
template<typename ... Ts>
size_t heapBytes (const phmap::flat_hash_map< Ts... > &hashMap)
 returns the amount of memory given HashMap occupies 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.
 
size_t getNumSamples (const IPointPairs &pairs)
 returns the number of samples able to form pairs
 
MRMESH_API size_t getNumActivePairs (const IPointPairs &pairs)
 computes the number of active pairs
 
MRMESH_API NumSum getSumSqDistToPoint (const IPointPairs &pairs, std::optional< double > inaccuracy={})
 
MRMESH_API NumSum getSumSqDistToPlane (const IPointPairs &pairs, std::optional< double > inaccuracy={})
 
float getMeanSqDistToPoint (const IPointPairs &pairs)
 computes root-mean-square deviation between points
 
float getMeanSqDistToPlane (const IPointPairs &pairs)
 computes root-mean-square deviation from points to target planes
 
MRMESH_API std::string getICPStatusInfo (int iterations, ICPExitType exitType)
 returns status info string
 
MRMESH_API AffineXf3d getAligningXf (const PointToPlaneAligningTransform &p2pl, ICPMode mode, float angleLimit, float scaleLimit, const Vector3f &fixedRotationAxis)
 given prepared (p2pl) object, finds the best transformation from it of given type with given limitations on rotation angle and global scale
 
MRMESH_API size_t deactivateFarPairs (IPointPairs &pairs, float maxDistSq)
 reset active bit if pair distance is further than maxDistSq
 
MRMESH_API void updatePointPairs (PointPairs &pairs, const MeshOrPointsXf &src, const MeshOrPointsXf &tgt, float cosThreshold, float distThresholdSq, bool mutualClosest)
 in each pair updates the target data and performs basic filtering (activation)
 
template<typename T >
constexpr Id< T > operator+ (Id< T > id, int a)
 
template<typename T >
constexpr Id< T > operator+ (Id< T > id, unsigned int a)
 
template<typename T >
constexpr Id< T > operator+ (Id< T > id, size_t a)
 
template<typename T >
constexpr Id< T > operator- (Id< T > id, int a)
 
template<typename T >
constexpr Id< T > operator- (Id< T > id, unsigned int a)
 
template<typename T >
constexpr Id< T > operator- (Id< T > id, size_t 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
 
constexpr VoxelId operator""_vox (unsigned long long i) noexcept
 
MRMESH_API bool improveSampling (const PointCloud &cloud, VertBitSet &samples, const ImproveSamplingSettings &settings)
 
MRMESH_API ShellVertexInfo classifyShellVert (const MeshPart &mp, const Vector3f &shellPoint, const FindInnerShellSettings &settings={})
 
MRMESH_API VertBitSet findInnerShellVerts (const MeshPart &mp, const Mesh &shell, const FindInnerShellSettings &settings={})
 
MRMESH_API FaceBitSet findInnerShellFacesWithSplits (const MeshPart &mp, Mesh &shell, const FindInnerShellSettings &settings={})
 
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< Vector2f > intersection (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 ContinuousContours orderSelfIntersectionContours (const MeshTopology &topology, const std::vector< EdgeTri > &intersections)
 
MRMESH_API MR_BIND_IGNORE Contours3f extractIntersectionContours (const Mesh &meshA, const Mesh &meshB, const ContinuousContours &orientedContours, const CoordinateConverters &converters, const AffineXf3f *rigidB2A=nullptr)
 extracts coordinates from two meshes intersection contours
 
MRMESH_API bool isClosed (const ContinuousContour &contour)
 returns true if contour is closed
 
MRMESH_API std::vector< int > detectLoneContours (const ContinuousContours &contours, bool ignoreOpen=false)
 
MRMESH_API void removeLoneDegeneratedContours (const MeshTopology &edgesTopology, OneMeshContours &faceContours, OneMeshContours &edgeContours)
 
MRMESH_API void removeLoneContours (ContinuousContours &contours, bool ignoreOpen=false)
 
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
 
MRMESH_API IOFilters operator| (const IOFilters &a, const IOFilters &b)
 returns union of input filters
 
MRMESH_API std::optional< IOFilterfindFilter (const IOFilters &filters, const std::string &extension)
 find a corresponding filter for a given extension
 
MRMESH_API std::vector< size_t > splitByLines (const char *data, size_t size)
 returns offsets for each new line in monolith char block
 
MRMESH_API MR_BIND_IGNORE std::streamoff getStreamSize (std::istream &in)
 
MRMESH_API MR_BIND_IGNORE Expected< std::string > readString (std::istream &in)
 
MRMESH_API MR_BIND_IGNORE Expected< Buffer< char > > readCharBuffer (std::istream &in)
 reads input stream to monolith char block
 
template<typename T >
Expected< void > parseTextCoordinate (const std::string_view &str, Vector3< T > &v, Vector3< T > *n=nullptr, Color *c=nullptr)
 read coordinates to v separated by space
 
template<typename T >
Expected< void > parseObjCoordinate (const std::string_view &str, Vector3< T > &v, Vector3< T > *c=nullptr)
 
template<typename T >
Expected< void > parsePtsCoordinate (const std::string_view &str, Vector3< T > &v, Color &c)
 
MRMESH_API Expected< void > parseFirstNum (const std::string_view &str, int &num)
 reads the first integer number in the line
 
MRMESH_API Expected< void > parsePolygon (const std::string_view &str, VertId *vertId, int *numPoints)
 
template<typename T >
Expected< void > parseAscCoordinate (const std::string_view &str, Vector3< T > &v, Vector3< T > *n=nullptr, Color *c=nullptr)
 
template<typename T >
Expected< void > parseSingleNumber (const std::string_view &str, T &num)
 
MRMESH_API bool hasBom (const std::string_view &str)
 checks if the given string starts with the UTF-8 byte-order mark
 
MR_BIND_IGNORE MRMESH_API std::unique_ptr< IRenderObjectcreateRenderObject (const VisualObject &visObj, const std::type_index &type)
 
template<typename ObjectType >
MR_BIND_IGNORE std::unique_ptr< IRenderObjectcreateRenderObject (const VisualObject &visObj)
 
template<typename RenderObjType >
MR_BIND_IGNORE IRenderObjectConstructorLambda makeRenderObjectConstructor ()
 
bool isNanFast (float f)
 quickly tests whether given float is not-a-number
 
MRMESH_API std::optional< VertBitSet > pointIterativeSampling (const PointCloud &cloud, int numSamples, const ProgressCallback &cb={})
 
MRMESH_API std::shared_ptr< ObjectmakeLevelOfDetails (Mesh &&mesh, int maxDepth)
 
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 Mesh makePlane ()
 Makes square plane 1x1 size with center at (0,0,0) and (0,0,1) normal.
 
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
 
UndirectedEdgeId mapEdge (const WholeEdgeMap &map, UndirectedEdgeId 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 WholeEdgeHashMap &map, UndirectedEdgeId src)
 given input edge (src), converts its id using given map
 
EdgeId mapEdge (const WholeEdgeMapOrHashMap &m, EdgeId src)
 given input edge (src), converts its id using given map
 
UndirectedEdgeId mapEdge (const WholeEdgeMapOrHashMap &m, UndirectedEdgeId 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 K , typename V >
getAt (const MapOrHashMap< K, V > &m, K key, V def={})
 
template<typename K , typename V >
void setAt (MapOrHashMap< K, V > &m, K key, V val)
 
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)
 
bool isClosed (const Contour3f &c)
 
MarkedContour3f markedContour (Contour3f in)
 
MarkedContour3f markedFirstLast (Contour3f in)
 
MRMESH_API MarkedContour3f resample (const MarkedContour3f &in, float minStep, Contour3f *normals=nullptr)
 
MRMESH_API MarkedContour3f makeSpline (MarkedContour3f in, float markStability=1, const Contour3f *normals=nullptr)
 
MRMESH_API MarkedContour3f makeSpline (MarkedContour3f in, const Contour3f &normals, float markStability=1)
 
MRMESH_API MarkedContour3f makeSpline (const Contour3f &controlPoints, const SplineSettings &settings)
 
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< MeshselfBoolean (const Mesh &mesh)
 
MRMESH_API Contours3f findIntersectionContours (const Mesh &meshA, const Mesh &meshB, const AffineXf3f *rigidB2A=nullptr)
 returns intersection contours of given meshes
 
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 void convertIntFloatAllVerts (Mesh &mesh, const CoordinateConverters &conv)
 
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, FaceBitSet > findCollidingTriangleBitsets (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< bool > findSelfCollidingTriangles (const MeshPart &mp, std::vector< FaceFace > *outCollidingPairs, ProgressCallback cb={}, const Face2RegionMap *regionMap=nullptr, bool touchIsIntersection=false)
 finds all pairs (or the fact of any self-collision) of colliding triangles from one mesh or a region
 
MRMESH_API Expected< std::vector< FaceFace > > findSelfCollidingTriangles (const MeshPart &mp, ProgressCallback cb={}, const Face2RegionMap *regionMap=nullptr, bool touchIsIntersection=false)
 finds all pairs of colliding triangles from one mesh or a region
 
MRMESH_API Expected< FaceBitSet > findSelfCollidingTrianglesBS (const MeshPart &mp, ProgressCallback cb={}, const Face2RegionMap *regionMap=nullptr, bool touchIsIntersection=false)
 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
 
MRMESH_API bool isNonIntersectingInside (const Mesh &a, FaceId partFace, const MeshPart &b, const AffineXf3f *rigidB2A=nullptr)
 checks that arbitrary mesh A part (whole part is represented by one face partFace) 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< EdgeTrifindSelfCollidingEdgeTrisPrecise (const MeshPart &mp, ConvertToIntVector conv, bool anyIntersection=false, const AffineXf3f *rigidB2A=nullptr, int aVertSizes=0)
 finds all pairs of colliding edges and triangle within one 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 CoordinateConverters getVectorConverters (const MeshPart &a)
 creates simple converters from Vector3f to Vector3i and back in mesh part area 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={})
 Performs mesh simplification in mesh region according to the settings.
 
MRMESH_API DecimateResult decimateObjectMeshData (ObjectMeshData &data, const DecimateSettings &settings)
 
MRMESH_API std::optional< ObjectMeshDatamakeDecimatedObjectMeshData (const ObjectMesh &obj, const DecimateSettings &settings, DecimateResult *outRes=nullptr)
 returns the data of decimated mesh given ObjectMesh (which remains unchanged) and decimation parameters
 
MRMESH_API QuadraticForm3f computeFormAtVertex (const MeshPart &mp, VertId v, float stabilizer, bool angleWeigted, const UndirectedEdgeBitSet *creases=nullptr)
 Computes quadratic form at given vertex of the initial surface before decimation.
 
MRMESH_API Vector< QuadraticForm3f, VertId > computeFormsAtVertices (const MeshPart &mp, float stabilizer, bool angleWeigted, const UndirectedEdgeBitSet *creases=nullptr)
 Computes quadratic forms at every vertex of mesh part before decimation.
 
MRMESH_API FaceBitSet getSubdividePart (const FaceBitSet &valids, size_t subdivideParts, size_t myPart)
 returns given subdivision part of all valid faces; parallel threads shall be able to safely modify these bits because they do not share any block with other parts
 
MRMESH_API bool resolveMeshDegenerations (Mesh &mesh, const ResolveMeshDegenSettings &settings={})
 Removes degenerate triangles in a mesh by calling decimateMesh function with appropriate settings.
 
MRMESH_API bool remesh (Mesh &mesh, const RemeshSettings &settings)
 Splits too long and eliminates too short edges from the mesh.
 
template<typename T >
auto preCollapseVertAttribute (const Mesh &mesh, Vector< T, VertId > &data)
 
MRMESH_API PreCollapseCallback meshPreCollapseVertAttribute (const Mesh &mesh, const MeshAttributesToUpdate &params)
 
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 FlipEdge canFlipEdge (const MeshTopology &topology, EdgeId edge, const FaceBitSet *region=nullptr, const UndirectedEdgeBitSet *notFlippable=nullptr, const VertBitSet *vertRegion=nullptr)
 consider topology and constraints to decide about flip possibility
 
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 checkDeloneQuadrangleInMesh (const MeshTopology &topology, const VertCoords &points, 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 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 void makeDeloneOriginRing (MeshTopology &topology, const VertCoords &points, EdgeId e, const DeloneSettings &settings={})
 
MRMESH_API int makeDeloneEdgeFlips (Mesh &mesh, const DeloneSettings &settings={}, int numIters=1, const ProgressCallback &progressCallback={})
 
MRMESH_API int makeDeloneEdgeFlips (MeshTopology &topology, const VertCoords &points, const DeloneSettings &settings={}, int numIters=1, const ProgressCallback &progressCallback={})
 
MRMESH_API int makeDeloneEdgeFlips (EdgeLengthMesh &mesh, const IntrinsicDeloneSettings &settings={}, int numIters=1, const ProgressCallback &progressCallback={})
 
MRMESH_API void processCloseTriangles (const MeshPart &mp, const Triangle3f &t, float rangeSq, const TriangleCallback &call)
 
MRMESH_API std::optional< float > signedDistanceToMesh (const MeshPart &mp, const Vector3f &p, const SignedDistanceToMeshOptions &op)
 
MRMESH_API FaceBitSet findOuterLayer (const Mesh &mesh)
 
MR_BIND_IGNORE MRMESH_API MeshTopology topologyFromEigen (const Eigen::MatrixXi &F)
 constructs mesh topology from N*3 matrix of vertex indices
 
MR_BIND_IGNORE 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
 
MR_BIND_IGNORE MRMESH_API void pointsFromEigen (const Eigen::MatrixXd &V, const VertBitSet &selection, VertCoords &points)
 replace selected points with the values from V
 
MR_BIND_IGNORE MRMESH_API void topologyToEigen (const MeshTopology &topology, Eigen::MatrixXi &F)
 converts valid faces from mesh topology into N*3 matrix of vertex indices
 
MR_BIND_IGNORE 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 void fillHoles (Mesh &mesh, const std::vector< EdgeId > &as, const FillHoleParams &params={})
 fill all holes given by their representative edges in
 
MRMESH_API bool isHoleBd (const MeshTopology &topology, const EdgeLoop &loop)
 
MRMESH_API HoleFillPlan getHoleFillPlan (const Mesh &mesh, EdgeId e, const FillHoleParams &params={})
 
MRMESH_API std::vector< HoleFillPlangetHoleFillPlans (const Mesh &mesh, const std::vector< EdgeId > &holeRepresentativeEdges, const FillHoleParams &params={})
 
MRMESH_API HoleFillPlan getPlanarHoleFillPlan (const Mesh &mesh, EdgeId e)
 
MRMESH_API std::vector< HoleFillPlangetPlanarHoleFillPlans (const Mesh &mesh, const std::vector< EdgeId > &holeRepresentativeEdges)
 
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 std::vector< EdgeId > extendAllHoles (Mesh &mesh, 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 MakeBridgeResult makeQuadBridge (MeshTopology &topology, EdgeId a, EdgeId b, FaceBitSet *outNewFaces=nullptr)
 
MRMESH_API MakeBridgeResult makeBridge (MeshTopology &topology, EdgeId a, EdgeId b, FaceBitSet *outNewFaces=nullptr)
 
MRMESH_API MakeBridgeResult makeSmoothBridge (Mesh &mesh, EdgeId a, EdgeId b, float samplingStep, FaceBitSet *outNewFaces=nullptr)
 
MRMESH_API EdgeId makeBridgeEdge (MeshTopology &topology, EdgeId a, EdgeId b)
 
MRMESH_API void splitQuad (MeshTopology &topology, EdgeId a, FaceBitSet *outNewFaces=nullptr)
 given quadrangle face to the left of a, splits it in two triangles with new diagonal edge via dest(a)
 
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 > > 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 > findDegenerateFaces (const MeshPart &mp, float criticalAspectRatio=FLT_MAX, ProgressCallback cb={})
 finds faces having aspect ratio >= criticalAspectRatio
 
MRMESH_API Expected< FaceBitSet > findNotSmoothFaces (const MeshPart &mp, float minAngle=0.3f, ProgressCallback cb={})
 
MRMESH_API Expected< UndirectedEdgeBitSet > findShortEdges (const MeshPart &mp, float criticalLength, ProgressCallback cb={})
 finds edges having length <= criticalLength
 
MRMESH_API Expected< void > fixMeshDegeneracies (Mesh &mesh, const FixMeshDegeneraciesParams &params)
 Fixes degenerate faces and short edges in mesh (changes topology)
 
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)
 
MRMESH_API void fixMeshCreases (Mesh &mesh, const FixCreasesParams &params={})
 Finds creases edges and re-triangulates planar areas around them, useful to fix double faces.
 
MRMESH_API Expected< FaceBitSet > findDisorientedFaces (const Mesh &mesh, const FindDisorientationParams &params={})
 returns all faces that are oriented inconsistently, based on number of ray intersections
 
MRMESH_API MeshIntersectionResult rayMeshIntersect (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 MeshIntersectionResult rayMeshIntersect (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 void multiRayMeshIntersect (const MeshPart &meshPart, const std::vector< Vector3f > &origins, const std::vector< Vector3f > &dirs, const MultiRayMeshIntersectResult &result, float rayStart=0.0f, float rayEnd=FLT_MAX, bool closestIntersect=true, const FacePredicate &validFaces={})
 
MRMESH_API MultiMeshIntersectionResult rayMultiMeshAnyIntersect (const std::vector< Line3fMesh > &lineMeshes, float rayStart=0.0f, float rayEnd=FLT_MAX)
 
MRMESH_API MultiMeshIntersectionResult rayMultiMeshAnyIntersect (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 planeMeshIntersect (const MeshPart &meshPart, const Plane3f &plane, FaceBitSet *fs, UndirectedEdgeBitSet *ues, VertBitSet *vs, std::vector< FaceId > *fsVec=nullptr)
 
MRMESH_API void xyPlaneMeshIntersect (const MeshPart &meshPart, float zLevel, FaceBitSet *fs, UndirectedEdgeBitSet *ues, VertBitSet *vs, std::vector< FaceId > *fsVec=nullptr)
 
MRMESH_API Expected< MeshloadMrmesh (const std::filesystem::path &file, const MeshLoadSettings &settings={})
 new simpler names
 
MRMESH_API Expected< MeshloadMrmesh (std::istream &in, const MeshLoadSettings &settings={})
 
MRMESH_API Expected< MeshloadOff (const std::filesystem::path &file, const MeshLoadSettings &settings={})
 loads mesh from file in .OFF format
 
MRMESH_API Expected< MeshloadOff (std::istream &in, const MeshLoadSettings &settings={})
 loads mesh from stream in .OFF format
 
MRMESH_API Expected< MeshloadObj (const std::filesystem::path &file, const MeshLoadSettings &settings={})
 loads mesh from file in .OBJ format
 
MRMESH_API Expected< MeshloadObj (std::istream &in, const MeshLoadSettings &settings={})
 
MRMESH_API Expected< MeshloadStl (const std::filesystem::path &file, const MeshLoadSettings &settings={})
 loads mesh from file in any .STL format: both binary and ASCII
 
MRMESH_API Expected< MeshloadStl (std::istream &in, const MeshLoadSettings &settings={})
 
MRMESH_API Expected< MeshloadBinaryStl (const std::filesystem::path &file, const MeshLoadSettings &settings={})
 loads mesh from file in binary .STL format
 
MRMESH_API Expected< MeshloadBinaryStl (std::istream &in, const MeshLoadSettings &settings={})
 
MRMESH_API Expected< MeshloadASCIIStl (const std::filesystem::path &file, const MeshLoadSettings &settings={})
 loads mesh from file in textual .STL format
 
MRMESH_API Expected< MeshloadASCIIStl (std::istream &in, const MeshLoadSettings &settings={})
 loads mesh from stream in textual .STL format
 
MRMESH_API Expected< MeshloadPly (const std::filesystem::path &file, const MeshLoadSettings &settings={})
 loads mesh from file in .PLY format;
 
MRMESH_API Expected< MeshloadPly (std::istream &in, const MeshLoadSettings &settings={})
 
MRMESH_API Expected< MeshloadDxf (const std::filesystem::path &path, const MeshLoadSettings &settings={})
 loads mesh from file in .DXF format;
 
MRMESH_API Expected< MeshloadDxf (std::istream &in, const MeshLoadSettings &settings={})
 loads mesh from stream in .DXF format;
 
MRMESH_API Expected< MeshloadMesh (const std::filesystem::path &file, const MeshLoadSettings &settings={})
 loads mesh from file in the format detected from file extension
 
MRMESH_API Expected< MeshloadMesh (std::istream &in, const std::string &extension, const MeshLoadSettings &settings={})
 
Vector3f orgPnt (const MeshTopology &topology, const VertCoords &points, EdgeId e)
 returns coordinates of the edge origin
 
Vector3f destPnt (const MeshTopology &topology, const VertCoords &points, EdgeId e)
 returns coordinates of the edge destination
 
Vector3f edgeVector (const MeshTopology &topology, const VertCoords &points, EdgeId e)
 returns vector equal to edge destination point minus edge origin point
 
MRMESH_API LineSegm3f edgeSegment (const MeshTopology &topology, const VertCoords &points, EdgeId e)
 returns line segment of given edge
 
Vector3f edgePoint (const MeshTopology &topology, const VertCoords &points, EdgeId e, float f)
 returns a point on the edge: origin point for f=0 and destination point for f=1
 
Vector3f edgePoint (const MeshTopology &topology, const VertCoords &points, const MeshEdgePoint &ep)
 computes coordinates of point given as edge and relative position on it
 
Vector3f edgeCenter (const MeshTopology &topology, const VertCoords &points, UndirectedEdgeId e)
 computes the center of given edge
 
MRMESH_API void getLeftTriPoints (const MeshTopology &topology, const VertCoords &points, EdgeId e, Vector3f &v0, Vector3f &v1, Vector3f &v2)
 returns three points of left face of e: v0 = orgPnt( e ), v1 = destPnt( e )
 
MR_BIND_IGNORE void getLeftTriPoints (const MeshTopology &topology, const VertCoords &points, EdgeId e, Vector3f(&v)[3])
 
Triangle3f getLeftTriPoints (const MeshTopology &topology, const VertCoords &points, EdgeId e)
 returns three points of left face of e: res[0] = orgPnt( e ), res[1] = destPnt( e )
 
void getTriPoints (const MeshTopology &topology, const VertCoords &points, FaceId f, Vector3f &v0, Vector3f &v1, Vector3f &v2)
 returns three points of given face
 
MR_BIND_IGNORE void getTriPoints (const MeshTopology &topology, const VertCoords &points, FaceId f, Vector3f(&v)[3])
 
Triangle3f getTriPoints (const MeshTopology &topology, const VertCoords &points, FaceId f)
 returns three points of given face
 
MRMESH_API Vector3f triPoint (const MeshTopology &topology, const VertCoords &points, const MeshTriPoint &p)
 computes coordinates of point given as face and barycentric representation
 
MRMESH_API Vector3f triCenter (const MeshTopology &topology, const VertCoords &points, FaceId f)
 returns the centroid of given triangle
 
MRMESH_API float triangleAspectRatio (const MeshTopology &topology, const VertCoords &points, FaceId f)
 returns aspect ratio of given mesh triangle equal to the ratio of the circum-radius to twice its in-radius
 
MRMESH_API float circumcircleDiameterSq (const MeshTopology &topology, const VertCoords &points, FaceId f)
 returns squared circumcircle diameter of given mesh triangle
 
MRMESH_API float circumcircleDiameter (const MeshTopology &topology, const VertCoords &points, FaceId f)
 returns circumcircle diameter of given mesh triangle
 
MRMESH_API MeshTriPoint toTriPoint (const MeshTopology &topology, const VertCoords &points, FaceId f, const Vector3f &p)
 converts face id and 3d point into barycentric representation
 
MRMESH_API MeshTriPoint toTriPoint (const MeshTopology &topology, const VertCoords &points, const PointOnFace &p)
 converts face id and 3d point into barycentric representation
 
MRMESH_API MeshEdgePoint toEdgePoint (const MeshTopology &topology, const VertCoords &points, EdgeId e, const Vector3f &p)
 converts edge and 3d point into edge-point representation
 
MRMESH_API VertId getClosestVertex (const MeshTopology &topology, const VertCoords &points, const PointOnFace &p)
 returns one of three face vertices, closest to given point
 
VertId getClosestVertex (const MeshTopology &topology, const VertCoords &points, const MeshTriPoint &p)
 returns one of three face vertices, closest to given point
 
MRMESH_API UndirectedEdgeId getClosestEdge (const MeshTopology &topology, const VertCoords &points, const PointOnFace &p)
 returns one of three face edges, closest to given point
 
UndirectedEdgeId getClosestEdge (const MeshTopology &topology, const VertCoords &points, const MeshTriPoint &p)
 returns one of three face edges, closest to given point
 
float edgeLength (const MeshTopology &topology, const VertCoords &points, UndirectedEdgeId e)
 returns Euclidean length of the edge
 
MRMESH_API UndirectedEdgeScalars edgeLengths (const MeshTopology &topology, const VertCoords &points)
 computes and returns the lengths of all edges in the mesh
 
float edgeLengthSq (const MeshTopology &topology, const VertCoords &points, UndirectedEdgeId e)
 returns squared Euclidean length of the edge (faster to compute than length)
 
MRMESH_API Vector3f leftDirDblArea (const MeshTopology &topology, const VertCoords &points, EdgeId e)
 computes directed double area of left triangular face of given edge
 
Vector3f dirDblArea (const MeshTopology &topology, const VertCoords &points, FaceId f)
 computes directed double area for a triangular face from its vertices
 
MRMESH_API Vector< Vector3f, VertId > dirDblAreas (const MeshTopology &topology, const VertCoords &points, const VertBitSet *region=nullptr)
 computes and returns the directed double area for every (region) vertex in the mesh
 
float dblArea (const MeshTopology &topology, const VertCoords &points, FaceId f)
 returns twice the area of given face
 
float area (const MeshTopology &topology, const VertCoords &points, FaceId f)
 returns the area of given face
 
MRMESH_API MR_BIND_IGNORE double area (const MeshTopology &topology, const VertCoords &points, const FaceBitSet &fs)
 
double area (const MeshTopology &topology, const VertCoords &points, const FaceBitSet *fs=nullptr)
 computes the area of given face-region (or whole mesh)
 
MRMESH_API MR_BIND_IGNORE Vector3d dirArea (const MeshTopology &topology, const VertCoords &points, const FaceBitSet &fs)
 
Vector3d dirArea (const MeshTopology &topology, const VertCoords &points, const FaceBitSet *fs=nullptr)
 computes the sum of directed areas for faces from given region (or whole mesh)
 
MRMESH_API MR_BIND_IGNORE double projArea (const MeshTopology &topology, const VertCoords &points, const Vector3f &dir, const FaceBitSet &fs)
 
double projArea (const MeshTopology &topology, const VertCoords &points, const Vector3f &dir, const FaceBitSet *fs=nullptr)
 computes the sum of absolute projected area of faces from given region (or whole mesh) as visible if look from given direction
 
MRMESH_API double volume (const MeshTopology &topology, const VertCoords &points, const FaceBitSet *region=nullptr)
 
MRMESH_API double holePerimeter (const MeshTopology &topology, const VertCoords &points, EdgeId e)
 computes the perimeter of the hole specified by one of its edges with no valid left face (left is hole)
 
MRMESH_API Vector3d holeDirArea (const MeshTopology &topology, const VertCoords &points, EdgeId e)
 
MRMESH_API Vector3f leftTangent (const MeshTopology &topology, const VertCoords &points, EdgeId e)
 computes unit vector that is both orthogonal to given edge and to the normal of its left triangle, the vector is directed inside left triangle
 
Vector3f leftNormal (const MeshTopology &topology, const VertCoords &points, EdgeId e)
 computes triangular face normal from its vertices
 
Vector3f normal (const MeshTopology &topology, const VertCoords &points, FaceId f)
 computes triangular face normal from its vertices
 
MRMESH_API Plane3f getPlane3f (const MeshTopology &topology, const VertCoords &points, FaceId f)
 returns the plane containing given triangular face with normal looking outwards
 
MRMESH_API Plane3d getPlane3d (const MeshTopology &topology, const VertCoords &points, FaceId f)
 
MRMESH_API Vector3f dirDblArea (const MeshTopology &topology, const VertCoords &points, VertId v)
 computes sum of directed double areas of all triangles around given vertex
 
float dblArea (const MeshTopology &topology, const VertCoords &points, VertId v)
 computes the length of summed directed double areas of all triangles around given vertex
 
Vector3f normal (const MeshTopology &topology, const VertCoords &points, VertId v)
 computes normal in a vertex using sum of directed areas of neighboring triangles
 
MRMESH_API Vector3f normal (const MeshTopology &topology, const VertCoords &points, const MeshTriPoint &p)
 
MRMESH_API Vector3f pseudonormal (const MeshTopology &topology, const VertCoords &points, VertId v, const FaceBitSet *region=nullptr)
 
MRMESH_API Vector3f pseudonormal (const MeshTopology &topology, const VertCoords &points, UndirectedEdgeId e, const FaceBitSet *region=nullptr)
 computes normalized half sum of face normals sharing given edge (only (region) faces will be considered);
 
MRMESH_API Vector3f pseudonormal (const MeshTopology &topology, const VertCoords &points, const MeshTriPoint &p, const FaceBitSet *region=nullptr)
 
MRMESH_API float sumAngles (const MeshTopology &topology, const VertCoords &points, VertId v, bool *outBoundaryVert=nullptr)
 computes the sum of triangle angles at given vertex; optionally returns whether the vertex is on boundary
 
MRMESH_API Expected< VertBitSet > findSpikeVertices (const MeshTopology &topology, const VertCoords &points, float minSumAngle, const VertBitSet *region=nullptr, const ProgressCallback &cb={})
 returns vertices where the sum of triangle angles is below given threshold
 
MRMESH_API float dihedralAngleSin (const MeshTopology &topology, const VertCoords &points, UndirectedEdgeId e)
 
MRMESH_API float dihedralAngleCos (const MeshTopology &topology, const VertCoords &points, UndirectedEdgeId e)
 
MRMESH_API float dihedralAngle (const MeshTopology &topology, const VertCoords &points, UndirectedEdgeId e)
 
MRMESH_API float discreteMeanCurvature (const MeshTopology &topology, const VertCoords &points, VertId v)
 
MRMESH_API float discreteMeanCurvature (const MeshTopology &topology, const VertCoords &points, UndirectedEdgeId e)
 
float discreteGaussianCurvature (const MeshTopology &topology, const VertCoords &points, VertId v, bool *outBoundaryVert=nullptr)
 
MRMESH_API UndirectedEdgeBitSet findCreaseEdges (const MeshTopology &topology, const VertCoords &points, float angleFromPlanar)
 finds all mesh edges where dihedral angle is distinct from planar PI angle on at least given value
 
MRMESH_API float leftCotan (const MeshTopology &topology, const VertCoords &points, EdgeId e)
 
float cotan (const MeshTopology &topology, const VertCoords &points, UndirectedEdgeId ue)
 
MRMESH_API QuadraticForm3f quadraticForm (const MeshTopology &topology, const VertCoords &points, VertId v, bool angleWeigted, const FaceBitSet *region=nullptr, const UndirectedEdgeBitSet *creases=nullptr)
 
MRMESH_API Box3f computeBoundingBox (const MeshTopology &topology, const VertCoords &points, const FaceBitSet *region, const AffineXf3f *toWorld=nullptr)
 
MRMESH_API float averageEdgeLength (const MeshTopology &topology, const VertCoords &points)
 computes average length of an edge in the mesh given by (topology, points)
 
MRMESH_API Vector3f findCenterFromPoints (const MeshTopology &topology, const VertCoords &points)
 computes average position of all valid mesh vertices
 
MRMESH_API Vector3f findCenterFromFaces (const MeshTopology &topology, const VertCoords &points)
 computes center of mass considering that density of all triangles is the same
 
MRMESH_API Vector3f findCenterFromBBox (const MeshTopology &topology, const VertCoords &points)
 computes bounding box and returns its center
 
MRMESH_API MeshMeshDistanceResult 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 MeshMeshSignedDistanceResult 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 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 getVerticalStitchMetricEdgeBased (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, FaceId > computePerCornerNormals (const Mesh &mesh, const UndirectedEdgeBitSet *creases)
 
MRMESH_API std::optional< MeshOrPointsgetMeshOrPoints (const Object *obj)
 constructs MeshOrPoints from ObjectMesh or ObjectPoints, otherwise returns nullopt
 
MRMESH_API std::optional< MeshOrPointsXfgetMeshOrPointsXf (const Object *obj)
 
MRMESH_API void projectOnAll (const Vector3f &pt, const AABBTreeObjects &tree, float upDistLimitSq, const ProjectOnAllCallback &callback, ObjId skipObjId={})
 finds closest point on every object within given distance
 
MeshOrPoints::ProjectionResult projectWorldPointOntoObject (const Vector3f &p, const Object &obj)
 Projects a point onto an object, in world space. Returns .valid() == false if this object type isn't projectable onto.
 
MRMESH_API MeshOrPoints::ProjectionResult projectWorldPointOntoObjectsRecursive (const Vector3f &p, const Object *root=nullptr, std::function< bool(const Object &)> projectPred=nullptr, std::function< bool(const Object &)> recursePred=nullptr)
 
MRMESH_API Expected< std::vector< FaceBitSet > > findOverhangs (const Mesh &mesh, const FindOverhangsSettings &settings)
 Find face regions that might create overhangs.
 
MRMESH_API MeshProjectionTransforms createProjectionTransforms (AffineXf3f &storageXf, const AffineXf3f *pointXf, const AffineXf3f *treeXf)
 Creates structure with simplified transforms for projection functions, with rigidXfPoint applied to point, and nonRigidXfTree applied to tree.
 
MRMESH_API MeshProjectionResult findProjection (const Vector3f &pt, const MeshPart &mp, float upDistLimitSq=FLT_MAX, const AffineXf3f *xf=nullptr, float loDistLimitSq=0, const FacePredicate &validFaces={}, const std::function< bool(const MeshProjectionResult &)> &validProjections={})
 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, const FacePredicate &validFaces={}, const std::function< bool(const MeshProjectionResult &)> &validProjections={})
 computes the closest point on mesh (or its region) to given point
 
MRMESH_API void findBoxedTrisInBall (const MeshPart &mp, Ball3f ball, const FoundBoxedTriCallback &foundCallback)
 
MRMESH_API void findTrisInBall (const MeshPart &mp, const Ball3f &ball, const FoundTriCallback &foundCallback, const FacePredicate &validFaces={})
 
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={}, const ProgressCallback &cb={})
 
MRMESH_API bool relax (const MeshTopology &topology, VertCoords &points, const MeshRelaxParams &params={}, const ProgressCallback &cb={})
 
MRMESH_API Vector3f vertexPosEqualNeiAreas (const Mesh &mesh, VertId v, bool noShrinkage)
 
MRMESH_API Vector3f vertexPosEqualNeiAreas (const MeshTopology &topology, const VertCoords &points, VertId v, bool noShrinkage)
 
MRMESH_API bool equalizeTriAreas (Mesh &mesh, const MeshEqualizeTriAreasParams &params={}, const ProgressCallback &cb={})
 
MRMESH_API bool equalizeTriAreas (const MeshTopology &topology, VertCoords &points, const MeshEqualizeTriAreasParams &params={}, const ProgressCallback &cb={})
 
MRMESH_API bool relaxKeepVolume (Mesh &mesh, const MeshRelaxParams &params={}, const ProgressCallback &cb={})
 
MRMESH_API bool relaxKeepVolume (const MeshTopology &topology, VertCoords &points, const MeshRelaxParams &params={}, const ProgressCallback &cb={})
 
MRMESH_API bool relaxApprox (Mesh &mesh, const MeshApproxRelaxParams &params={}, const ProgressCallback &cb={})
 
MRMESH_API bool relaxApprox (const MeshTopology &topology, VertCoords &points, const MeshApproxRelaxParams &params={}, const 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 removeSpikes (const MeshTopology &topology, VertCoords &points, int maxIterations, float minSumAngle, const VertBitSet *region=nullptr)
 
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 hardSmoothTetrahedrons (const MeshTopology &topology, VertCoords &points, const VertBitSet *region=nullptr)
 
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 int subdivideMesh (ObjectMeshData &data, const SubdivideSettings &settings)
 
MRMESH_API Expected< MeshcopySubdividePackMesh (const MeshPart &mp, float voxelSize, const ProgressCallback &cb={})
 
MRMESH_API ObjectMeshData makeSubdividedObjectMeshData (const ObjectMesh &obj, const SubdivideSettings &settings)
 returns the data of subdivided mesh given ObjectMesh (which remains unchanged) and subdivision parameters
 
template<typename T >
auto onEdgeSplitVertAttribute (const Mesh &mesh, Vector< T, VertId > &data)
 
template<typename T >
auto onEdgeSplitFaceAttribute (const Mesh &mesh, Vector< T, FaceId > &data)
 
MRMESH_API OnEdgeSplit meshOnEdgeSplitAttribute (const Mesh &mesh, const MeshAttributesToUpdate &params)
 
MRMESH_API OnEdgeSplit meshOnEdgeSplitVertAttribute (const Mesh &mesh, const MeshAttributesToUpdate &params)
 
MRMESH_API OnEdgeSplit meshOnEdgeSplitFaceAttribute (const Mesh &mesh, const MeshAttributesToUpdate &params)
 
MRMESH_API std::optional< VertScalars > computeRayThicknessAtVertices (const Mesh &mesh, const ProgressCallback &progress={})
 returns the distance from each vertex along minus normal to the nearest mesh intersection (or FLT_MAX if no intersection found)
 
MRMESH_API MR_BIND_IGNORE VertScalars computeThicknessAtVertices (const Mesh &mesh)
 
MRMESH_API MeshIntersectionResult rayInsideIntersect (const Mesh &mesh, const MeshPoint &m, float rayEnd=FLT_MAX)
 returns the nearest intersection between the mesh and the ray from given point along minus normal (inside the mesh)
 
MRMESH_API MeshIntersectionResult rayInsideIntersect (const Mesh &mesh, VertId v, float rayEnd=FLT_MAX)
 
MRMESH_API InSphere findInSphere (const Mesh &mesh, const MeshPoint &m, const InSphereSearchSettings &settings)
 finds maximal sphere inscribed in the mesh touching point (p) with center along the normal at (p)
 
MRMESH_API InSphere findInSphere (const Mesh &mesh, VertId v, const InSphereSearchSettings &settings)
 
MRMESH_API std::optional< VertScalars > computeInSphereThicknessAtVertices (const Mesh &mesh, const InSphereSearchSettings &settings, const ProgressCallback &progress={})
 returns the thickness at each vertex as the diameter of the maximal inscribed sphere
 
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)
 rearrange vector values by map (old.id -> new.id)
 
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 MR_BIND_IGNORE 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 MR_BIND_IGNORE 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< LoadedObjectfromSceneMison (const std::filesystem::path &path, const ProgressCallback &callback={})
 
MRMESH_API Expected< LoadedObjectfromSceneMison (std::istream &in, const ProgressCallback &callback={})
 
MRMESH_API Mesh makeMovementBuildBody (const Contours3f &body, const Contours3f &trajectory, const MovementBuildBodyParams &params={})
 
MRMESH_API void updateGroupPairs (ICPGroupPairs &pairs, const ICPObjects &objs, ICPGroupProjector srcProjector, ICPGroupProjector tgtProjector, float cosThreshold, float distThresholdSq, bool mutualClosest)
 in each pair updates the target data and performs basic filtering (activation)
 
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 Expected< void > meshDenoiseViaNormals (Mesh &mesh, const DenoiseViaNormalsSettings &settings={})
 
MRMESH_API std::string_view toString (DimensionsVisualizePropertyType value)
 
MRMESH_API std::shared_ptr< ObjectLinesmerge (const std::vector< std::shared_ptr< ObjectLines > > &objsLines)
 constructs new ObjectLines containing the union of valid data from all input objects
 
MRMESH_API std::shared_ptr< ObjectLinescloneRegion (const std::shared_ptr< ObjectLines > &objLines, const UndirectedEdgeBitSet &region)
 constructs new ObjectLines containing the region of data from input object
 
MRMESH_API std::shared_ptr< ObjectMeshmerge (const std::vector< std::shared_ptr< ObjectMesh > > &objsMesh, const ObjectMeshMergeOptions &options={})
 constructs new ObjectMesh containing the union of valid data from all input objects
 
MRMESH_API std::shared_ptr< ObjectMeshcloneRegion (const std::shared_ptr< ObjectMesh > &objMesh, const FaceBitSet &region, bool copyTexture=true)
 
MRMESH_API UndirectedEdgeBitSet edgesBetweenDifferentColors (const MeshTopology &topology, const FaceColors &colors)
 return all edges separating faces with different colors
 
MRMESH_API const std::string & defaultSerializeMeshFormat ()
 
MRMESH_API void setDefaultSerializeMeshFormat (std::string newFormat)
 
MRMESH_API std::shared_ptr< ObjectPointsmerge (const std::vector< std::shared_ptr< ObjectPoints > > &objsPoints)
 constructs new ObjectPoints containing the union of valid points from all input objects
 
MRMESH_API std::shared_ptr< ObjectPointscloneRegion (const std::shared_ptr< ObjectPoints > &objPoints, const VertBitSet &region)
 
MRMESH_API std::shared_ptr< ObjectPointspack (const ObjectPoints &pts, Reorder reorder, VertBitSet *newValidVerts=nullptr, const ProgressCallback &cb={})
 
MRMESH_API const std::string & defaultSerializePointsFormat ()
 
MRMESH_API void setDefaultSerializePointsFormat (std::string newFormat)
 
bool objectHasSelectableChildren (const MR::Object &object, bool recurse=false)
 
MRMESH_API Expected< void > serializeObjectTree (const Object &object, const std::filesystem::path &path, FolderCallback preCompress, const ObjectSave::Settings &settings={})
 namespace ObjectSave
 
MRMESH_API Expected< void > serializeObjectTree (const Object &object, const std::filesystem::path &path, const ObjectSave::Settings &settings={})
 
MRMESH_API Contours2f offsetContours (const Contours2f &contours, float offset, const OffsetContoursParams &params={})
 offsets 2d contours in plane
 
MRMESH_API Contours2f offsetContours (const Contours2f &contours, ContoursVariableOffset offset, const OffsetContoursParams &params={})
 offsets 2d contours in plane
 
MRMESH_API Contours3f offsetContours (const Contours3f &contours, float offset, const OffsetContoursParams &params={}, const OffsetContoursRestoreZParams &zParmas={})
 offsets 3d contours in XY plane
 
MRMESH_API Contours3f offsetContours (const Contours3f &contours, ContoursVariableOffset offset, const OffsetContoursParams &params={}, const OffsetContoursRestoreZParams &zParmas={})
 offsets 3d contours in XY plane
 
MRMESH_API bool offsetVerts (Mesh &mesh, const VertMetric &offset, const ProgressCallback &cb={})
 
MRMESH_API Mesh makeThickMesh (const Mesh &m, const ThickenParams &params)
 
MRMESH_API bool zCompensate (Mesh &mesh, const ZCompensateParams &params)
 
MRMESH_API std::optional< VertScalars > findZcompensationShifts (const Mesh &mesh, const ZCompensateParams &params)
 finds the shift along z-axis for each vertex without modifying the mesh
 
MRMESH_API std::optional< VertCoords > findZcompensatedPositions (const Mesh &mesh, const ZCompensateParams &params)
 finds vertices positions of the mesh after z-compensation without modifying the mesh
 
MRMESH_API void subdivideLoneContours (Mesh &mesh, const OneMeshContours &contours, FaceHashMap *new2oldMap=nullptr)
 
MRMESH_API void getOneMeshIntersectionContours (const Mesh &meshA, const Mesh &meshB, const ContinuousContours &contours, OneMeshContours *outA, OneMeshContours *outB, const CoordinateConverters &converters, const AffineXf3f *rigidB2A=nullptr, Contours3f *outPtsA=nullptr, bool addSelfyTerminalVerts=false)
 if true, then open self-intersection contours will be prolonged to terminal vertices
 
MRMESH_API OneMeshContours getOneMeshSelfIntersectionContours (const Mesh &mesh, const ContinuousContours &contours, const CoordinateConverters &converters, const AffineXf3f *rigidB2A=nullptr)
 
MRMESH_API Contours3f extractMeshContours (const OneMeshContours &meshContours)
 Converts OneMeshContours contours representation to Contours3f: set of coordinates.
 
MR_BIND_IGNORE MRMESH_API Expected< OneMeshContourconvertMeshTriPointsToMeshContour (const Mesh &mesh, const std::vector< MeshTriPoint > &surfaceLine, MeshTriPointsConnector connectorFn, 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< OneMeshContourconvertMeshTriPointsToMeshContour (const Mesh &mesh, const std::vector< MeshTriPoint > &surfaceLine, 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< OneMeshContourconvertMeshTriPointsToClosedContour (const Mesh &mesh, const std::vector< MeshTriPoint > &surfaceLine, 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 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< VertBitSet > findOutliers (const PointCloud &pc, const FindOutliersParams &params)
 Finding outlier points.
 
MRMESH_API Expected< FaceBitSet > findOverlappingTris (const MeshPart &mp, const FindOverlappingSettings &settings)
 finds all triangles that have oppositely oriented close triangle in the mesh
 
MRMESH_API void parallelFor (size_t begin, size_t end, FunctionRef< void(size_t)> f)
 
MRMESH_API void parallelFor (size_t begin, size_t end, FunctionRef< void(size_t, void *)> f, FunctionRef< void *()> ctx)
 
MRMESH_API bool parallelFor (size_t begin, size_t end, FunctionRef< void(size_t, void *)> f, FunctionRef< void *()> ctx, ProgressCallback cb, size_t reportProgressEvery=1024)
 
template<typename I , typename F , typename ... Cb>
auto ParallelFor (I begin, I end, F &&f, Cb &&... cb)
 
template<typename I , typename L , typename F , typename ... Cb>
auto ParallelFor (I begin, I end, tbb::enumerable_thread_specific< L > &e, F &&f, Cb &&... cb)
 
template<typename T , typename ... F>
auto ParallelFor (const std::vector< T > &v, F &&... f)
 
template<typename T , typename I , typename ... F>
auto ParallelFor (const Vector< T, I > &v, F &&... f)
 
template<typename T , typename I , typename ... F>
auto ParallelFor (const Buffer< T, I > &buf, F &&... f)
 
template<typename T >
MinMaxArg< T, size_t > parallelMinMaxArg (const T *data, size_t size, const BitSet *region=nullptr, const T *topExcluding=nullptr)
 
template<typename T , typename Itag >
MinMaxArg< T, Id< Itag > > parallelMinMaxArg (const Vector< T, Id< Itag > > &vec, const TaggedBitSet< Itag > *region=nullptr, const T *topExcluding=nullptr)
 
template<typename T >
std::pair< T, T > parallelMinMax (const T *data, size_t size, const BitSet *region=nullptr, const T *topExcluding=nullptr)
 
template<typename T >
std::pair< T, T > parallelMinMax (const std::vector< T > &vec, const BitSet *region=nullptr, const T *topExcluding=nullptr)
 
template<typename T , typename Itag >
std::pair< T, T > parallelMinMax (const Vector< T, Id< Itag > > &vec, const TaggedBitSet< Itag > *region=nullptr, const T *topExcluding=nullptr)
 
MRMESH_API Expected< VertCoords > loadPly (std::istream &in, const PlyLoadParams &params)
 
MRMESH_API float findMaxDistanceSqOneWay (const PointCloud &a, const PointCloud &b, const AffineXf3f *rigidB2A=nullptr, float maxDistanceSq=FLT_MAX)
 returns the maximum of the squared distances from each B-point to A-cloud
 
MRMESH_API float findMaxDistanceSq (const PointCloud &a, const PointCloud &b, const AffineXf3f *rigidB2A=nullptr, float maxDistanceSq=FLT_MAX)
 returns the squared Hausdorff distance between two point clouds, that is the maximum of squared distances from each point to the other cloud (in both directions)
 
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< VertNormals > makeUnorientedNormals (const PointCloud &pointCloud, float radius, const ProgressCallback &progress={}, OrientNormals orient=OrientNormals::Smart)
 Makes normals for valid points of given point cloud by directing them along the normal of best plane through the neighbours.
 
MRMESH_API std::optional< VertNormals > makeUnorientedNormals (const PointCloud &pointCloud, const AllLocalTriangulations &triangs, const ProgressCallback &progress={}, OrientNormals orient=OrientNormals::Smart)
 Makes normals for valid points of given point cloud by averaging neighbor triangle normals weighted by triangle's angle \triangs triangulation neighbours of each point.
 
MRMESH_API std::optional< VertNormals > makeUnorientedNormals (const PointCloud &pointCloud, const Buffer< VertId > &closeVerts, int numNei, const ProgressCallback &progress={}, OrientNormals orient=OrientNormals::Smart)
 Makes normals for valid points of given point cloud by directing them along the normal 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< VertNormals > makeOrientedNormals (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< VertNormals > makeOrientedNormals (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={}, const ProgressCallback &progressCb={})
 Creates mesh from given point cloud according params Returns empty optional if was interrupted by progress bar.
 
MRMESH_API bool fillHolesWithExtraPoints (Mesh &mesh, PointCloud &extraPoints, const FillHolesWithExtraPointsParams &params={}, const ProgressCallback &progressCb={})
 
MRMESH_API PickedPoint pointOnObjectToPickedPoint (const VisualObject *object, const PointOnObject &pos)
 Converts PointOnObject coordinates depending on the object type to the PickedPoint variant.
 
MRMESH_API std::optional< Vector3f > getPickedPointPosition (const VisualObject &object, const PickedPoint &point)
 
MRMESH_API MR_BIND_IGNORE Vector3f pickedPointToVector3 (const VisualObject *object, const PickedPoint &point)
 Converts pickedPoint into local coordinates of its object.
 
MRMESH_API MR_BIND_IGNORE bool isPickedPointValid (const VisualObject *object, const PickedPoint &point)
 Checks that the picked point presents in the object's topology.
 
MRMESH_API std::optional< Vector3f > getPickedPointNormal (const VisualObject &object, const PickedPoint &point, bool interpolated=true)
 
MRMESH_API void findPointsInBall (const PointCloud &pointCloud, const Ball3f &ball, const OnPointInBallFound &foundCallback, const AffineXf3f *xf=nullptr)
 
MRMESH_API MR_BIND_IGNORE void findPointsInBall (const PointCloud &pointCloud, const Ball3f &ball, const FoundPointCallback &foundCallback, const AffineXf3f *xf=nullptr)
 
MRMESH_API void findPointsInBall (const Mesh &mesh, const Ball3f &ball, const OnPointInBallFound &foundCallback, const AffineXf3f *xf=nullptr)
 
MRMESH_API MR_BIND_IGNORE void findPointsInBall (const Mesh &mesh, const Ball3f &ball, const FoundPointCallback &foundCallback, const AffineXf3f *xf=nullptr)
 
MRMESH_API void findPointsInBall (const AABBTreePoints &tree, Ball3f ball, const OnPointInBallFound &foundCallback, const AffineXf3f *xf=nullptr)
 
MRMESH_API MR_BIND_IGNORE void findPointsInBall (const AABBTreePoints &tree, const Ball3f &ball, const FoundPointCallback &foundCallback, const AffineXf3f *xf=nullptr)
 
MRMESH_API void findPointsInBox (const PointCloud &pointCloud, const Box3f &box, const FoundPointCallback &foundCallback, const AffineXf3f *xf=nullptr)
 
MRMESH_API void findPointsInBox (const Mesh &mesh, const Box3f &box, const FoundPointCallback &foundCallback, const AffineXf3f *xf=nullptr)
 
MRMESH_API void findPointsInBox (const AABBTreePoints &tree, const Box3f &box, const FoundPointCallback &foundCallback, const AffineXf3f *xf=nullptr)
 
MRMESH_API PointsProjectionResult findProjectionOnPoints (const Vector3f &pt, const PointCloudPart &pcp, 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 PointsProjectionResult findProjectionOnPoints (const Vector3f &pt, const AABBTreePoints &tree, float upDistLimitSq=FLT_MAX, const AffineXf3f *xf=nullptr, float loDistLimitSq=0, const VertBitSet *region=nullptr, VertPredicate skipCb={})
 computes the closest point on AABBTreePoints 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< VertId > findNClosestPointsPerPoint (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 VertPair findTwoClosestPoints (const PointCloud &pc, const ProgressCallback &progress={})
 finds two closest points (first id < second id) in whole point cloud
 
MRMESH_API VertScalars findSignedDistances (const Mesh &refMesh, const VertCoords &testPoints, const VertBitSet *validTestPoints={}, const MeshProjectionParameters &params={}, IPointsToMeshProjector *projector={})
 if projector is not given then CPU's computations will be used
 
MRMESH_API VertScalars findSignedDistances (const Mesh &refMesh, const Mesh &mesh, const MeshProjectionParameters &params={}, IPointsToMeshProjector *projector={})
 if projector is not given then CPU's computations will be used
 
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, UndirectedEdgeBitSet > findCollidingEdgesBitsets (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 void rayPolylineIntersectAll (const Polyline2 &polyline, const Line2f &line, const PolylineIntersectionCallback2f &callback, float rayStart=0.0f, float rayEnd=FLT_MAX, const IntersectionPrecomputes2< float > *prec=nullptr)
 
MRMESH_API void rayPolylineIntersectAll (const Polyline2 &polyline, const Line2d &line, const PolylineIntersectionCallback2d &callback, double rayStart=0.0, double rayEnd=DBL_MAX, const IntersectionPrecomputes2< double > *prec=nullptr)
 
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 PolylineProjectionResult3Arg findMaxProjectionOnPolyline (const VertCoords &points, const Polyline3 &polyline, const VertBitSet *pointsRegion=nullptr, AffineXf3f *xf=nullptr, float loDistLimitSq=0)
 for each of points (pointsRegion) computes the closest point on polyline and returns the point for which maximum distance is reached,
 
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 UndirectedEdgeBitSet subdivideWithPlane (Polyline3 &polyline, const Plane3f &plane, EdgeBitSet *newPositiveEdges={}, std::function< void(EdgeId, EdgeId, float)> onEdgeSplitCallback={})
 
MRMESH_API MR_BIND_IGNORE UndirectedEdgeBitSet subdividePolylineWithPlane (Polyline3 &polyline, const Plane3f &plane, std::function< void(EdgeId, EdgeId, float)> onEdgeSplitCallback={})
 
MRMESH_API void trimWithPlane (Polyline3 &polyline, const Plane3f &plane, const DividePolylineParameters &params={})
 
MRMESH_API MR_BIND_IGNORE void dividePolylineWithPlane (Polyline3 &polyline, const Plane3f &plane, const DividePolylineParameters &params={})
 
MRMESH_API std::vector< EdgeSegmentextractSectionsFromPolyline (const Polyline3 &polyline, const Plane3f &plane, float eps, UndirectedEdgeBitSet *positiveEdges={})
 
MRMESH_API void positionVertsSmoothly (Mesh &mesh, const VertBitSet &verts, EdgeWeights edgeWeights=EdgeWeights::Cotan, VertexMass vmass=VertexMass::Unit, const VertBitSet *fixedSharpVertices=nullptr)
 
MRMESH_API void positionVertsSmoothly (const MeshTopology &topology, VertCoords &points, const VertBitSet &verts, EdgeWeights edgeWeights=EdgeWeights::Cotan, VertexMass vmass=VertexMass::Unit, const VertBitSet *fixedSharpVertices=nullptr)
 
MRMESH_API void positionVertsSmoothlySharpBd (Mesh &mesh, const PositionVertsSmoothlyParams &params)
 Puts given vertices in such positions to make smooth surface inside verts-region, but sharp on its boundary;.
 
MRMESH_API void positionVertsSmoothlySharpBd (const MeshTopology &topology, VertCoords &points, const PositionVertsSmoothlyParams &params)
 
MRMESH_API void positionVertsSmoothlySharpBd (Mesh &mesh, const VertBitSet &verts)
 
MRMESH_API void positionVertsWithSpacing (Mesh &mesh, const SpacingSettings &settings)
 Moves given vertices to make the distances between them as specified.
 
MRMESH_API void positionVertsWithSpacing (const MeshTopology &topology, VertCoords &points, const SpacingSettings &settings)
 
MRMESH_API void inflate (Mesh &mesh, const VertBitSet &verts, const InflateSettings &settings)
 
MRMESH_API void inflate (const MeshTopology &topology, VertCoords &points, const VertBitSet &verts, const InflateSettings &settings)
 
MRMESH_API void inflate1 (const MeshTopology &topology, VertCoords &points, const VertBitSet &verts, float pressure)
 
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)
 
MR_BIND_IGNORE void processSelfSubtasks (const AABBTree &tree, std::vector< NodeNode > &subtasks, std::vector< NodeNode > &nextSubtasks, std::function< Processing(const NodeNode &)> processLeaf, std::function< Processing(const Box3f &lBox, const Box3f &rBox)> processNodes)
 This function process all subtasks in one tree
left/right == right/left in this case, so on same non-leaf nodes it only adds 3 next subtasks,
same leafs are skipped and different leafs area processed with processLeaf callback.
 
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 F >
bool projectVertAttribute (const MeshVertPart &mp, const Mesh &oldMesh, F &&func, const ProjectAttributeParams &params={})
 
template<typename F >
bool projectFaceAttribute (const MeshPart &mp, const Mesh &oldMesh, F &&func, const ProjectAttributeParams &params={})
 
MRMESH_API Expected< void > projectObjectMeshData (const ObjectMeshData &oldMeshData, ObjectMeshData &newMeshData, const FaceBitSet *region=nullptr, const ProjectAttributeParams &params={})
 finds attributes of new mesh by projecting faces/vertices on old mesh
 
MRMESH_API Expected< void > compensateRadius (Mesh &mesh, const CompensateRadiusParams &params)
 
template<typename T = float>
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
 
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 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 EdgeId extractPath (const MeshTopology &topology, EdgeId e0, EdgeBitSet &edges, EdgePath *outPath, Turn turn)
 
MRMESH_API std::vector< EdgeLoop > extractAllLoops (const MeshTopology &topology, EdgeBitSet &edges, Turn turn)
 
MRMESH_API std::vector< EdgeLoop > findLeftBoundary (const MeshTopology &topology, const FaceBitSet *region=nullptr)
 
MR_BIND_IGNORE std::vector< EdgeLoop > findLeftBoundary (const MeshTopology &topology, const FaceBitSet &region)
 This is skipped in the bindings because it conflicts with the overload taking a pointer in C#. Since that overload is strictly more useful, we're keeping that one.
 
MRMESH_API std::vector< EdgeLoop > findRightBoundary (const MeshTopology &topology, const FaceBitSet *region=nullptr)
 
MR_BIND_IGNORE std::vector< EdgeLoop > findRightBoundary (const MeshTopology &topology, const FaceBitSet &region)
 This is skipped in the bindings because it conflicts with the overload taking a pointer in C#. Since that overload is strictly more useful, we're keeping that one.
 
MRMESH_API EdgeBitSet findAllLeftBdEdges (const MeshTopology &topology, const FaceBitSet *region, bool innerMeshEdgesOnly=false)
 
MRMESH_API std::vector< EdgeLoop > delRegionKeepBd (Mesh &mesh, const FaceBitSet *region=nullptr, bool keepLoneHoles=false)
 
MR_BIND_IGNORE std::vector< EdgeLoop > delRegionKeepBd (Mesh &mesh, const FaceBitSet &region, bool keepLoneHoles=false)
 This is skipped in the bindings because it conflicts with the overload taking a pointer in C#. Since that overload is strictly more useful, we're keeping that one.
 
MRMESH_API std::vector< EdgePath > findLeftBoundaryInsideMesh (const MeshTopology &topology, const FaceBitSet &region)
 
MRMESH_API UndirectedEdgeBitSet findRegionBoundaryUndirectedEdgesInsideMesh (const MeshTopology &topology, const FaceBitSet &region)
 returns all region boundary edges, where each edge has a region face on one side, and a valid not-region face on another side
 
MRMESH_API FaceBitSet findRegionOuterFaces (const MeshTopology &topology, const FaceBitSet &region)
 
MRMESH_API VertBitSet getIncidentVerts (const MeshTopology &topology, const FaceBitSet &faces)
 composes the set of all vertices incident to given faces
 
MRMESH_API const VertBitSet & getIncidentVerts (const MeshTopology &topology, const FaceBitSet *faces, VertBitSet &store)
 
MRMESH_API VertBitSet getInnerVerts (const MeshTopology &topology, const FaceBitSet *region=nullptr)
 composes the set of all vertices not on the boundary of a hole and with all their adjacent faces in given set
 
MRMESH_API MR_BIND_IGNORE VertBitSet getInnerVerts (const MeshTopology &topology, const FaceBitSet &region)
 
MRMESH_API VertBitSet getBoundaryVerts (const MeshTopology &topology, const FaceBitSet *region=nullptr)
 composes the set of all boundary vertices for given region (or whole mesh if !region)
 
MRMESH_API VertBitSet getRegionBoundaryVerts (const MeshTopology &topology, const FaceBitSet &region)
 
MRMESH_API FaceBitSet getIncidentFaces (const MeshTopology &topology, const VertBitSet &verts)
 composes the set of all faces incident to given vertices
 
MRMESH_API FaceBitSet getInnerFaces (const MeshTopology &topology, const VertBitSet &verts)
 composes the set of all faces with all their vertices in given set
 
MRMESH_API EdgeBitSet getRegionEdges (const MeshTopology &topology, const FaceBitSet &faces)
 composes the set of all edges, having a face from given set at the left
 
MRMESH_API UndirectedEdgeBitSet getIncidentEdges (const MeshTopology &topology, const FaceBitSet &faces)
 composes the set of all undirected edges, having a face from given set from one of two sides
 
MRMESH_API UndirectedEdgeBitSet getIncidentEdges (const MeshTopology &topology, const UndirectedEdgeBitSet &edges)
 composes the set of all undirected edges, having at least one common vertex with an edge from given set
 
MRMESH_API VertBitSet getIncidentVerts (const MeshTopology &topology, const UndirectedEdgeBitSet &edges)
 composes the set of all vertices incident to given edges
 
MRMESH_API FaceBitSet getIncidentFaces (const MeshTopology &topology, const UndirectedEdgeBitSet &edges)
 composes the set of all faces incident to given edges
 
MRMESH_API FaceBitSet getNeighborFaces (const MeshTopology &topology, const UndirectedEdgeBitSet &edges)
 composes the set of all left and right faces of given edges
 
MRMESH_API UndirectedEdgeBitSet getInnerEdges (const MeshTopology &topology, const VertBitSet &verts)
 composes the set of all edges with all their vertices in given set
 
MRMESH_API UndirectedEdgeBitSet getInnerEdges (const MeshTopology &topology, const FaceBitSet &region)
 composes the set of all edges having both left and right in given region
 
MRMESH_API const VertBitSet & getIncidentVerts (const MeshTopology &topology, const UndirectedEdgeBitSet *edges, VertBitSet &store)
 
MRMESH_API VertBitSet getInnerVerts (const MeshTopology &topology, const UndirectedEdgeBitSet &edges)
 composes the set of all vertices with all their edges in given set
 
MRMESH_API Expected< MeshmakeRegularGridMesh (size_t width, size_t height, const RegularGridLatticeValidator &validator, const RegularGridLatticePositioner &positioner, const RegularGridMeshFaceValidator &faceValidator={}, ProgressCallback cb={})
 Creates regular mesh with points in valid grid lattice.
 
MRMESH_API Expected< MeshmakeRegularGridMesh (VertCoords pc, ProgressCallback cb={})
 Creates regular mesh from monotone (connects point with closed x, y neighbors) points.
 
template<typename V >
getLimitedPos (const V &pos, const V &guidePos, typename VectorTraits< V >::BaseType maxGuideDistSq)
 
template<typename T >
void resizeNoInit (std::vector< T > &vec, size_t targetSize) MR_REQUIRES_IF_SUPPORTED(sizeof(T) > 0 &&std
 
MRMESH_API void redirectSTDStreamsToLogger ()
 
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 VertCoords & transformPoints (const VertCoords &verts, const VertBitSet &validVerts, const AffineXf3d *xf, VertCoords &buf, const VertRenumber *vertRenumber=nullptr)
 
MRMESH_API const VertNormals & transformNormals (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< std::string > serializeJsonValue (const Json::Value &root)
 
MRMESH_API Expected< void > serializeJsonValue (const Json::Value &root, std::ostream &out)
 
MRMESH_API Expected< void > serializeJsonValue (const Json::Value &root, const std::filesystem::path &path)
 important on Windows: in stream must be open in binary mode
 
MRMESH_API Expected< Json::Value > deserializeJsonValue (std::istream &in)
 
MRMESH_API Expected< Json::Value > deserializeJsonValue (const char *data, size_t size)
 important on Windows: in stream must be open in binary mode
 
MRMESH_API Expected< Json::Value > deserializeJsonValue (const std::string &str)
 
MRMESH_API Expected< Json::Value > deserializeJsonValue (const std::filesystem::path &path)
 
MRMESH_API Expected< void > serializeMesh (const Mesh &mesh, const std::filesystem::path &path, const FaceBitSet *selection=nullptr, const char *serializeFormat=".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 Box3i &box, Json::Value &root)
 
MRMESH_API void serializeToJson (const Box3f &box, 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 AffineXf3f &xf, Json::Value &root, bool skipIdentity=true)
 
MRMESH_API void serializeToJson (const BitSet &bitset, Json::Value &root)
 
MRMESH_API Expected< void > 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< TextureId > &texturePerFace, 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, AffineXf3f &xf)
 
MRMESH_API void deserializeFromJson (const Json::Value &root, BitSet &bitset)
 
MRMESH_API Expected< MeshdeserializeFromJson (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< TextureId > &texturePerFace)
 
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 const char * asString (SignDetectionMode m)
 returns string representation of enum values
 
MRMESH_API std::vector< Vector3f > sampleHalfSphere ()
 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)
 
MRMESH_API Mesh makeSolidOfRevolution (const Contour2f &profile, int resolution=16)
 
template<typename C , typename D , D M>
SparsePolynomial< C, D, Moperator* (const SparsePolynomial< C, D, M > &a, const SparsePolynomial< C, D, M > &b)
 
std::string getCurrentStacktraceInline ()
 
MRMESH_API void printStacktraceOnCrash ()
 Print stacktrace on application crash.
 
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, int *outLeftRightAddition=nullptr)
 
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)
 Returns.
 
MRMESH_API void replaceInplace (std::string &target, std::string_view from, std::string_view to)
 Replaces.
 
MRMESH_API std::string_view trim (std::string_view str)
 Removes all whitespace character (detected by std::isspace) at the beginning and the end of string view.
 
MRMESH_API std::string_view trimLeft (std::string_view str)
 Removes all whitespace character (detected by std::isspace) at the beginning of string view.
 
MRMESH_API std::string_view trimRight (std::string_view str)
 Removes all whitespace character (detected by std::isspace) at the end of string view.
 
MRMESH_API bool hasFormatPlaceholders (std::string_view str)
 Returns true if str has at least one {...} formatting placeholder.
 
MR_BIND_IGNORE 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)
 
MR_BIND_IGNORE MRMESH_API std::string wideToUtf8 (const wchar_t *wide)
 converts wide null terminating string to UTF8-encoded string
 
MR_BIND_IGNORE const std::string & asString (const std::string &s)
 std::u8string is not defined
 
MR_BIND_IGNORE const std::string & asU8String (const std::string &s)
 
MR_BIND_IGNORE std::string asString (std::string &&s)
 
MR_BIND_IGNORE std::string asU8String (std::string &&s)
 
MR_BIND_IGNORE std::filesystem::path pathFromUtf8 (const std::string &s)
 
MR_BIND_IGNORE std::filesystem::path pathFromUtf8 (const char *s)
 
std::string utf8string (const std::filesystem::path &path)
 returns filename as UTF8-encoded string
 
std::string utf8string (const std::string &)=delete
 it is a mistake to call the function with implicit construction of path from string
 
MRMESH_API std::string utf8substr (const char *s, size_t pos, size_t count)
 
MRMESH_API std::string bytesString (size_t size)
 
bool isProhibitedChar (char c)
 
MRMESH_API bool hasProhibitedChars (const std::string &line)
 returns true if line contains at least one character (c) for which isProhibitedChar(c)==true
 
MRMESH_API std::string replaceProhibitedChars (const std::string &line, char replacement='_')
 replace all characters (c), where isProhibitedChar(c)==true, with replacement char
 
template<typename T >
Expected< T > addFileNameInError (Expected< T > v, const std::filesystem::path &file)
 if (v) contains an error, then appends given file name to that error
 
MRMESH_API std::string commonFilesName (const std::vector< std::filesystem::path > &files)
 
MRMESH_API MR_BIND_IGNORE 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)
 Returns message showed when loading is canceled.
 
MRMESH_API std::string toLower (std::string str)
 return a copy of the string with all alphabetic ASCII characters replaced with upper-case variants
 
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
 
MRMESH_API Expected< Contours3f > offsetSurfaceLine (const Mesh &mesh, const std::vector< MeshTriPoint > &surfaceLine, float offset)
 Returns contours in mesh space that are offset from surfaceLine on offset amount in all directions.
 
MRMESH_API Expected< Contours3f > offsetSurfaceLine (const Mesh &mesh, const std::vector< MeshTriPoint > &surfaceLine, const std::function< float(int)> &offsetAtPoint)
 Returns contours in mesh space that are offset from surfaceLine on offsetAtPoint amount in all directions.
 
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=GeodesicPathApprox::FastMarching, 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, VertId > computeClosestSurfacePathTargets (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 the given surface path
 
MRMESH_API float geodesicPathLength (const Mesh &mesh, const GeodesicPath &path)
 computes the length of the given geodesic 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 Contour3f geodesicPathToContour3f (const Mesh &mesh, const GeodesicPath &path)
 returns coordinates of all vertices of the given path
 
MRMESH_API Expected< 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. The algorithm assumes that input edges can be projected on the plane orthogonal to given direction, then the center point of all input edges is found, and each segment of the searched loop is within infinite pie sector with this center and the borders passing via two sorted input edges.
 
MRMESH_API Expected< 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. The algorithm assumes that input vertices can be projected on the plane orthogonal to given direction, then the center point of all input vertices is found, and each segment of the searched loop is within infinite pie sector with this center and the borders passing via two sorted input vertices.
 
MRMESH_API void SetCurrentThreadName (const char *name)
 sets debug name for the current thread
 
MRMESH_API MR_BIND_IGNORE std::filesystem::path GetExeDirectory ()
 returns path of current exe directory
 
MRMESH_API MR_BIND_IGNORE std::filesystem::path GetResourcesDirectory ()
 
MRMESH_API MR_BIND_IGNORE std::filesystem::path GetFontsDirectory ()
 
MRMESH_API MR_BIND_IGNORE std::filesystem::path GetLibsDirectory ()
 
MRMESH_API MR_BIND_IGNORE std::filesystem::path GetEmbeddedPythonDirectory ()
 
MRMESH_API std::filesystem::path getUserConfigDir ()
 return path to the folder with user config file(s)
 
MRMESH_API std::filesystem::path getUserConfigFilePath ()
 returns path of config file in APPDATA
 
MRMESH_API std::filesystem::path GetTempDirectory ()
 returns temp directory
 
MRMESH_API std::filesystem::path GetHomeDirectory ()
 returns home directory
 
MRMESH_API const char * GetMRVersionString ()
 _WIN32
 
MRMESH_API void OpenLink (const std::string &url)
 Opens given link in default browser.
 
MRMESH_API bool OpenDocument (const std::filesystem::path &path)
 Opens given file (or directory) in associated application.
 
MRMESH_API std::string GetCpuId ()
 returns string identification of the CPU
 
MRMESH_API std::string GetDetailedOSName ()
 returns string with OS name with details
 
MRMESH_API std::string getOSNoSpaces ()
 returns string identification of the OS
 
MRMESH_API void setNewHandlerIfNeeded ()
 sets new handler for operator new if needed for some platforms
 
MRMESH_API std::string getCurrentStacktrace ()
 returns string representation of the current stacktrace
 
MRMESH_API SystemMemory getSystemMemory ()
 return information about memory available in the system
 
MRMESH_API void setupLoggerByDefault (const std::function< void()> &customLogSinkAdder={})
 _WIN32
 
int intLog2 (size_t n)
 
MRMESH_API Expected< MeshterrainTriangulation (std::vector< Vector3f > points, ProgressCallback cb={})
 
MRMESH_API std::optional< UVCoord > findVertexUV (const MeshTopology &topology, VertId v, const TriCornerUVCoords &triCornerUvCoords)
 
MRMESH_API std::optional< VertUVCoords > findVertexUVs (const MeshTopology &topology, const TriCornerUVCoords &triCornerUvCoords)
 
MRMESH_API Color sampleVertexColor (const Mesh &mesh, VertId v, const MeshTexture &tex, const TriCornerUVCoords &triCornerUvCoords)
 
MRMESH_API VertColors sampleVertexColors (const Mesh &mesh, const MeshTexture &tex, const TriCornerUVCoords &triCornerUvCoords)
 
MRMESH_API bool isTIFFFile (const std::filesystem::path &path)
 returns true if given file is tiff
 
MRMESH_API Expected< TiffParametersreadTiffParameters (const std::filesystem::path &path)
 reads parameters of tiff file
 
MRMESH_API Expected< void > readRawTiff (const std::filesystem::path &path, RawTiffOutput &output)
 load values from tiff to ouput.data
 
MRMESH_API Expected< void > writeRawTiff (const uint8_t *bytes, const std::filesystem::path &path, const WriteRawTiffParams &params)
 writes bytes to tiff file
 
Expected< void > writeRawTiff (const uint8_t *bytes, const std::filesystem::path &path, const BaseTiffParameters &params, const AffineXf3f *xf)
 
MRMESH_API void printTimingTreeAtEnd (bool on, double minTimeSec=0.1)
 
MRMESH_API void printCurrentTimerBranch ()
 prints current timer branch
 
MRMESH_API void printTimingTree (double minTimeSec=0.1)
 
MR_BIND_IGNORE MRMESH_API void registerThreadRootTimeRecord (ThreadRootTimeRecord &root)
 installs given record in the current thread (no record must be installed before)
 
MR_BIND_IGNORE MRMESH_API void unregisterThreadRootTimeRecord (ThreadRootTimeRecord &root)
 un-installs given record in the current thread
 
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 isPointInPlane (const Vector3< T > &p, const Vector3< T > &a, const Vector3< T > &b, const Vector3< T > &c)
 returns true if ABC plane contains point P
 
template<typename T >
bool isPointInLine (const Vector3< T > &p, const Vector3< T > &a, const Vector3< T > &b)
 returns true if AB line contains point P
 
template<typename T >
bool isPointInLine (const Vector2< T > &p, const Vector2< T > &a, const Vector2< T > &b)
 returns true if AB line contains point P
 
template<typename T >
bool isPointInSegm (const Vector3< T > &p, const Vector3< T > &a, const Vector3< T > &b)
 returns true if AB segment contains point P
 
template<typename T >
bool isPointInSegm (const Vector2< T > &p, const Vector2< T > &a, const Vector2< T > &b)
 returns true if AB segment contains point P
 
template<typename T >
bool isPointInTriangle (const Vector3< T > &p, const Vector3< T > &a, const Vector3< T > &b, const Vector3< T > &c)
 returns true if ABC triangle contains point P
 
template<typename T >
bool isPointInTriangle (const Vector2< T > &p, const Vector2< T > &a, const Vector2< T > &b, const Vector2< T > &c)
 returns true if ABC triangle contains point P
 
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< Vector3< T > > findTriangleTriangleIntersection (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 >
std::optional< TriIntersectResultrayTriangleIntersect (const Vector3< T > &oriA, const Vector3< T > &oriB, const Vector3< T > &oriC, const IntersectionPrecomputes< T > &prec)
 
template<typename T >
std::optional< TriIntersectResultrayTriangleIntersect (const Vector3< T > &oriA, const Vector3< T > &oriB, const Vector3< T > &oriC, const Vector3< T > &dir)
 
template<typename T >
bool doTrianglesOverlap (const Vector2< T > &a, const Vector2< T > &b, const Vector2< T > &c, const Vector2< T > &d, const Vector2< T > &e, const Vector2< T > &f)
 returns true if ABC and DEF overlaps or touches
 
MRMESH_API MR_BIND_IGNORE float triDist (Vector3f &p, Vector3f &q, const Vector3f s[3], const Vector3f t[3])
 This version is not in the bindings, because the pointer parameters are assumed to point to single objects, which is wrong here.
 
float triDist (Vector3f &p, Vector3f &q, const std::array< Vector3f, 3 > &s, const std::array< Vector3f, 3 > &t)
 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)
 ball's center from the negative side of triangle
 
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 > &q, const Vector3< T > &r)
 computes directed double area of triangle 0QR
 
template<typename T >
Vector3< T > dirDblArea (const Vector3< T > &p, const Vector3< T > &q, const Vector3< T > &r)
 computes directed double area of triangle PQR
 
template<typename T >
Vector3< T > normal (const Vector3< T > &q, const Vector3< T > &r)
 computes unit normal of triangle 0QR
 
template<typename T >
Vector3< T > normal (const Vector3< T > &p, const Vector3< T > &q, const Vector3< T > &r)
 computes unit normal of triangle PQR
 
template<typename T >
Vector3< T > normal (const Triangle3< T > &t)
 computes unit normal of the 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 Triangle3< T > &t)
 computes twice the 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)
 
template<typename T >
tanSqOfHalfAngle (T a, T b, T c)
 
template<typename T >
cotan (const Triangle3< T > &t, T absMaxVal=std::numeric_limits< T >::max())
 
template<typename T >
cotan (T a, T b, T c)
 
template<typename T >
std::optional< Vector3< T > > gradientInTri (const Vector3< T > &b, const Vector3< T > &c, T vb, T vc)
 
template<typename T >
std::optional< Vector3< T > > gradientInTri (const Vector3< T > &a, const Vector3< T > &b, const Vector3< T > &c, T va, T vb, T vc)
 
template<typename T >
std::optional< T > findTriExitPos (const Vector3< T > &b, const Vector3< T > &c, const Vector3< T > &grad)
 
template<typename T >
std::optional< Vector3< T > > tangentPlaneNormalToSpheres (const Vector3< T > &b, const Vector3< T > &c, T rb, T rc)
 
template<typename T >
std::optional< Plane3< T > > tangentPlaneToSpheres (const Vector3< T > &a, const Vector3< T > &b, const Vector3< T > &c, T ra, T rb, T rc)
 
MRMESH_API std::vector< FaceFaceFacefindTripleFaceIntersections (const MeshTopology &topology, const ContinuousContours &selfContours)
 
MRMESH_API Expected< std::vector< EdgeLoop > > detectBasisTunnels (const MeshPart &mp, EdgeMetric metric={}, ProgressCallback progressCallback={})
 
MRMESH_API Expected< EdgeLoop > findSmallestMetricCoLoop (const MeshTopology &topology, const EdgeLoop &loop, const EdgeMetric &metric, const FaceBitSet *region=nullptr)
 
MRMESH_API Expected< EdgeLoop > findShortestCoLoop (const MeshPart &mp, const EdgeLoop &loop)
 same as findMinimalCoLoop with euclidean edge length metric
 
MRMESH_API std::vector< EdgeLoop > findSmallestMetricEquivalentLoops (const MeshTopology &topology, const EdgeLoop &loop, const EdgeMetric &metric, const FaceBitSet *region=nullptr)
 
MRMESH_API std::vector< EdgeLoop > findShortestEquivalentLoops (const MeshPart &mp, const EdgeLoop &loop)
 same as findSmallestMetricEquivalentLoops with euclidean edge length metric
 
MRMESH_API Expected< FaceBitSet > 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< VertBitSet > pointUniformSampling (const PointCloud &pointCloud, const UniformSamplingSettings &settings)
 
MRMESH_API std::optional< PointCloudmakeUniformSampledCloud (const PointCloud &pointCloud, const UniformSamplingSettings &settings)
 
template<typename I >
TypedBitSet< I > findRootsBitSet (const UnionFind< I > &uf, const TypedBitSet< I > *region=nullptr)
 
template<typename I >
TypedBitSet< I > findComponentBitSet (UnionFind< I > &uf, I a, const TypedBitSet< I > *region=nullptr)
 
MRMESH_API Expected< MeshuniteManyMeshes (const std::vector< const Mesh * > &meshes, const UniteManyMeshesParams &params={})
 
template<UnitEnum E>
const UnitInfogetUnitInfo (E unit)=delete
 Returns information about a single measurement unit.
 
template<UnitEnum E>
bool unitsAreEquivalent (E a, E b)
 Returns true if converting a value between units a and b doesn't change its value.
 
template<UnitEnum E>
bool unitsAreEquivalent (const std::optional< E > &a, const std::optional< E > &b)
 This version also returns true if a or b is null.
 
template<UnitEnum E, typename T >
detail::Units::MakeFloatingPoint< T > convertUnits (E from, E to, const T &value)
 
template<UnitEnum E, typename T >
detail::Units::MakeFloatingPoint< T > convertUnits (const std::optional< E > &from, const std::optional< E > &to, const T &value)
 This version is a no-op if from or to is null.
 
template<typename T , typename I >
MR_BIND_IGNORE_PY auto begin (const Vector< T, I > &a)
 
template<typename T , typename I >
MR_BIND_IGNORE_PY auto begin (Vector< T, I > &a)
 
template<typename T , typename I >
MR_BIND_IGNORE_PY auto end (const Vector< T, I > &a)
 
template<typename T , typename I >
MR_BIND_IGNORE_PY auto end (Vector< T, I > &a)
 
template<typename T >
getAt (const std::vector< T > &a, size_t id, T def={})
 given some std::vector and a key, returns the value associated with the key, or default value if key is invalid or outside the std::vector
 
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
 
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< void > decompressZip (const std::filesystem::path &zipFile, const std::filesystem::path &targetFolder, const char *password=nullptr)
 decompresses given zip-file into given folder
 
MRMESH_API Expected< void > 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 Expected< void > 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
 
template<typename E >
void throwExceptionFromExpected (const E &err)
 overload toString functoion to throw exception from custom Expected::error type
 
template<typename T >
decltype(auto) expectedValueOrThrow (T &&e)
 Like e.value(), but throws using throwExceptionFromExpected (which is better, because it allows Python to see the proper error message), and also supports T == void.
 
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...))
 
MRSYMBOLMESH_API Expected< MeshalignTextToMesh (const Mesh &mesh, const TextMeshAlignParams &params)
 Creates symbol mesh and aligns it to given surface.
 
MRSYMBOLMESH_API Expected< MeshbendTextAlongCurve (const CurveFunc &curve, const BendTextAlongCurveParams &params)
 
MRSYMBOLMESH_API Expected< MeshbendTextAlongCurve (const CurvePoints &curve, const BendTextAlongCurveParams &params)
 Creates symbol mesh and deforms it along given curve.
 
MRSYMBOLMESH_API Expected< MeshbendTextAlongSurfacePath (const Mesh &mesh, const MeshTriPoint &start, const SurfacePath &path, const MeshTriPoint &end, const BendTextAlongCurveParams &params)
 Creates symbol mesh and deforms it along given surface path: start->path->end.
 
MRSYMBOLMESH_API Expected< MeshbendTextAlongSurfacePath (const Mesh &mesh, const SurfacePath &path, const BendTextAlongCurveParams &params)
 Creates symbol mesh and deforms it along given surface path.
 
MRSYMBOLMESH_API Expected< Contours2f > createSymbolContours (const SymbolMeshParams &params)
 converts text string into set of contours
 
MRSYMBOLMESH_API Expected< MeshcreateSymbolsMesh (const SymbolMeshParams &params)
 converts text string into Z-facing symbol mesh
 
MRVIEWER_API void reserveKeyEvent (ImGuiKey key)
 call if you want ImGui to take event if this key is pressed (to prevent scene reaction on key press)
 
void AppendHistory (std::shared_ptr< HistoryAction > action)
 Appends given history action to viewer's global history store.
 
template<class HistoryActionType , typename... Args>
void AppendHistory (Args &&... args)
 Constructs history action from given arguments, than appends it to viewer's global history store.
 
MRVIEWER_API void FilterHistoryByCondition (HistoryStackFilter filteringCondition, bool deepFiltering=true)
 
MRVIEWER_API Expected< std::string > GetClipboardText ()
 returns data in clipboard
 
MRVIEWER_API Expected< void > SetClipboardText (const std::string &text)
 sets data in clipboard
 
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={})
 This function creates shader and logs output.
 
MRVIEWER_API void destroyShader (GLuint id)
 Destroys shader program.
 
std::unique_ptr< IDragDropHandlergetDragDropHandler (GLFWwindow *window)
 
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 void openFolderDialogAsync (std::function< void(const std::filesystem::path &)> callback, 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={})
 returns empty path on cancel
 
MRVIEWER_API void saveFileDialogAsync (std::function< void(const std::filesystem::path &)> callback, const FileParameters &params={})
 
MRVIEWER_API Json::Value GetSystemInfoJson ()
 Accumulate system information in Json value.
 
MRVIEWER_API int getGlfwModPrimaryCtrl ()
 Returns modifier id of SUPER on mac or wasm on macos, or CTRL otherwise.
 
MRVIEWER_API const char * getSuperModName ()
 
MRVIEWER_API const char * getAltModName ()
 
int loadGL ()
 Load OpenGL and its extensions.
 
int getMSAAPow (int msaa)
 
MRVIEWER_API void setTextureWrapType (WrapType wrapType, GLenum type=GL_TEXTURE_2D)
 
MRVIEWER_API void setTextureFilterType (FilterType filterType, GLenum type=GL_TEXTURE_2D)
 
MRVIEWER_API std::string getLinesVertexShader ()
 
MRVIEWER_API std::string getLinesFragmentShader (ShaderTransparencyMode mode)
 
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, ShaderTransparencyMode mode, bool msaaEnabled)
 
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 Expected< LoadedObjectmakeObjectTreeFromFolder (const std::filesystem::path &folder, bool dicomOnly, const ProgressCallback &callback={})
 load all supported files from given folder in new container object
 
MRVIEWER_API Expected< LoadedObjectmakeObjectTreeFromZip (const std::filesystem::path &zipPath, const ProgressCallback &callback={})
 load all supported files from given zip-archive in new container object
 
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)
 
MRVIEWER_API std::string getPointsVertexShader ()
 
MRVIEWER_API std::string getPointsFragmentShader (ShaderTransparencyMode mode)
 
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 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 void bindDepthPeelingTextures (GLuint shaderId, const TransparencyMode &tMode, GLenum startGLTextureIndex)
 helper function to bind depth and color buffers to given shader program
 
MRVIEWER_API void objectPreRenderSetup (const TransparencyMode &tMode, RenderModelPassMask desiredPass, bool deptTesting)
 
MRVIEWER_API void objectPostRenderSetup (const TransparencyMode &tMode, RenderModelPassMask desiredPass, bool deptTesting)
 
MRVIEWER_API Vector2i calcTextureRes (int bufferSize, int maxTextWidth)
 calc texture resolution, to fit MAX_TEXTURE_SIZE, and have minimal empty pixels
 
MRVIEWER_API void renderImGui (const Vector2i &resolution, const std::function< void()> &configureFunc, const std::function< void()> &drawFunc)
 
MRVIEWER_API const Vector2f & GetAvailableLineWidthRange ()
 Returns the range of line widths that are allowed by current renderer.
 
MRVIEWER_API Image renderToImage (const Vector2i &resolution, const std::optional< Color > &backgroundColor, const std::function< void(FramebufferData *framebuffer)> &drawFunc)
 
MRVIEWER_API RibbonConfig createRibbonConfigFromJson (const Json::Value &root)
 parse given json and setup RibbonConfig from it
 
MRVIEWER_API void applyRibbonConfig (const RibbonConfig &config)
 apply given config to the application
 
MRVIEWER_API void pushNotification (const RibbonNotification &notification)
 Checks if RibbonMenu is available, if it is - forwards notification to RibbonNotifier. Otherwise - calls showModal() function.
 
MRVIEWER_API Expected< void > saveObjectToFile (const Object &obj, const std::filesystem::path &filename, const SaveObjectSettings &settings={})
 save visual object (mesh, lines, points or voxels) to file
 
MRVIEWER_API std::vector< FlatTreegetFlatSubtrees (const std::vector< std::shared_ptr< Object > > &objs)
 
MRVIEWER_API void mergeSubtree (TypedFlatTree subtree)
 merge objects of same type in the object tree
 
MRVIEWER_API void mergeSubtree (std::shared_ptr< Object > rootObj)
 
MRVIEWER_API bool sceneReorderWithUndo (const SceneReorder &task)
 
MRVIEWER_API bool moveAllChildrenWithUndo (Object &oldParent, Object &newParent, const std::string &historyName="Move Children")
 
template<typename ObjectT >
std::string getNObjectsLine (unsigned n)
 
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)
 
MRVIEWER_API BitSet calculateSelectedPixelsInsidePolygon (const Contour2f &screenPoints)
 
MRVIEWER_API BitSet calculateSelectedPixelsNearPolygon (const Contour2f &screenPoints, float radiusPix)
 
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)
 these meshes can influence face visibility in onlyVisible=true mode
 
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, bool cornerMode=true)
 
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 (ShaderTransparencyMode transparencyMode)
 
MRVIEWER_API std::string getShaderMainBeginBlock (bool addDepthPeelSamplers)
 
MRVIEWER_API void showModal (const std::string &error, NotificationType type)
 Check if menu is available and if it is, shows modal window.
 
void showError (const std::string &error)
 
template<UnitEnum E>
const UnitToStringParams< E > & getDefaultUnitParams ()
 
template<UnitEnum E>
void setDefaultUnitParams (const UnitToStringParams< E > &newParams)
 Modifies the default parameters for converting a specific unit type to a string.
 
MRVIEWER_API std::string_view toString (DegreesMode mode)
 
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 std::string valueToString (T value, const VarUnitToStringParams &params)
 This overload lets you select the unit kind at runtime.
 
template<detail::Units::Scalar T>
MRVIEWER_API int guessPrecision (T value)
 Same but for vectors.
 
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)
 Same but for vectors.
 
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 >())
 
template<detail::Units::Scalar T>
MRVIEWER_API std::string valueToImGuiFormatString (T value, const VarUnitToStringParams &params)
 This overload lets you select the unit kind at runtime.
 
MRVIEWER_API int launchDefaultViewer (const Viewer::LaunchParams &params, const ViewerSetup &setup)
 starts default viewer with given params and setup
 
MRVIEWER_API ViewergetViewerInstance ()
 returns global instance of Viewer class
 
MRVIEWER_API void incrementForceRedrawFrames (int i=1, bool swapOnLastOnly=false)
 
ImVec2 position (const ViewportRectangle &rect)
 
ImVec2 size (const ViewportRectangle &rect)
 
template<typename T >
Vector4< T > toVec4 (const ViewportRectangle &rect)
 
MRVIEWER_API Mesh makeCornerControllerMesh (float size, float cornerRatio=0.2f)
 Makes cube mesh with specified face structure for each 3-rank corner, each 2-rank corner and each side:
.
 
MRVIEWER_API Mesh makeCornerControllerRotationArrowMesh (float size, const Vector2f &shift, bool ccw)
 Makes planar arrow mesh that will be used for controlling in plane rotation in corner near cube controller.
 
MRVIEWER_API VertUVCoords makeCornerControllerUVCoords (float cornerRatio=0.2f)
 Creates UV coordinates for makeCornerControllerMesh output mesh for texture like:
"Right"" Left "
" Top ""Bottom"
"Front"" Back ".
 
MRVIEWER_API Vector< MeshTexture, TextureId > loadCornerControllerTextures ()
 Loads 3 textures for corner controller: default, side hovered, corner hovered.
 
MRVIEWER_API const TexturePerFace & getCornerControllerTexureMap ()
 
MRVIEWER_API RegionId getCornerControllerRegionByFace (FaceId face)
 returns region id of corner controller by its face
 
MRVIEWER_API TexturePerFace getCornerControllerHoveredTextureMap (RegionId rId)
 returns textures map with region faces hovered
 
MRVIEWER_API void updateCurrentViewByControllerRegion (CornerControllerObject::PickedIds pickedId)
 setup camera for selected viewport by corner controller region
 
bool operator== (const SegmEndColors &a, const SegmEndColors &b)
 
bool operator== (const ViewportPointsWithColors &a, const ViewportPointsWithColors &b)
 
MRVIEWER_API void deserializeFromJson (const Json::Value &root, VisualObjectTagManager &manager)
 
MRVIEWER_API void serializeToJson (const VisualObjectTagManager &manager, Json::Value &root)
 
MRVIEWER_API std::string getTrivialVertexShader ()
 simple quad vertex shader
 
MRVIEWER_API std::string getVolumeFragmentShader ()
 shader with raytracing over volume
 
MRVIEWER_API std::string getVolumePickerFragmentShader ()
 shader with raytracing over volume
 
MRVIEWER_API Expected< Json::Value > parseResponse (const Json::Value &response)
 returns json value of text or error if response failed
 
OriginAndDimensions calcOriginAndDimensions (const Box3f &box, float voxelSize)
 computes origin and dimensions of voxel-grid to cover given 3D box with given spacing (voxelSize)
 
MRVOXELS_API float voxelizeAndComputeVolume (const std::vector< std::shared_ptr< Mesh > > &meshes, const AffineXf3f &xf, const Vector3f &voxelSize)
 
MRVOXELS_API size_t heapBytes (const FloatGrid &grid)
 returns the amount of heap memory occupied by grid
 
MRVOXELS_API FloatGrid resampled (const FloatGrid &grid, float voxelScale, ProgressCallback cb={})
 resample this grid to fit voxelScale
 
MRVOXELS_API FloatGrid resampled (const FloatGrid &grid, const Vector3f &voxelScale, ProgressCallback cb={})
 resample this grid to fit voxelScale
 
MRVOXELS_API FloatGrid cropped (const FloatGrid &grid, const Box3i &box, ProgressCallback cb={})
 returns cropped grid
 
MRVOXELS_API size_t countVoxelsWithValuePred (const FloatGrid &grid, const std::function< bool(float)> &pred)
 returns number of velxes in the grid with pred(value) == true
 
MRVOXELS_API size_t countVoxelsWithValueLess (const FloatGrid &grid, float value)
 returns number of voxels in the grid with value less than given
 
MRVOXELS_API size_t countVoxelsWithValueGreater (const FloatGrid &grid, float value)
 returns number of voxels in the grid with value greater than given
 
MRVOXELS_API void gaussianFilter (FloatGrid &grid, int width, int iters, ProgressCallback cb={})
 returns grid with gaussian filter applied
 
MRVOXELS_API FloatGrid gaussianFiltered (const FloatGrid &grid, int width, int iters, ProgressCallback cb={})
 
MRVOXELS_API float getValue (const FloatGrid &grid, const Vector3i &p)
 returns the value at given voxel
 
MRVOXELS_API void setValue (FloatGrid &grid, const Vector3i &p, float value)
 
MRVOXELS_API void setValue (FloatGrid &grid, const VoxelBitSet &region, float value)
 
MRVOXELS_API Box3i findActiveBounds (const FloatGrid &grid)
 
MRVOXELS_API void setValues (FloatGrid &grid, const VoxelBitSet &region, const std::vector< float > &values)
 
MRVOXELS_API void setLevelSetType (FloatGrid &grid)
 sets type of this grid as LEVEL SET (for normal flipping)
 
MRVOXELS_API FloatGrid operator+= (FloatGrid &a, FloatGrid &&b)
 
MRVOXELS_API FloatGrid operator-= (FloatGrid &a, FloatGrid &&b)
 
MRVOXELS_API FloatGrid operator*= (FloatGrid &a, FloatGrid &&b)
 
MRVOXELS_API FloatGrid operator+ (const FloatGrid &a, const FloatGrid &b)
 
MRVOXELS_API FloatGrid operator- (const FloatGrid &a, const FloatGrid &b)
 
MRVOXELS_API FloatGrid operator* (const FloatGrid &a, const FloatGrid &b)
 
MRVOXELS_API Expected< MeshmarchingCubes (const SimpleVolume &volume, const MarchingCubesParams &params={})
 makes Mesh from SimpleVolume with given settings using Marching Cubes algorithm
 
MRVOXELS_API Expected< TriMeshmarchingCubesAsTriMesh (const SimpleVolume &volume, const MarchingCubesParams &params={})
 
MRVOXELS_API Expected< MeshmarchingCubes (const SimpleVolumeMinMax &volume, const MarchingCubesParams &params={})
 makes Mesh from SimpleVolumeMinMax with given settings using Marching Cubes algorithm
 
MRVOXELS_API Expected< TriMeshmarchingCubesAsTriMesh (const SimpleVolumeMinMax &volume, const MarchingCubesParams &params={})
 
MRVOXELS_API Expected< MeshmarchingCubes (const VdbVolume &volume, const MarchingCubesParams &params={})
 makes Mesh from VdbVolume with given settings using Marching Cubes algorithm
 
MRVOXELS_API Expected< TriMeshmarchingCubesAsTriMesh (const VdbVolume &volume, const MarchingCubesParams &params={})
 
MRVOXELS_API Expected< MeshmarchingCubes (const FunctionVolume &volume, const MarchingCubesParams &params={})
 makes Mesh from FunctionVolume with given settings using Marching Cubes algorithm
 
MRVOXELS_API Expected< TriMeshmarchingCubesAsTriMesh (const FunctionVolume &volume, const MarchingCubesParams &params={})
 
MRVOXELS_API Expected< MeshmarchingCubes (const SimpleBinaryVolume &volume, const MarchingCubesParams &params={})
 makes Mesh from SimpleBinaryVolume with given settings using Marching Cubes algorithm
 
MRVOXELS_API Expected< TriMeshmarchingCubesAsTriMesh (const SimpleBinaryVolume &volume, const MarchingCubesParams &params={})
 
MRVOXELS_API Expected< SimpleVolumeMinMax > meshToDistanceVolume (const MeshPart &mp, const MeshToDistanceVolumeParams &params)
 makes SimpleVolume filled with (signed or unsigned) distances from Mesh with given settings
 
MRVOXELS_API FunctionVolume meshToDistanceFunctionVolume (const MeshPart &mp, const MeshToDistanceVolumeParams &params)
 makes FunctionVolume representing (signed or unsigned) distances from Mesh with given settings
 
MRVOXELS_API Expected< SimpleBinaryVolume > makeCloseToMeshVolume (const MeshPart &mp, const CloseToMeshVolumeParams &params)
 makes a binary volume with close-to-surface predicate values according to the given parameters
 
MRVOXELS_API Expected< SimpleVolumeMinMax > meshRegionToIndicatorVolume (const Mesh &mesh, const FaceBitSet &region, float offset, const DistanceVolumeParams &params)
 
MRVOXELS_API Expected< std::array< SimpleVolumeMinMax, 3 > > meshToDirectionVolume (const MeshToDirectionVolumeParams &params)
 
template<typename VolumeType = VdbVolume>
MRVOXELS_API Expected< VertBitSet > moveMeshToVoxelMaxDeriv (Mesh &mesh, const AffineXf3f &meshXf, const VolumeType &volume, const AffineXf3f &volumeXf, const MoveMeshToVoxelMaxDerivSettings &settings, ProgressCallback callback={})
 
template MRVOXELS_API Expected< VertBitSet > moveMeshToVoxelMaxDeriv< VdbVolume > (Mesh &mesh, const AffineXf3f &meshXf, const VdbVolume &volume, const AffineXf3f &volumeXf, const MoveMeshToVoxelMaxDerivSettings &settings, ProgressCallback callback)
 
template MRVOXELS_API Expected< VertBitSet > moveMeshToVoxelMaxDeriv< SimpleVolumeMinMax > (Mesh &mesh, const AffineXf3f &meshXf, const SimpleVolumeMinMax &volume, const AffineXf3f &volumeXf, const MoveMeshToVoxelMaxDerivSettings &settings, ProgressCallback callback)
 
template MRVOXELS_API Expected< VertBitSet > moveMeshToVoxelMaxDeriv< FunctionVolume > (Mesh &mesh, const AffineXf3f &meshXf, const FunctionVolume &volume, const AffineXf3f &volumeXf, const MoveMeshToVoxelMaxDerivSettings &settings, ProgressCallback callback)
 
MRVOXELS_API const std::string & defaultSerializeVoxelsFormat ()
 
MRVOXELS_API void setDefaultSerializeVoxelsFormat (std::string newFormat)
 
MRVOXELS_API float suggestVoxelSize (const MeshPart &mp, float approxNumVoxels)
 computes size of a cubical voxel to get approximately given number of voxels during rasterization
 
MRVOXELS_API Expected< MeshoffsetMesh (const MeshPart &mp, float offset, const OffsetParameters &params={})
 
MRVOXELS_API Expected< MeshdoubleOffsetMesh (const MeshPart &mp, float offsetA, float offsetB, const OffsetParameters &params={})
 
MRVOXELS_API Expected< MeshmcOffsetMesh (const MeshPart &mp, float offset, const OffsetParameters &params={}, Vector< VoxelId, FaceId > *outMap=nullptr)
 
MRVOXELS_API Expected< MeshmcShellMeshRegion (const Mesh &mesh, const FaceBitSet &region, float offset, const BaseShellParameters &params, Vector< VoxelId, FaceId > *outMap=nullptr)
 
MRVOXELS_API Expected< MeshsharpOffsetMesh (const MeshPart &mp, float offset, const SharpOffsetParameters &params={})
 
MRVOXELS_API Expected< MeshgeneralOffsetMesh (const MeshPart &mp, float offset, const GeneralOffsetParameters &params)
 
MRVOXELS_API Expected< MeshthickenMesh (const Mesh &mesh, float offset, const GeneralOffsetParameters &params={}, const PartMapping &map={})
 mapping between original mesh and thicken result
 
MRVOXELS_API Expected< MeshoffsetOneDirection (const MeshPart &mp, float offset, const GeneralOffsetParameters &params={})
 
MRVOXELS_API Expected< MeshoffsetPolyline (const Polyline3 &polyline, float offset, const OffsetParameters &params={})
 
MRVOXELS_API void translateToZero (openvdb::FloatGrid &grid)
 
template<typename GridT >
RangeSize calculateRangeSize (const GridT &grid)
 
MRVOXELS_API Expected< MeshpartialOffsetMesh (const MeshPart &mp, float offset, const GeneralOffsetParameters &params={})
 
MRVOXELS_API Expected< SimpleVolume > pointsToDistanceVolume (const PointCloud &cloud, const PointsToDistanceVolumeParams &params)
 makes SimpleVolume filled with signed distances to points with normals
 
MRVOXELS_API FunctionVolume pointsToDistanceFunctionVolume (const PointCloud &cloud, const PointsToDistanceVolumeParams &params)
 makes FunctionVolume representing signed distances to points with normals
 
MRVOXELS_API Expected< VertColors > calcAvgColors (const PointCloud &cloud, const VertColors &colors, const VertCoords &tgtPoints, const VertBitSet &tgtVerts, float sigma, const ProgressCallback &cb={})
 
MRVOXELS_API Expected< MeshpointsToMeshFusion (const PointCloud &cloud, const PointsToMeshParameters &params)
 
MRVOXELS_API Expected< FloatGridpolylineToDistanceField (const Polyline3 &polyline, const PolylineToDistanceVolumeParams &params)
 convert polyline to voxels distance field
 
MRVOXELS_API Expected< VdbVolume > polylineToVdbVolume (const Polyline3 &polyline, const PolylineToDistanceVolumeParams &params)
 convert polyline to VDB volume
 
MRVOXELS_API Expected< SimpleVolume > polylineToSimpleVolume (const Polyline3 &polyline, const PolylineToVolumeParams &params)
 convert polyline to simple volume
 
MRVOXELS_API Expected< FunctionVolume > polylineToFunctionVolume (const Polyline3 &polyline, const PolylineToVolumeParams &params)
 convert polyline to function volume
 
MRVOXELS_API Expected< MeshrebuildMesh (const MeshPart &mp, const RebuildMeshSettings &settings)
 
MRVOXELS_API std::function< float(const char *)> getTypeConverter (ScalarType scalarType, Uint64 range, Int64 min)
 
template<typename F >
std::invoke_result_t< F, int > visitScalarType (F &&f, ScalarType scalarType, const char *c)
 More general template to pass a single value of specified format scalarType to a generic function f.
 
MRVOXELS_API void sortScansByOrder (std::vector< std::filesystem::path > &scans, std::vector< SliceInfo > &zOrder)
 Sort scan files in given vector by given slice information.
 
MRVOXELS_API void putScanFileNameInZ (const std::vector< std::filesystem::path > &scans, std::vector< SliceInfo > &zOrder)
 Read layer heights from given scan file names.
 
MRVOXELS_API void sortScanFilesByName (std::vector< std::filesystem::path > &scans)
 Sort scan files in given vector by names (respect numbers in it)
 
MRVOXELS_API Box3f computeWorkArea (const Polyline3 &toolpath, const MeshPart &tool)
 Compute bounding box for swept volume for given tool and toolpath.
 
MRVOXELS_API Box3i computeGridBox (const Box3f &workArea, float voxelSize)
 Compute required voxel volume's dimensions for given work area.
 
MRVOXELS_API Expected< MeshcomputeSweptVolumeWithMeshMovement (const ComputeSweptVolumeParameters &params)
 
MRVOXELS_API Expected< MeshcomputeSweptVolumeWithDistanceVolume (const ComputeSweptVolumeParameters &params)
 
MRVOXELS_API Expected< MeshcomputeSweptVolumeWithCustomToolDistance (IComputeToolDistance &comp, const ComputeSweptVolumeParameters &params)
 
MRVOXELS_API Expected< std::array< SimpleVolumeMinMax, 3 > > teethMaskToDirectionVolume (const VdbVolume &volume, const std::vector< int > &additionalIds={})
 A shortcut for TeethMaskToDirectionVolumeConvertor::create and TeethMaskToDirectionVolumeConvertor::convertAll.
 
MRVOXELS_API Expected< ToolPathResultconstantZToolPath (const MeshPart &mp, const ToolPathParams &params)
 
MRVOXELS_API Expected< ToolPathResultlacingToolPath (const MeshPart &mp, const ToolPathParams &params, Axis cutDirection)
 Slices are built along the axis defined by cutDirection argument (can be Axis::X or Axis::Y)
 
MRVOXELS_API Expected< ToolPathResultconstantCuspToolPath (const MeshPart &mp, const ConstantCuspParams &params)
 
MRVOXELS_API std::shared_ptr< ObjectGcodeexportToolPathToGCode (const std::vector< GCommand > &commands)
 generates G-Code for milling tool
 
MRVOXELS_API Expected< void > interpolateLines (std::vector< GCommand > &commands, const LineInterpolationParams &params, Axis axis)
 interpolates several points lying on the same straight line with one move
 
MRVOXELS_API Expected< void > interpolateArcs (std::vector< GCommand > &commands, const ArcInterpolationParams &params, Axis axis)
 interpolates given path with arcs
 
MRVOXELS_API FaceBitSet smoothSelection (Mesh &mesh, const FaceBitSet &region, float expandOffset, float shrinkOffset)
 
MRVOXELS_API FloatGrid meshToLevelSet (const MeshPart &mp, const AffineXf3f &xf, const Vector3f &voxelSize, float surfaceOffset=3, ProgressCallback cb={})
 
MRVOXELS_API FloatGrid meshToDistanceField (const MeshPart &mp, const AffineXf3f &xf, const Vector3f &voxelSize, float surfaceOffset=3, ProgressCallback cb={})
 
MRVOXELS_API void evalGridMinMax (const FloatGrid &grid, float &min, float &max)
 eval min max value from FloatGrid
 
MRVOXELS_API Expected< VdbVolume > meshToDistanceVdbVolume (const MeshPart &mp, const MeshToVolumeParams &params={})
 
MRVOXELS_API Expected< VdbVolume > meshToVolume (const MeshPart &mp, const MeshToVolumeParams &params={})
 
MRVOXELS_API VdbVolume floatGridToVdbVolume (FloatGrid grid)
 fills VdbVolume data from FloatGrid (does not fill voxels size, cause we expect it outside)
 
MRVOXELS_API FloatGrid simpleVolumeToDenseGrid (const SimpleVolume &simpleVolume, float background=0.0f, ProgressCallback cb={})
 
MRVOXELS_API VdbVolume simpleVolumeToVdbVolume (const SimpleVolumeMinMax &simpleVolume, ProgressCallback cb={})
 set the simpleVolume.min as the background value
 
MRVOXELS_API VdbVolume functionVolumeToVdbVolume (const FunctionVolume &functoinVolume, ProgressCallback cb={})
 
template<typename AccessorOrGrid >
MRVOXELS_API void putSimpleVolumeInDenseGrid (AccessorOrGrid &gridAccessor, const Vector3i &minCoord, const SimpleVolume &simpleVolume, ProgressCallback cb={})
 Copy given simpleVolume into the grid, starting at minCoord Instantiated for AccessorOrGrid in { openvdb::FloatGrid::Accessor, FloatGrid, openvdb::FloatGrid }. The template is used to not include openvdb's mess into this header (forward declaring classes in openvdb is also non-trivial). When used with a Grid, multithreaded implementation of copying is used (so the function is not thread safe). When used with an Accessor, this function could be called from different threads on the same volume (provided that accessors are different, of course).
 
MRVOXELS_API Expected< SimpleVolumeMinMax > vdbVolumeToSimpleVolume (const VdbVolume &vdbVolume, const Box3i &activeBox=Box3i(), ProgressCallback cb={})
 
MRVOXELS_API Expected< SimpleVolumeMinMax > vdbVolumeToSimpleVolumeNorm (const VdbVolume &vdbVolume, const Box3i &activeBox=Box3i(), std::optional< MinMaxf > sourceScale={}, ProgressCallback cb={})
 
MRVOXELS_API Expected< SimpleVolumeMinMaxU16 > vdbVolumeToSimpleVolumeU16 (const VdbVolume &vdbVolume, const Box3i &activeBox=Box3i(), std::optional< MinMaxf > sourceScale={}, ProgressCallback cb={})
 
MRVOXELS_API Expected< MeshgridToMesh (const FloatGrid &grid, const GridToMeshSettings &settings)
 converts OpenVDB Grid into mesh using Dual Marching Cubes algorithm
 
MRVOXELS_API Expected< MeshgridToMesh (FloatGrid &&grid, const GridToMeshSettings &settings)
 
MRVOXELS_API Expected< void > makeSignedByWindingNumber (FloatGrid &grid, const Vector3f &voxelSize, const Mesh &refMesh, const MakeSignedByWindingNumberSettings &settings)
 set signs for unsigned distance field grid using generalized winding number computed at voxel grid point from refMesh
 
MRVOXELS_API Expected< MeshdoubleOffsetVdb (const MeshPart &mp, const DoubleOffsetSettings &settings)
 
MR_BIND_IGNORE openvdb::FloatGrid & ovdb (OpenVdbFloatGrid &v)
 
MR_BIND_IGNORE const openvdb::FloatGrid & ovdb (const OpenVdbFloatGrid &v)
 
MR_BIND_IGNORE FloatGrid MakeFloatGrid (const FloatGrid &)=delete
 prohibit unnecessary conversion
 
MR_BIND_IGNORE FloatGrid MakeFloatGrid (openvdb::FloatGrid::Ptr &&p)
 makes MR::FloatGrid shared pointer taking the contents of the input pointer
 
MR_BIND_IGNORE Vector3i fromVdb (const openvdb::Coord &v)
 
MR_BIND_IGNORE openvdb::Coord toVdb (const Vector3i &v)
 
MR_BIND_IGNORE Box3i fromVdbBox (const openvdb::CoordBBox &box)
 
MR_BIND_IGNORE openvdb::CoordBBox toVdbBox (const Box3i &box)
 
MR_BIND_IGNORE openvdb::CoordBBox toVdbBox (const Vector3i &dims)
 
template<typename Accessor >
SimpleVolumeMinMax resampleVolumeByInterpolation (const typename Accessor::VolumeType &volume, const Accessor &accessor, const Vector3f &newVoxelSize)
 sample function that resamples the voxel volume using interpolating accessor
 
MRVOXELS_API Expected< MR::MeshmeshFromVoxelsMask (const VdbVolume &volume, const VoxelBitSet &mask)
 Creates mesh from voxels mask.
 
MRVOXELS_API Expected< MR::MeshsegmentVolume (const VdbVolume &volume, const std::vector< std::pair< Vector3f, Vector3f > > &pairs, const VolumeSegmentationParameters &params=VolumeSegmentationParameters())
 Simple segment volume.
 
MRVOXELS_API Expected< std::vector< Mesh > > segmentVoxelMaskToInstances (const VdbVolume &mask, size_t minSize=100, ProgressCallback cb={})
 
MRVOXELS_API VdbVolume voxelFilter (const VdbVolume &volume, VoxelFilterType type, int width)
 
MRVOXELS_API Expected< VoxelBitSet > 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.
 
MRVOXELS_API VoxelsMetric voxelsExponentMetric (const VdbVolume &voxels, const VoxelMetricParameters &parameters, float modifier=-1.0f)
 e^(modifier*(dens1+dens2))
 
MRVOXELS_API VoxelsMetric voxelsSumDiffsMetric (const VdbVolume &voxels, const VoxelMetricParameters &parameters)
 sum of dense differences with start and stop voxels
 
MRVOXELS_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
 
MRVOXELS_API TransformVdbVolumeResult transformVdbVolume (const VdbVolume &volume, const AffineXf3f &xf, bool fixBox=false, const Box3f &box={})
 
MRVOXELS_API bool voxelsApplyTransform (ObjectVoxels &obj, const AffineXf3f &xf, bool fixBox)
 
template<typename Volume >
Expected< void > 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< MeshvolumeToMeshByParts (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
 
MRVOXELS_API Expected< std::vector< std::shared_ptr< ObjectVoxels > > > makeObjectVoxelsFromFile (const std::filesystem::path &file, ProgressCallback callback={})
 loads voxels from given file in new object
 
MRVOXELS_API Expected< LoadedObjectsmakeObjectFromVoxelsFile (const std::filesystem::path &file, const ProgressCallback &callback={})
 
MRVOXELS_API Expected< void > saveObjectVoxelsToFile (const Object &object, const std::filesystem::path &path, const ObjectSave::Settings &settings)
 namespace VoxelsSave
 
MRVOXELS_API Expected< SimpleVolumeMinMax > functionVolumeToSimpleVolume (const FunctionVolume &volume, const ProgressCallback &callback={})
 converts function volume into simple volume
 
MRMESH_API EdgeMetric identityMetric ()
 metric returning 1 for every edge
 
MRMESH_API EdgeMetric edgeLengthMetric (const Mesh &mesh)
 
MRMESH_API EdgeMetric edgeLengthMetric (const MeshTopology &topology, const VertCoords &points)
 
MRMESH_API EdgeMetric discreteAbsMeanCurvatureMetric (const Mesh &mesh)
 
MRMESH_API EdgeMetric discreteAbsMeanCurvatureMetric (const MeshTopology &topology, const VertCoords &points)
 
MRMESH_API EdgeMetric discreteMinusAbsMeanCurvatureMetric (const Mesh &mesh)
 
MRMESH_API EdgeMetric discreteMinusAbsMeanCurvatureMetric (const MeshTopology &topology, const VertCoords &points)
 
MRMESH_API EdgeMetric edgeCurvMetric (const Mesh &mesh, float angleSinFactor=2, float angleSinForBoundary=0)
 
MRMESH_API EdgeMetric edgeCurvMetric (const MeshTopology &topology, const VertCoords &points, float angleSinFactor=2, float angleSinForBoundary=0)
 
MRMESH_API EdgeMetric edgeAbsCurvMetric (const Mesh &mesh, float angleSinFactor=2, float angleSinForBoundary=0)
 
MRMESH_API EdgeMetric edgeAbsCurvMetric (const MeshTopology &topology, const VertCoords &points, float angleSinFactor=2, float angleSinForBoundary=0)
 
MRMESH_API EdgeMetric edgeTableSymMetric (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)
 returns true if every next edge starts where previous edge ends, and start vertex coincides with finish vertex
 
MRMESH_API std::vector< EdgeLoop > splitOnSimpleLoops (const MeshTopology &topology, std::vector< EdgeLoop > &&loops)
 given a number of edge loops, splits every loop that passes via a vertex more than once on smaller loops without self-intersections
 
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< VertId > getVertexOrdering (const MeshTopology &topology, VertBitSet region)
 returns all vertices from given region ordered in each connected component in breadth-first way
 
MRMESH_API std::vector< EdgeLoop > extractClosedLoops (const MeshTopology &topology, EdgeBitSet &edges)
 finds all closed loops from given edges and removes them from edges
 
MRMESH_API std::vector< EdgeLoop > extractClosedLoops (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 dilateRegion (const MeshTopology &topology, const VertCoords &points, FaceBitSet &region, float dilation, ProgressCallback callback={})
 
MRMESH_API bool dilateRegion (const MeshTopology &topology, const VertCoords &points, VertBitSet &region, float dilation, ProgressCallback callback={})
 
MRMESH_API bool dilateRegion (const MeshTopology &topology, const VertCoords &points, 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 bool erodeRegion (const MeshTopology &topology, const VertCoords &points, FaceBitSet &region, float dilation, ProgressCallback callback={})
 
MRMESH_API bool erodeRegion (const MeshTopology &topology, const VertCoords &points, VertBitSet &region, float dilation, ProgressCallback callback={})
 
MRMESH_API bool erodeRegion (const MeshTopology &topology, const VertCoords &points, 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 getContourPlaneIntersections (const Contour3f &path, const Plane3f &plane, std::vector< Vector3f > *outIntersections=nullptr)
 finds all intersection points between given contour 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< LoadedObjectMeshmakeObjectMeshFromFile (const std::filesystem::path &file, const ProgressCallback &cb={})
 loads mesh from given file in new object
 
MRMESH_API Expected< LoadedObjectmakeObjectFromMeshFile (const std::filesystem::path &file, const ProgressCallback &cb={}, bool returnOnlyMesh=false)
 loads data from given file and makes either ObjectMesh, ObjectLines or ObjectPoints (if the file has points or edges but not faces)
 
MRMESH_API Expected< ObjectLinesmakeObjectLinesFromFile (const std::filesystem::path &file, ProgressCallback callback={})
 loads lines from given file in new object
 
MRMESH_API Expected< ObjectPointsmakeObjectPointsFromFile (const std::filesystem::path &file, ProgressCallback callback={})
 loads points from given file in new object
 
MRMESH_API Expected< ObjectDistanceMapmakeObjectDistanceMapFromFile (const std::filesystem::path &file, ProgressCallback callback={})
 loads distance map from given file in new object
 
MRMESH_API Expected< ObjectGcodemakeObjectGcodeFromFile (const std::filesystem::path &file, ProgressCallback callback={})
 loads gcode from given file in new object
 
MRMESH_API Expected< LoadedObjectsloadObjectFromFile (const std::filesystem::path &filename, const ProgressCallback &callback={})
 load all objects (or any type: mesh, lines, points, voxels or scene) from file
 
MRMESH_API bool isSupportedFileInSubfolders (const std::filesystem::path &folder)
 check if there are any supported files folder and subfolders
 
MRMESH_API Expected< LoadedObjectloadSceneFromAnySupportedFormat (const std::filesystem::path &path, const ProgressCallback &callback={})
 tries to load scene from every format listed in SceneFormatFilters
 
MRMESH_API Expected< LoadedObjectdeserializeObjectTree (const std::filesystem::path &path, const FolderCallback &postDecompress={}, const ProgressCallback &progressCb={})
 loads objects tree from given scene file (zip/mru)
 
MRMESH_API Expected< LoadedObjectdeserializeObjectTreeFromFolder (const std::filesystem::path &folder, const ProgressCallback &progressCb={})
 loads objects tree from given scene folder
 
MRMESH_API IOFilters getAllFilters ()
 returns filters for all supported file formats for all types of objects
 
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>
MR_BIND_IGNORE 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>
MR_BIND_IGNORE std::vector< std::shared_ptr< ObjectT > > getTopmostVisibleObjects (Object &root, const ObjectSelectivityType &type=ObjectSelectivityType::Selectable)
 
template<typename ObjectT = Object>
std::vector< std::shared_ptr< ObjectT > > getTopmostObjects (Object *root, const ObjectSelectivityType &type=ObjectSelectivityType::Selectable, bool visibilityCheck=false)
 Returns all topmost objects of given type (if an object is returned, its children are not) excluding root.
 
template<typename ObjectT = Object>
MR_BIND_IGNORE std::vector< std::shared_ptr< ObjectT > > getTopmostObjects (Object &root, const ObjectSelectivityType &type=ObjectSelectivityType::Selectable, bool visibilityCheck=false)
 
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>
MR_BIND_IGNORE std::shared_ptr< ObjectT > getDepthFirstObject (Object &root, const ObjectSelectivityType &type)
 
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

MRMESH_API const IOFilters AllFilter
 
constexpr float cQuietNan = std::numeric_limits<float>::quiet_NaN()
 
constexpr int cQuietNanBits = std::bit_cast< int >( cQuietNan )
 
MRMESH_API const double BadTriangulationMetric
 
constexpr CmpOld cmpOld
 
constexpr SetNew setNew
 
MRMESH_API Signal< void(const std::string &)> TelemetrySignal
 activate this signal if you want to add some string in telemetry
 
constexpr Vector3i neiPosDelta [OutEdgeCount]
 
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 cSeparatorIndentMultiplier = 0.67f
 
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 cMiddleFontSize = 12
 
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
 
constexpr int sDefaultGroupState = 0
 
const std::string cDefaultMultiViewportKey = "defaultMultiViewport"
 key for getting/satting default state for multi viewport from the config
 
struct MRVOXELS_CLASS OpenVdbFloatGrid
 
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
 
bool smaller (const PreciseVertCoord &l, const PreciseVertCoord &r)
 
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)
 
MRMESH_API bool ccw (const PreciseVertCoords2 *vs)
 
MRMESH_API bool smaller2 (const std::array< PreciseVertCoords2, 4 > &vs)
 
MRMESH_API bool orientParaboloid3d (const Vector2i &a, const Vector2i &b, const Vector2i &c)
 
bool orientParaboloid3d (const Vector2i &a, const Vector2i &b, const Vector2i &c, const Vector2i &d)
 
MRMESH_API bool inCircle (const std::array< PreciseVertCoords2, 4 > &vs)
 return true if 4th point in array lays inside circumcircle of first 3 points based triangle
 
MRMESH_API bool inCircle (const PreciseVertCoords2 *vs)
 
MRMESH_API SegmentSegmentIntersectResult doSegmentSegmentIntersect (const std::array< PreciseVertCoords2, 4 > &vs)
 
MRMESH_API bool segmentIntersectionOrder (const std::array< PreciseVertCoords2, 6 > &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)
 
using ConvertToIntVector = std::function<Vector3i( const Vector3f& )>
 float-to-int coordinate converter
 
using ConvertToFloatVector = std::function<Vector3f( const Vector3i& )>
 int-to-float coordinate converter
 
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 bool segmentIntersectionOrder (const std::array< PreciseVertCoords, 8 > &vs)
 
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 std::optional< Vector3i > findTwoSegmentsIntersection (const Vector3i &ai, const Vector3i &bi, const Vector3i &ci, const Vector3i &di)
 
MRMESH_API Vector3f findTriangleSegmentIntersectionPrecise (const Vector3f &a, const Vector3f &b, const Vector3f &c, const Vector3f &d, const Vector3f &e, CoordinateConverters converters)
 

Detailed Description

only for bindings generation

this header includes the whole OpenVDB, so please include it from .cpp files only

this is a lightweight header unlike MRVDBFloatGrid.h

This is lightweight header, pleas include it instead of "MRViewer.h" whenever possible.

Read the manual at: docs/measurement_units.md.

TODO move it in MRRibbonFontManager.cpp.

const Contours3f& contours = {}

triangle-related mathematical functions are here

not _WIN32

To fix attribute declaration must precede definition on Sphere.

#pragma warning: there is no warning number

for template implementation:

distance queries involving two meshes, please see MRMeshDistance.h for queries to one mesh only

distance queries to one mesh only, please see MRMeshMeshDistance.h for queries involving two meshes

based on https:/// github.com/TartanLlama/function_ref

https:/// www.geometrictools.com/Documentation/LeastSquaresFitting.pdf

Color and DIRTY_VERTS_COLORMAP.

This file exists for testing some cuda features.

Only strictly necessary for the bindings (to make MR::MeshIntersectionResult a complete type).

======================================================================== /// Copyright 2009-2020 Intel Corporation /// /// Licensed under the Apache License, Version 2.0 (the "License"); /// you may not use this file except in compliance with the License. /// You may obtain a copy of the License at /// /// http:/// www.apache.org/licenses/LICENSE-2.0 /// /// Unless required by applicable law or agreed to in writing, software /// distributed under the License is distributed on an "AS IS" BASIS, /// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. /// See the License for the specific language governing permissions and /// limitations under the License. /// ======================================================================== ///

Main idea is here: https:/// www.geometrictools.com/Documentation/LeastSquaresFitting.pdf pages 45-51 Below we will write out the function and Jacobian for minimization by the Levenberg-Marquard method and use it to clarify the apex of the cone and the direction of its main axis.

_WIN32

TODO:

  • create plugins/skeleton.h
  • pass time in draw function
  • remove Preview3D from comments
  • clean comments

Typedef Documentation

◆ MeshOnVoxelsFunction

using MR::MeshOnVoxelsFunction = MeshOnVoxelsT<Mesh, FunctionVolume>

◆ MeshOnVoxelsFunctionC

using MR::MeshOnVoxelsFunctionC = MeshOnVoxelsT<const Mesh, FunctionVolume>

◆ MeshOnVoxelsSimple

using MR::MeshOnVoxelsSimple = MeshOnVoxelsT<Mesh, SimpleVolumeMinMax>

◆ MeshOnVoxelsSimpleC

using MR::MeshOnVoxelsSimpleC = MeshOnVoxelsT<const Mesh, SimpleVolumeMinMax>

◆ MeshOnVoxelsVdb

using MR::MeshOnVoxelsVdb = MeshOnVoxelsT<Mesh, VdbVolume>

◆ MeshOnVoxelsVdbC

using MR::MeshOnVoxelsVdbC = MeshOnVoxelsT<const Mesh, VdbVolume>

◆ PolylineIntersectionCallback2

template<typename T >
using MR::PolylineIntersectionCallback2 = std::function<Processing(const EdgePoint & polylinePoint, T rayPos, T & rayStart, T & rayEnd)>

this callback is envoked for each encountered ray-polyline intersection; if it returns Processing::Stop, then the search immediately terminates; the callback can reduce rayEnd affecting the following search, but it shall not increase rayEnd

◆ PolylineIntersectionCallback2d

◆ PolylineIntersectionCallback2f

Enumeration Type Documentation

◆ DecimateStrategy

Defines the order of edge collapses inside Decimate algorithm.

Enumerator
MinimizeError 
ShortestEdgeFirst 

the next edge to collapse will be the one that introduced minimal error to the surface

the next edge to collapse will be the shortest one

Function Documentation

◆ addFileNameInError()

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

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

◆ 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)
nodiscard

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

◆ commonFilesName()

MRMESH_API std::string MR::commonFilesName ( const std::vector< std::filesystem::path > & files)
nodiscard

in case of empty vector, returns "Empty" in case of single input file.ext, returns ".EXT" in case of multiple files with same extension, returns ".EXTs" otherwise returns "Files"

◆ convertContoursTo2d()

template<typename From >
Contours2d MR::convertContoursTo2d ( const From & from)
nodiscard

◆ convertContoursTo2f()

template<typename From >
Contours2f MR::convertContoursTo2f ( const From & from)
nodiscard

◆ convertContoursTo3d()

template<typename From >
Contours3d MR::convertContoursTo3d ( const From & from)
nodiscard

◆ convertContoursTo3f()

template<typename From >
Contours3f MR::convertContoursTo3f ( const From & from)
nodiscard

◆ convertContourTo2d()

template<typename From >
Contour2d MR::convertContourTo2d ( const From & from)
nodiscard

◆ convertContourTo2f()

template<typename From >
Contour2f MR::convertContourTo2f ( const From & from)
nodiscard

Instantiate the templates when generating bindings.

◆ convertContourTo3d()

template<typename From >
Contour3d MR::convertContourTo3d ( const From & from)
nodiscard

◆ convertContourTo3f()

template<typename From >
Contour3f MR::convertContourTo3f ( const From & from)
nodiscard

◆ convertIntFloatAllVerts()

MRMESH_API void MR::convertIntFloatAllVerts ( Mesh & mesh,
const CoordinateConverters & conv )

converts all vertices of the mesh first in integer-coordinates, and then back in float-coordinates; this is necessary to avoid small self-intersections near newly introduced vertices on cut-contours; this actually sligntly moves only small perentage of vertices near x=0 or y=0 or z=0 planes, where float-precision is higher than int-precision; newly introduced vertices on cut-contours are also converted, but we expected that they remain unchanged due to idempotent property of the conversion

◆ decimateObjectMeshData()

MRMESH_API DecimateResult MR::decimateObjectMeshData ( ObjectMeshData & data,
const DecimateSettings & settings )

Performs mesh simplification with per-element attributes according to given settings; \detail settings.region must be null, and real simplification region will be data face selection (or whole mesh if no face selection)

◆ fillHolesWithExtraPoints()

MRMESH_API bool MR::fillHolesWithExtraPoints ( Mesh & mesh,
PointCloud & extraPoints,
const FillHolesWithExtraPointsParams & params = {},
const ProgressCallback & progressCb = {} )
nodiscard

fills the holes in the mesh by adding triangles to it with the vertices in existing boundary vertices or given extra points (in any combination)

Parameters
extraPointsmust have either properly oriented normals or no normals, and it will be temporary modified during the call
Returns
false if the operation was canceled or incorrect input

◆ findIntersectionContours()

MRMESH_API Contours3f MR::findIntersectionContours ( const Mesh & meshA,
const Mesh & meshB,
const AffineXf3f * rigidB2A = nullptr )

returns intersection contours of given meshes

◆ formatNoTrailingZeros()

MRMESH_API MR_BIND_IGNORE 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

◆ get() [1/18]

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

◆ get() [2/18]

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

◆ get() [3/18]

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

◆ get() [4/18]

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

◆ get() [5/18]

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

◆ get() [6/18]

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

◆ get() [7/18]

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

◆ get() [8/18]

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

◆ get() [9/18]

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

◆ get() [10/18]

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

◆ get() [11/18]

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

◆ get() [12/18]

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

◆ get() [13/18]

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

◆ get() [14/18]

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

◆ get() [15/18]

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

◆ get() [16/18]

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

◆ get() [17/18]

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

◆ get() [18/18]

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

◆ getAltModName()

MRVIEWER_API const char * MR::getAltModName ( )

Returns name of the ALT modifier depending on current environment: macos - Option wasm/mac - Option otherwise - Alt

◆ getCancelMessage()

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

Returns message showed when loading is canceled.

◆ getGlfwModPrimaryCtrl()

MRVIEWER_API int MR::getGlfwModPrimaryCtrl ( )

Returns modifier id of SUPER on mac or wasm on macos, or CTRL otherwise.

◆ getMSAAPow()

int MR::getMSAAPow ( int msaa)
inline

finds power of 2 that represents given msaa number ==log2(msaa)

◆ getSuperModName()

MRVIEWER_API const char * MR::getSuperModName ( )

Returns name of the SUPER modifier depending on current environment: windows - Win macos - Command wasm/mac - Command otherwise - Super

◆ hasProhibitedChars()

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

returns true if line contains at least one character (c) for which isProhibitedChar(c)==true

◆ isProhibitedChar()

bool MR::isProhibitedChar ( char c)
inlinenodiscard

returns true if the given character is any of prohibited in filenames in any of OSes https:/// stackoverflow.com/q/1976007/7325599

◆ loadASCIIStl() [1/2]

MRMESH_API Expected< Mesh > MR::loadASCIIStl ( const std::filesystem::path & file,
const MeshLoadSettings & settings = {} )

loads mesh from file in textual .STL format

◆ loadASCIIStl() [2/2]

MRMESH_API Expected< Mesh > MR::loadASCIIStl ( std::istream & in,
const MeshLoadSettings & settings = {} )

loads mesh from stream in textual .STL format

◆ loadBinaryStl() [1/2]

MRMESH_API Expected< Mesh > MR::loadBinaryStl ( const std::filesystem::path & file,
const MeshLoadSettings & settings = {} )

loads mesh from file in binary .STL format

◆ loadBinaryStl() [2/2]

MRMESH_API Expected< Mesh > MR::loadBinaryStl ( std::istream & in,
const MeshLoadSettings & settings = {} )

loads mesh from stream in binary .STL format; important on Windows: in stream must be open in binary mode

◆ loadDxf() [1/2]

MRMESH_API Expected< Mesh > MR::loadDxf ( const std::filesystem::path & path,
const MeshLoadSettings & settings = {} )

loads mesh from file in .DXF format;

◆ loadDxf() [2/2]

MRMESH_API Expected< Mesh > MR::loadDxf ( std::istream & in,
const MeshLoadSettings & settings = {} )

loads mesh from stream in .DXF format;

◆ loadGL()

int MR::loadGL ( )
inline

Load OpenGL and its extensions.

'type cast': unsafe conversion from 'GLFWglproc (__cdecl *)(const char *)' to 'GLADloadproc'

thread_local here - because we have two windows in two different threads (main window and splash) so we need to be sure that each thread loaded gl (it can be called from GUI threads only)

function is inline to be sure that each dll/so has its own instance of loadRes

◆ loadMesh() [1/2]

MRMESH_API Expected< Mesh > MR::loadMesh ( const std::filesystem::path & file,
const MeshLoadSettings & settings = {} )

loads mesh from file in the format detected from file extension

◆ loadMesh() [2/2]

MRMESH_API Expected< Mesh > MR::loadMesh ( std::istream & in,
const std::string & extension,
const MeshLoadSettings & settings = {} )

loads mesh from stream in the format detected from given extension-string (*.ext); important on Windows: in stream must be open in binary mode

◆ loadMrmesh() [1/2]

MRMESH_API Expected< Mesh > MR::loadMrmesh ( const std::filesystem::path & file,
const MeshLoadSettings & settings = {} )

new simpler names

loads mesh from file in internal MeshLib format

◆ loadMrmesh() [2/2]

MRMESH_API Expected< Mesh > MR::loadMrmesh ( std::istream & in,
const MeshLoadSettings & settings = {} )

loads mesh from stream in internal MeshLib format; important on Windows: in stream must be open in binary mode

◆ loadObj() [1/2]

MRMESH_API Expected< Mesh > MR::loadObj ( const std::filesystem::path & file,
const MeshLoadSettings & settings = {} )

loads mesh from file in .OBJ format

◆ loadObj() [2/2]

MRMESH_API Expected< Mesh > MR::loadObj ( std::istream & in,
const MeshLoadSettings & settings = {} )

loads mesh from stream in .OBJ format; important on Windows: in stream must be open in binary mode

◆ loadOff() [1/2]

MRMESH_API Expected< Mesh > MR::loadOff ( const std::filesystem::path & file,
const MeshLoadSettings & settings = {} )

loads mesh from file in .OFF format

◆ loadOff() [2/2]

MRMESH_API Expected< Mesh > MR::loadOff ( std::istream & in,
const MeshLoadSettings & settings = {} )

loads mesh from stream in .OFF format

◆ loadPly() [1/2]

MRMESH_API Expected< Mesh > MR::loadPly ( const std::filesystem::path & file,
const MeshLoadSettings & settings = {} )

loads mesh from file in .PLY format;

◆ loadPly() [2/2]

MRMESH_API Expected< Mesh > MR::loadPly ( std::istream & in,
const MeshLoadSettings & settings = {} )

loads mesh from stream in .PLY format; important on Windows: in stream must be open in binary mode

◆ loadStl() [1/2]

MRMESH_API Expected< Mesh > MR::loadStl ( const std::filesystem::path & file,
const MeshLoadSettings & settings = {} )

loads mesh from file in any .STL format: both binary and ASCII

◆ loadStl() [2/2]

MRMESH_API Expected< Mesh > MR::loadStl ( std::istream & in,
const MeshLoadSettings & settings = {} )

loads mesh from stream in any .STL format: both binary and ASCII; important on Windows: in stream must be open in binary mode

◆ makeDecimatedObjectMeshData()

MRMESH_API std::optional< ObjectMeshData > MR::makeDecimatedObjectMeshData ( const ObjectMesh & obj,
const DecimateSettings & settings,
DecimateResult * outRes = nullptr )
nodiscard

returns the data of decimated mesh given ObjectMesh (which remains unchanged) and decimation parameters

◆ makeObjectFromVoxelsFile()

MRVOXELS_API Expected< LoadedObjects > MR::makeObjectFromVoxelsFile ( const std::filesystem::path & file,
const ProgressCallback & callback = {} )

◆ makeObjectVoxelsFromFile()

MRVOXELS_API Expected< std::vector< std::shared_ptr< ObjectVoxels > > > MR::makeObjectVoxelsFromFile ( const std::filesystem::path & file,
ProgressCallback callback = {} )

loads voxels from given file in new object

◆ moveMeshToVoxelMaxDeriv< FunctionVolume >()

template MRVOXELS_API Expected< VertBitSet > MR::moveMeshToVoxelMaxDeriv< FunctionVolume > ( Mesh & mesh,
const AffineXf3f & meshXf,
const FunctionVolume & volume,
const AffineXf3f & volumeXf,
const MoveMeshToVoxelMaxDerivSettings & settings,
ProgressCallback callback )
extern

◆ moveMeshToVoxelMaxDeriv< SimpleVolumeMinMax >()

template MRVOXELS_API Expected< VertBitSet > MR::moveMeshToVoxelMaxDeriv< SimpleVolumeMinMax > ( Mesh & mesh,
const AffineXf3f & meshXf,
const SimpleVolumeMinMax & volume,
const AffineXf3f & volumeXf,
const MoveMeshToVoxelMaxDerivSettings & settings,
ProgressCallback callback )
extern

◆ moveMeshToVoxelMaxDeriv< VdbVolume >()

template MRVOXELS_API Expected< VertBitSet > MR::moveMeshToVoxelMaxDeriv< VdbVolume > ( Mesh & mesh,
const AffineXf3f & meshXf,
const VdbVolume & volume,
const AffineXf3f & volumeXf,
const MoveMeshToVoxelMaxDerivSettings & settings,
ProgressCallback callback )
extern

◆ 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 )
nodiscard

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 intersection to ray origin (line param=0) 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 )
nodiscard

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 intersection to ray origin (line param=0) or any intersection for better performance if !closestIntersect.

◆ rayPolylineIntersectAll() [1/2]

MRMESH_API void MR::rayPolylineIntersectAll ( const Polyline2 & polyline,
const Line2d & line,
const PolylineIntersectionCallback2d & callback,
double rayStart = 0.0,
double rayEnd = DBL_MAX,
const IntersectionPrecomputes2< double > * prec = nullptr )

Intersects 2D ray and polyline in double-precision. Reports all intersections via given callback with the tendency to do it from ray start to ray end, but without guarantee of exact order.

◆ rayPolylineIntersectAll() [2/2]

MRMESH_API void MR::rayPolylineIntersectAll ( const Polyline2 & polyline,
const Line2f & line,
const PolylineIntersectionCallback2f & callback,
float rayStart = 0.0f,
float rayEnd = FLT_MAX,
const IntersectionPrecomputes2< float > * prec = nullptr )

Intersects 2D ray and polyline in single-precision. Reports all intersections via given callback with the tendency to do it from ray start to ray end, but without guarantee of exact order.

◆ remesh()

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

Splits too long and eliminates too short edges from the mesh.

◆ replaceProhibitedChars()

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

replace all characters (c), where isProhibitedChar(c)==true, with replacement char

◆ roundToPrecision() [1/2]

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

returns given value rounded to given number of decimal digits

◆ roundToPrecision() [2/2]

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

returns given value rounded to given number of decimal digits

◆ saveObjectVoxelsToFile()

MRVOXELS_API Expected< void > MR::saveObjectVoxelsToFile ( const Object & object,
const std::filesystem::path & path,
const ObjectSave::Settings & settings )

namespace VoxelsSave

◆ selfBoolean()

MRMESH_API Expected< Mesh > MR::selfBoolean ( const Mesh & mesh)

performs boolean operation on mesh with itself, cutting simple intersections contours and flipping their connectivity this function is experimental and likely to change signature and/or behavior in future

◆ toLower()

MRMESH_API std::string MR::toLower ( std::string str)
nodiscard

return a copy of the string with all alphabetic ASCII characters replaced with upper-case variants

Variable Documentation

◆ AllFilter

MRMESH_API const IOFilters MR::AllFilter
extern