6#if MR_COMPILING_C_BINDINGS
10#include <unordered_map>
11#include <unordered_set>
40 static constexpr std::string_view name =
"Point";
45 static constexpr std::string_view name =
"Line";
50 static constexpr std::string_view name =
"Plane";
55 static constexpr std::string_view name =
"Circle";
60 static constexpr std::string_view name =
"Sphere";
65 static constexpr std::string_view name =
"Cylinder";
70 static constexpr std::string_view name =
"Cone";
77 return[&]<
int ...I>( std::integer_sequence<int, I...> )
84template <
typename ...P>
87 std::shared_ptr<VisualObject> ret;
90 if ( thisKind.value == kind )
92 ret = std::make_shared<typename ObjKindTraits<thisKind.value>::type>( std::forward<P>( params )... );
97 assert( ok &&
"This object type isn't added to `ObjKindTraits`." );
102template <
typename ...P>
105 std::shared_ptr<VisualObject> ret;
110 ret = std::make_shared<
typename ObjKindTraits<thisKind.value>::type>( std::forward<P>( params )... );
115 assert( ok &&
"This object type isn't added to `ObjKindTraits`." );
124 } -> std::convertible_to<Vector3f>;
132 } -> std::convertible_to<Vector3f>;
Definition MRCircleObject.h:17
Definition MRConeObject.h:22
Definition MRCylinderObject.h:21
An interface class which allows feature objects to share setters and getters on their main properties...
Definition MRFeatureObject.h:96
Definition MRLineObject.h:16
Definition MRPlaneObject.h:15
Definition MRPointObject.h:17
Definition MRSphereObject.h:18
Definition MRFeatureHelpers.h:128
Definition MRFeatureHelpers.h:120
MRMESH_API std::optional< Vector3f > getFeatureDirection(FeatureObject *feature)
Using forEachObjectKind the template collects a list of features for which the method ....
FeaturesObjectKind
Definition MRFeatureHelpers.h:22
MRMESH_API std::optional< Vector3f > getFeatureNormal(FeatureObject *feature)
Using forEachObjectKind the template collects a list of features for which the method ....
MRMESH_API std::unordered_set< std::string > getFeaturesTypeWithDirections()
Try to getDirection from specific feature using forEachObjectKind template. Returns nullopt is ....
bool forEachObjectKind(F &&func)
Calls func, which is ( auto kind ) -> bool, for each known object kind. If it returns true,...
Definition MRFeatureHelpers.h:75
MRMESH_API std::unordered_set< std::string > getFeaturesTypeWithNormals()
Try to getNormal from specific feature using forEachObjectKind template. Returns nullopt is ....
std::shared_ptr< VisualObject > makeObjectFromEnum(FeaturesObjectKind kind, P &&... params)
Allocates an object of type kind, passing params... to its constructor.
Definition MRFeatureHelpers.h:85
std::shared_ptr< VisualObject > makeObjectFromClassName(std::string className, P &&... params)
Allocates an object of type kind, passing params... to its constructor.
Definition MRFeatureHelpers.h:103
only for bindings generation
Definition MRCameraOrientationPlugin.h:8
Various information about different types of objects.
Definition MRFeatureHelpers.h:35