MeshLib
 
Loading...
Searching...
No Matches
MRMeshFwd.h File Reference
#include "config.h"
#include "MRMesh/MRCanonicalTypedefs.h"
#include <array>
#include <vector>
#include <string>
#include <parallel_hashmap/phmap_fwd_decl.h>
#include <functional>

Go to the source code of this file.

Classes

struct  MR::NoInit
 
struct  MR::overloaded< Ts >
 

Namespaces

namespace  MR
 
namespace  MR::MeshBuilder
 Building topologies by triangles.
 

Macros

#define MRMESH_API   __attribute__((visibility("default")))
 
#define MRMESH_CLASS   __attribute__((visibility("default")))
 
#define MRMESH_IF_HAVE_OPENVDB(...)   __VA_ARGS__
 
#define MR_UNREACHABLE   { assert( false ); return {}; }
 
#define MR_UNREACHABLE_NO_RETURN   assert( false );
 

Typedefs

using MR::EdgePath = std::vector<EdgeId>
 
using MR::EdgeLoop = std::vector<EdgeId>
 
template<typename T >
using MR::AffineXf3 = AffineXf<Vector3<T>>
 
template<typename T >
using MR::Sphere3 = Sphere<Vector3<T>>
 
template<typename T >
using MR::Line3 = Line<Vector3<T>>
 
template<typename T >
using MR::LineSegm3 = LineSegm<Vector3<T>>
 
template<typename T >
using MR::Contour2 = Contour<Vector2<T>>
 
template<typename T >
using MR::Contour3 = Contour<Vector3<T>>
 
using MR::Contour2d = Contour2<double>
 
using MR::Contour2f = Contour2<float>
 
using MR::Contour3d = Contour3<double>
 
using MR::Contour3f = Contour3<float>
 
template<typename V >
using MR::Contours = std::vector<Contour<V>>
 
template<typename T >
using MR::Contours2 = Contours<Vector2<T>>
 
template<typename T >
using MR::Contours3 = Contours<Vector3<T>>
 
using MR::Contours2d = Contours2<double>
 
using MR::Contours2f = Contours2<float>
 
using MR::Contours3d = Contours3<double>
 
using MR::Contours3f = Contours3<float>
 
template<typename T >
using MR::Box3 = Box<Vector3<T>>
 
template<typename T >
using MR::QuadraticForm3 = QuadraticForm<Vector3<T>>
 
using MR::Triangle3i = Triangle3<int>
 
using MR::Triangle3f = Triangle3<float>
 
using MR::Triangle3d = Triangle3<double>
 
using MR::MeshEdgePoint = EdgePoint
 
using MR::SurfacePath = std::vector<MeshEdgePoint>
 
using MR::SurfacePaths = std::vector<SurfacePath>
 
using MR::IsoLine = SurfacePath
 
using MR::IsoLines = SurfacePaths
 
using MR::PlaneSection = SurfacePath
 
using MR::PlaneSections = SurfacePaths
 
using MR::VertPair = std::pair<VertId, VertId>
 
using MR::FacePair = std::pair<FaceId, FaceId>
 
using MR::EdgePair = std::pair<EdgeId, EdgeId>
 
using MR::UndirectedEdgePair = std::pair<UndirectedEdgeId, UndirectedEdgeId>
 
using MR::UVCoord = Vector2f
 
using MR::ThreeVertIds = std::array<VertId, 3>
 three vertex ids describing a triangle topology
 
using MR::FacePredicate = std::function<bool( FaceId )>
 
using MR::EdgePredicate = std::function<bool( EdgeId )>
 
using MR::UndirectedEdgePredicate = std::function<bool( UndirectedEdgeId )>
 
using MR::PreCollapseCallback = std::function<bool( EdgeId edgeToCollapse, const Vector3f& newEdgeOrgPos )>
 
using MR::OnEdgeSplit = std::function<void( EdgeId e1, EdgeId e )>
 
using MR::VertMetric = std::function<float( VertId )>
 
using MR::FaceMetric = std::function<float( FaceId )>
 
using MR::EdgeMetric = std::function<float( EdgeId )>
 
using MR::UndirectedEdgeMetric = std::function<float( UndirectedEdgeId )>
 
template<typename T , typename Hash = phmap::priv::hash_default_hash<T>, typename Eq = phmap::priv::hash_default_eq<T>>
using MR::ParallelHashSet = phmap::parallel_flat_hash_set<T, Hash, Eq>
 
using MR::FaceHashSet = HashSet<FaceId>
 
using MR::VertHashSet = HashSet<VertId>
 
using MR::EdgeHashSet = HashSet<EdgeId>
 
template<typename K , typename V , typename Hash = phmap::priv::hash_default_hash<K>, typename Eq = phmap::priv::hash_default_eq<K>>
using MR::HashMap = phmap::flat_hash_map<K, V, Hash, Eq>
 
template<typename K , typename V , typename Hash = phmap::priv::hash_default_hash<K>, typename Eq = phmap::priv::hash_default_eq<K>>
using MR::ParallelHashMap = phmap::parallel_flat_hash_map<K, V, Hash, Eq>
 
using MR::FaceHashMap = HashMap<FaceId, FaceId>
 
using MR::VertHashMap = HashMap<VertId, VertId>
 
using MR::EdgeHashMap = HashMap<EdgeId, EdgeId>
 
using MR::UndirectedEdgeHashMap = HashMap<UndirectedEdgeId, UndirectedEdgeId>
 
using MR::WholeEdgeHashMap = HashMap<UndirectedEdgeId, EdgeId>
 mapping of whole edges: map[e]->f, map[e.sym()]->f.sym(), where only map[e] for even edges is stored
 
using MR::GcodeSource = std::vector<std::string>
 
using MR::FloatGrid = std::shared_ptr<OpenVdbFloatGrid>
 
typedef std::function< bool(float)> MR::ProgressCallback
 

Enumerations

enum class  MR::FilterType : char { MR::Linear , MR::Discrete }
 
enum class  MR::WrapType : char { MR::Repeat , MR::Mirror , MR::Clamp }
 
enum class  MR::Reorder : char { MR::None , MR::Lexicographically , MR::AABBTree }
 determines how points to be ordered More...
 

Functions

 MR::MR_CANONICAL_TYPEDEFS ((template< typename T > class MRMESH_CLASS), Id,(EdgeId, Id< EdgeTag >)(UndirectedEdgeId, Id< UndirectedEdgeTag >)(FaceId, Id< FaceTag >)(VertId, Id< VertTag >)(PixelId, Id< PixelTag >)(VoxelId, Id< VoxelTag >)(RegionId, Id< RegionTag >)(NodeId, Id< NodeTag >)(ObjId, Id< ObjTag >)(TextureId, Id< TextureTag >)(GraphVertId, Id< GraphVertTag >)(GraphEdgeId, Id< GraphEdgeTag >)) template< typename T
 
 MR::MR_CANONICAL_TYPEDEFS ((template< typename T > class MRMESH_CLASS), TaggedBitSet,(FaceBitSet, TaggedBitSet< FaceTag >)(VertBitSet, TaggedBitSet< VertTag >)(EdgeBitSet, TaggedBitSet< EdgeTag >)(UndirectedEdgeBitSet, TaggedBitSet< UndirectedEdgeTag >)(PixelBitSet, TaggedBitSet< PixelTag >)(VoxelBitSet, TaggedBitSet< VoxelTag >)(RegionBitSet, TaggedBitSet< RegionTag >)(NodeBitSet, TaggedBitSet< NodeTag >)(ObjBitSet, TaggedBitSet< ObjTag >)(TextureBitSet, TaggedBitSet< TextureTag >)(GraphVertBitSet, TaggedBitSet< GraphVertTag >)(GraphEdgeBitSet, TaggedBitSet< GraphEdgeTag >)) MR_CANONICAL_TYPEDEFS((template< typename T > class MRMESH_CLASS)
 
 MR::SetBitIteratorT< BitSet > (FaceSetBitIterator, SetBitIteratorT< FaceBitSet >)(VertSetBitIterator
 
 MR::SetBitIteratorT< VertBitSet > (EdgeSetBitIterator, SetBitIteratorT< EdgeBitSet >)(UndirectedEdgeSetBitIterator
 
 MR::MR_CANONICAL_TYPEDEFS ((template< typename T > struct), MRMESH_CLASS Vector2,(Vector2b, Vector2< bool >)(Vector2i, Vector2< int >)(Vector2ll, Vector2< long long >)(Vector2f, Vector2< float >)(Vector2d, Vector2< double >)) MR_CANONICAL_TYPEDEFS((template< typename T > struct)
 
MRMESH_CLASS MR::Vector3< bool > (Vector3i, Vector3< int >)(Vector3ll
 
MRMESH_CLASS MR::Vector3< long long > (Vector3f, Vector3< float >)(Vector3d
 
MRMESH_CLASS Vector3< double > MR::MR_CANONICAL_TYPEDEFS ((template< typename T > struct), Vector4,(Vector4b, Vector4< bool >)(Vector4i, Vector4< int >)(Vector4ll, Vector4< long long >)(Vector4f, Vector4< float >)(Vector4d, Vector4< double >)) MR_CANONICAL_TYPEDEFS((template< typename T > struct)
 
MRMESH_CLASS Vector3< double > MR::Matrix2< bool > (Matrix2i, Matrix2< int >)(Matrix2ll
 
MRMESH_CLASS Vector3< double > MR::Matrix2< long long > (Matrix2f, Matrix2< float >)(Matrix2d
 
MRMESH_CLASS Vector3< double > Matrix2< double > MR::MR_CANONICAL_TYPEDEFS ((template< typename T > struct), Matrix3,(Matrix3b, Matrix3< bool >)(Matrix3i, Matrix3< int >)(Matrix3ll, Matrix3< long long >)(Matrix3f, Matrix3< float >)(Matrix3d, Matrix3< double >)) MR_CANONICAL_TYPEDEFS((template< typename T > struct)
 
MRMESH_CLASS Vector3< double > Matrix2< double > MR::Matrix4< bool > (Matrix4i, Matrix4< int >)(Matrix4ll
 
MRMESH_CLASS Vector3< double > Matrix2< double > MR::Matrix4< long long > (Matrix4f, Matrix4< float >)(Matrix4d
 
MRMESH_CLASS Vector3< double > Matrix2< double > Matrix4< double > MR::MR_CANONICAL_TYPEDEFS ((template< typename T > struct), SymMatrix2,(SymMatrix2b, SymMatrix2< bool >)(SymMatrix2i, SymMatrix2< int >)(SymMatrix2ll, SymMatrix2< long long >)(SymMatrix2f, SymMatrix2< float >)(SymMatrix2d, SymMatrix2< double >)) MR_CANONICAL_TYPEDEFS((template< typename T > struct)
 
MRMESH_CLASS Vector3< double > Matrix2< double > Matrix4< double > MR::SymMatrix3< bool > (SymMatrix3i, SymMatrix3< int >)(SymMatrix3ll
 
MRMESH_CLASS Vector3< double > Matrix2< double > Matrix4< double > MR::SymMatrix3< long long > (SymMatrix3f, SymMatrix3< float >)(SymMatrix3d
 
MRMESH_CLASS Vector3< double > Matrix2< double > Matrix4< double > SymMatrix3< double > MR::MR_CANONICAL_TYPEDEFS ((template< typename T > struct), SymMatrix4,(SymMatrix4b, SymMatrix4< bool >)(SymMatrix4i, SymMatrix4< int >)(SymMatrix4ll, SymMatrix4< long long >)(SymMatrix4f, SymMatrix4< float >)(SymMatrix4d, SymMatrix4< double >)) MR_CANONICAL_TYPEDEFS((template< typename V > struct)
 
MRMESH_CLASS Vector3< double > Matrix2< double > Matrix4< double > SymMatrix3< double > MR::AffineXf< Vector2< float > > (AffineXf2d, AffineXf< Vector2< double > >)(AffineXf3f
 
MRMESH_CLASS Vector3< double > Matrix2< double > Matrix4< double > SymMatrix3< double > MR::AffineXf< Vector3< float > > (AffineXf3d, AffineXf< Vector3< double > >)) template< typename T > using AffineXf2
 
 MR::MR_CANONICAL_TYPEDEFS ((template< typename T > struct), RigidXf3,(RigidXf3f, RigidXf3< float >)(RigidXf3d, RigidXf3< double >)) MR_CANONICAL_TYPEDEFS((template< typename T > struct)
 
 MR::RigidScaleXf3< float > (RigidScaleXf3d, RigidScaleXf3< double >)) class PointToPointAligningTransform
 
 MR::MR_CANONICAL_TYPEDEFS ((template< typename T > struct), Sphere,(Sphere2f, Sphere< Vector2< float > >)(Sphere2d, Sphere< Vector2< double > >)(Sphere3f, Sphere< Vector3< float > >)(Sphere3d, Sphere< Vector3< double > >)) template< typename T > using Sphere2
 
 MR::MR_CANONICAL_TYPEDEFS ((template< typename V > struct), Line,(Line2f, Line< Vector2< float > >)(Line2d, Line< Vector2< double > >)(Line3f, Line< Vector3< float > >)(Line3d, Line< Vector3< double > >)) template< typename T > using Line2
 
 MR::MR_CANONICAL_TYPEDEFS ((template< typename V > struct), LineSegm,(LineSegm2f, LineSegm< Vector2< float > >)(LineSegm2d, LineSegm< Vector2< double > >)(LineSegm3f, LineSegm< Vector3< float > >)(LineSegm3d, LineSegm< Vector3< double > >)) template< typename T > using LineSegm2
 
 MR::MR_CANONICAL_TYPEDEFS ((template< typename T > struct), Parabola,(Parabolaf, Parabola< float >)(Parabolad, Parabola< double >)) MR_CANONICAL_TYPEDEFS((template< typename T > class)
 
 MR::BestFitParabola< float > (BestFitParabolad, BestFitParabola< double >)) MR_CANONICAL_TYPEDEFS((template< typename T > class)
 
 MR::Cylinder3< float > (Cylinder3d, Cylinder3< double >)) MR_CANONICAL_TYPEDEFS((template< typename T > class)
 
 MR::Cone3< float > (Cone3d, Cone3< double >)) template< typename V > using Contour
 
 MR::MR_CANONICAL_TYPEDEFS ((template< typename T > struct), Plane3,(Plane3f, Plane3< float >)(Plane3d, Plane3< double >)) MR_CANONICAL_TYPEDEFS((template< typename V > struct)
 
 MR::Box< Vector2< int > > (Box2ll, Box< Vector2< long long > >)(Box2f
 
 MR::Box< Vector2< float > > (Box2d, Box< Vector2< double > >)(Box3i
 
 MR::Box< Vector3< int > > (Box3ll, Box< Vector3< long long > >)(Box3f
 
 MR::Box< Vector3< float > > (Box3d, Box< Vector3< double > >)) template< typename T > using Box2
 
 MR::MR_CANONICAL_TYPEDEFS ((template< typename V > struct), QuadraticForm,(QuadraticForm2f, QuadraticForm< Vector2< float > >)(QuadraticForm2d, QuadraticForm< Vector2< double > >)(QuadraticForm3f, QuadraticForm< Vector3< float > >)(QuadraticForm3d, QuadraticForm< Vector3< double > >)) template< typename T > using QuadraticForm2
 
 MR::MR_CANONICAL_TYPEDEFS ((template< typename T > struct), Quaternion,(Quaternionf, Quaternion< float >)(Quaterniond, Quaternion< double >)) template< typename T > using Triangle3
 
 MR::MR_CANONICAL_TYPEDEFS ((template< typename T > struct), SegmPoint,(SegmPointf, SegmPoint< float >)(SegmPointd, SegmPoint< double >)) struct EdgePoint
 
 MR::MR_CANONICAL_TYPEDEFS ((template< typename T > struct), TriPoint,(TriPointf, TriPoint< float >)(TriPointd, TriPoint< double >)) struct PointOnFace
 
 MR::MR_CANONICAL_TYPEDEFS ((template< typename T, typename I > class MRMESH_CLASS), Vector,(Triangulation, Vector< ThreeVertIds, FaceId >)(Dipoles, Vector< Dipole, NodeId >)(FaceMap, Vector< FaceId, FaceId >)(VertMap, Vector< VertId, VertId >)(EdgeMap, Vector< EdgeId, EdgeId >)(UndirectedEdgeMap, Vector< UndirectedEdgeId, UndirectedEdgeId >)(ObjMap, Vector< ObjId, ObjId >)(WholeEdgeMap, Vector< EdgeId, UndirectedEdgeId >)(UndirectedEdge2RegionMap, Vector< RegionId, UndirectedEdgeId >)(Face2RegionMap, Vector< RegionId, FaceId >)(Vert2RegionMap, Vector< RegionId, VertId >)(VertCoords, Vector< Vector3f, VertId >)(VertNormals, Vector< Vector3f, VertId >)(VertUVCoords, Vector< UVCoord, VertId >)(FaceNormals, Vector< Vector3f, FaceId >)(TexturePerFace, Vector< TextureId, FaceId >)(VertColors, Vector< Color, VertId >)(FaceColors, Vector< Color, FaceId >)(EdgeColors, Vector< Color, EdgeId >)(UndirectedEdgeColors, Vector< Color, UndirectedEdgeId >)(VertScalars, Vector< float, VertId >)(FaceScalars, Vector< float, FaceId >)(EdgeScalars, Vector< float, EdgeId >)(UndirectedEdgeScalars, Vector< float, UndirectedEdgeId >)) using VertPredicate
 
template<typename T >
bool MR::contains (const std::function< bool(Id< T >)> &pred, Id< T > id)
 
 MR::MR_CANONICAL_TYPEDEFS ((template< typename T, typename I > struct MRMESH_CLASS), BMap,(FaceBMap, BMap< FaceId, FaceId >)(VertBMap, BMap< VertId, VertId >)(EdgeBMap, BMap< EdgeId, EdgeId >)(UndirectedEdgeBMap, BMap< UndirectedEdgeId, UndirectedEdgeId >)(WholeEdgeBMap, BMap< EdgeId, UndirectedEdgeId >)) template< typename T
 
 MR::MR_CANONICAL_TYPEDEFS ((template< typename V > struct), Polyline,(Polyline2, Polyline< Vector2f >)(Polyline3, Polyline< Vector3f >)) MR_CANONICAL_TYPEDEFS((template< typename V > class MRMESH_CLASS)
 
 MR::AABBTreePolyline< Vector2f > (AABBTreePolyline3, AABBTreePolyline< Vector3f >)) template< typename T > struct IntersectionPrecomputes
 
 MR::MR_CANONICAL_TYPEDEFS ((template< typename V > struct[[nodiscard]]), PolylineProjectionResult,(PolylineProjectionResult2, PolylineProjectionResult< Vector2f >)(PolylineProjectionResult3, PolylineProjectionResult< Vector3f >)) MR_CANONICAL_TYPEDEFS((template< typename V > struct)
 
 MR::PolylineProjectionWithOffsetResult< Vector2f > (PolylineProjectionWithOffsetResult3, PolylineProjectionWithOffsetResult< Vector3f >)) class DistanceMap
 
 MR::MR_CANONICAL_TYPEDEFS ((template< typename T > struct), VoxelsVolumeMinMax,(SimpleVolume, VoxelsVolumeMinMax< std::vector< float > >)(SimpleVolumeU16, VoxelsVolumeMinMax< std::vector< uint16_t > >) MRMESH_IF_HAVE_OPENVDB((VdbVolume, VoxelsVolumeMinMax< FloatGrid >))) template< typename T > using VoxelValueGetter
 
 MR::MR_CANONICAL_TYPEDEFS ((template< typename T > struct), VoxelsVolume,(FunctionVolume, VoxelsVolume< VoxelValueGetter< float > >)(FunctionVolumeU8, VoxelsVolume< VoxelValueGetter< uint8_t > >)) class HistoryAction
 
 MR::MR_CANONICAL_TYPEDEFS ((template< typename Tag > class MRMESH_CLASS), ColorMapAggregator,(VertColorMapAggregator, ColorMapAggregator< VertTag >)(UndirEdgeColorMapAggregator, ColorMapAggregator< UndirectedEdgeTag >)(FaceColorMapAggregator, ColorMapAggregator< FaceTag >)) template< typename T > class FewSmallest
 
template<typename T >
constexpr T MR::sqr (T x) noexcept
 
template<typename T >
constexpr int MR::sgn (T x) noexcept
 
template<class... Ts>
 MR::overloaded (Ts...) -> overloaded< Ts... >
 

Variables

constexpr NoInit MR::noInit
 
template<typename T >
struct MRMESH_CLASS MR::NoDefInit
 
class MRMESH_CLASS MR::EdgeTag
 
class MRMESH_CLASS MR::UndirectedEdgeTag
 
class MRMESH_CLASS MR::FaceTag
 
class MRMESH_CLASS MR::VertTag
 
class MRMESH_CLASS MR::PixelTag
 
class MRMESH_CLASS MR::VoxelTag
 
class MRMESH_CLASS MR::RegionTag
 
class MRMESH_CLASS MR::NodeTag
 
class MRMESH_CLASS MR::ObjTag
 
class MRMESH_CLASS MR::TextureTag
 
class MRMESH_CLASS MR::GraphVertTag
 
class MRMESH_CLASS MR::GraphEdgeTag
 
 MR::I = size_t> class MRMESH_CLASS Buffer
 
class MRMESH_CLASS MR::BitSet
 
 MR::SetBitIteratorT
 
 MR::SetBitIterator
 
MRMESH_CLASS MR::Vector3
 
MRMESH_CLASS MR::Vector3b
 
MRMESH_CLASS Vector3< double > MR::Matrix2
 
MRMESH_CLASS Vector3< double > MR::Matrix2b
 
MRMESH_CLASS Vector3< double > Matrix2< double > MR::Matrix4
 
MRMESH_CLASS Vector3< double > Matrix2< double > MR::Matrix4b
 
MRMESH_CLASS Vector3< double > Matrix2< double > Matrix4< double > MR::SymMatrix3
 
MRMESH_CLASS Vector3< double > Matrix2< double > Matrix4< double > MR::SymMatrix3b
 
MRMESH_CLASS Vector3< double > Matrix2< double > Matrix4< double > SymMatrix3< double > MR::AffineXf
 
MRMESH_CLASS Vector3< double > Matrix2< double > Matrix4< double > SymMatrix3< double > MR::AffineXf2f
 
 MR::RigidScaleXf3
 
 MR::RigidScaleXf3f
 
 MR::BestFitParabola
 
 MR::BestFitParabolaf
 
 MR::Cylinder3
 
 MR::Cylinder3f
 
 MR::Cone3
 
 MR::Cone3f
 
 MR::Box
 
 MR::Box2i
 
struct MRMESH_CLASS MR::Dipole
 
 MR::Hash = phmap::priv::hash_default_hash<T>
 
 MR::Eq
 
class MRMESH_CLASS MR::MeshTopology
 
struct MRMESH_CLASS MR::Mesh
 
struct MRMESH_CLASS MR::MeshPart
 
class MRMESH_CLASS MR::MeshOrPoints
 
struct MRMESH_CLASS MR::PointCloud
 
class MRMESH_CLASS MR::AABBTree
 
class MRMESH_CLASS MR::AABBTreePoints
 
class MRMESH_CLASS MR::AABBTreeObjects
 
struct MRMESH_CLASS MR::CloudPartMapping
 
struct MRMESH_CLASS MR::PartMapping
 
 MR::AABBTreePolyline
 
 MR::AABBTreePolyline2
 
 MR::PolylineProjectionWithOffsetResult
 
 MR::Polyline2ProjectionWithOffsetResult
 
class MRMESH_CLASS MR::ChangeSceneAction
 
template<typename... >
constexpr bool MR::dependent_false = false
 

Macro Definition Documentation

◆ MR_UNREACHABLE

#define MR_UNREACHABLE   { assert( false ); return {}; }

◆ MR_UNREACHABLE_NO_RETURN

#define MR_UNREACHABLE_NO_RETURN   assert( false );

◆ MRMESH_API

#define MRMESH_API   __attribute__((visibility("default")))

◆ MRMESH_CLASS

#define MRMESH_CLASS   __attribute__((visibility("default")))

◆ MRMESH_IF_HAVE_OPENVDB

#define MRMESH_IF_HAVE_OPENVDB ( ...)    __VA_ARGS__