14class MRMESH_CLASS CylinderObject :
public AddVisualProperties<FeatureObject,
15 DimensionsVisualizePropertyType::diameter,
16 DimensionsVisualizePropertyType::length
23 MRMESH_API CylinderObject(
const std::vector<Vector3f>& pointsToApprox );
25 CylinderObject( CylinderObject&& ) noexcept = default;
26 CylinderObject& operator = ( CylinderObject&& ) noexcept = default;
28 constexpr static const
char* StaticTypeName() noexcept {
return "CylinderObject"; }
29 virtual const char* typeName()
const override {
return StaticTypeName(); }
31 constexpr static const char* StaticClassName() noexcept {
return "Cylinder"; }
32 virtual std::string className()
const override {
return StaticClassName(); }
34 constexpr static const char* StaticClassNameInPlural() noexcept {
return "Cylinders"; }
35 virtual std::string classNameInPlural()
const override {
return StaticClassNameInPlural(); }
38 CylinderObject( ProtectedStruct,
const CylinderObject& obj ) : CylinderObject( obj )
41 MRMESH_API virtual std::shared_ptr<Object> clone()
const override;
42 MRMESH_API virtual std::shared_ptr<Object> shallowClone()
const override;
45 MRMESH_API float getRadius( ViewportId
id = {} )
const;
47 MRMESH_API Vector3f getCenter( ViewportId
id = {} )
const;
49 MRMESH_API void setRadius(
float radius, ViewportId
id = {} );
51 MRMESH_API void setCenter(
const Vector3f& center, ViewportId
id = {} );
53 MRMESH_API Vector3f getDirection( ViewportId
id = {} )
const;
55 MRMESH_API void setDirection(
const Vector3f& normal, ViewportId
id = {} );
57 MRMESH_API float getLength( ViewportId
id = {} )
const;
62 [[nodiscard]]
MRMESH_API virtual Vector3f getBasePoint( ViewportId
id = {} )
const override;
64 MRMESH_API virtual const std::vector<FeatureObjectSharedProperty>& getAllSharedProperties()
const override;
66 [[nodiscard]]
MRMESH_API FeatureObjectProjectPointResult projectPoint(
const Vector3f& point, ViewportId
id = {} )
const override;
69 CylinderObject(
const CylinderObject& other ) =
default;
72 MRMESH_API virtual void swapBase_( Object& other )
override;
74 MRMESH_API virtual void serializeFields_( Json::Value& root )
const override;
76 virtual Expected<std::future<Expected<void>>> serializeModel_(
const std::filesystem::path& )
const override
81 virtual Expected<void> deserializeModel_(
const std::filesystem::path&, ProgressCallback )
override
86 MRMESH_API void setupRenderObject_()
const override;
#define MRMESH_API
Definition MRMeshFwd.h:80
#define MRMESH_CLASS
Definition MRMeshFwd.h:87
length
Definition MRObjectDimensionsEnum.h:14
Definition MRCameraOrientationPlugin.h:8