MeshLib
 
Loading...
Searching...
No Matches
MRFeatureHelpers.h File Reference
#include "MRMeshFwd.h"
#include "MRFeatureObject.h"
#include <unordered_map>
#include <unordered_set>

Go to the source code of this file.

Classes

struct  MR::ObjKindTraits< X >
 Various information about different types of objects. More...
 
struct  MR::ObjKindTraits< FeaturesObjectKind::Point >
 
struct  MR::ObjKindTraits< FeaturesObjectKind::Line >
 
struct  MR::ObjKindTraits< FeaturesObjectKind::Plane >
 
struct  MR::ObjKindTraits< FeaturesObjectKind::Circle >
 
struct  MR::ObjKindTraits< FeaturesObjectKind::Sphere >
 
struct  MR::ObjKindTraits< FeaturesObjectKind::Cylinder >
 
struct  MR::ObjKindTraits< FeaturesObjectKind::Cone >
 

Namespaces

namespace  MR
 

Concepts

concept  MR::HasGetNormalMethod
 
concept  MR::HasGetDirectionMethod
 

Enumerations

enum class  MR::FeaturesObjectKind {
  MR::Point , MR::Line , MR::Plane , MR::Circle ,
  MR::Sphere , MR::Cylinder , MR::Cone , MR::_count
}
 

Functions

template<typename F >
bool MR::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< VisualObjectMR::makeObjectFromEnum (FeaturesObjectKind kind, P &&... params)
 Allocates an object of type kind, passing params... to its constructor.
 
template<typename ... P>
std::shared_ptr< VisualObjectMR::makeObjectFromClassName (std::string className, P &&... params)
 Allocates an object of type kind, passing params... to its constructor.
 
MRMESH_API std::optional< Vector3fMR::getFeatureNormal (FeatureObject *feature)
 
MRMESH_API std::optional< Vector3fMR::getFeatureDirection (FeatureObject *feature)
 
MRMESH_API std::unordered_set< std::string > MR::getFeaturesTypeWithNormals ()
 
MRMESH_API std::unordered_set< std::string > MR::getFeaturesTypeWithDirections ()