6#if MR_COMPILING_C_BINDINGS
10#include <unordered_map>
11#include <unordered_set>
37 static constexpr std::string_view name =
"Point";
42 static constexpr std::string_view name =
"Line";
47 static constexpr std::string_view name =
"Plane";
52 static constexpr std::string_view name =
"Circle";
57 static constexpr std::string_view name =
"Sphere";
62 static constexpr std::string_view name =
"Cylinder";
67 static constexpr std::string_view name =
"Cone";
74 return[&]<
int ...I>( std::integer_sequence<int,
I...> )
81template <
typename ...P>
84 std::shared_ptr<VisualObject> ret;
87 if ( thisKind.value == kind )
89 ret = std::make_shared<typename ObjKindTraits<thisKind.value>::type>( std::forward<P>( params )... );
94 assert( ok &&
"This object type isn't added to `ObjKindTraits`." );
99template <
typename ...P>
102 std::shared_ptr<VisualObject> ret;
107 ret = std::make_shared<
typename ObjKindTraits<thisKind.value>::type>( std::forward<P>( params )... );
112 assert( ok &&
"This object type isn't added to `ObjKindTraits`." );
121 } -> std::convertible_to<Vector3f>;
129 } -> std::convertible_to<Vector3f>;
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:80
Definition MRCircleObject.h:17
Definition MRConeObject.h:19
Definition MRCylinderObject.h:18
An interface class which allows feature objects to share setters and getters on their main properties...
Definition MRFeatureObject.h:93
Definition MRLineObject.h:13
Definition MRPlaneObject.h:12
Definition MRPointObject.h:13
Definition MRSphereObject.h:15
Definition MRFeatureHelpers.h:125
Definition MRFeatureHelpers.h:117
Definition MRCameraOrientationPlugin.h:8
MRMESH_API std::optional< Vector3f > getFeatureDirection(FeatureObject *feature)
FeaturesObjectKind
Definition MRFeatureHelpers.h:19
MRMESH_API std::optional< Vector3f > getFeatureNormal(FeatureObject *feature)
MRMESH_API std::unordered_set< std::string > getFeaturesTypeWithDirections()
bool forEachObjectKind(F &&func)
Calls func, which is ( auto kind ) -> bool, for each known object kind. If it returns true,...
Definition MRFeatureHelpers.h:72
MRMESH_API std::unordered_set< std::string > getFeaturesTypeWithNormals()
std::shared_ptr< VisualObject > makeObjectFromEnum(FeaturesObjectKind kind, P &&... params)
Allocates an object of type kind, passing params... to its constructor.
Definition MRFeatureHelpers.h:82
I
Definition MRMesh/MRMeshFwd.h:130
std::shared_ptr< VisualObject > makeObjectFromClassName(std::string className, P &&... params)
Allocates an object of type kind, passing params... to its constructor.
Definition MRFeatureHelpers.h:100
Various information about different types of objects.
Definition MRFeatureHelpers.h:32