15 DimensionsVisualizePropertyType::diameter,
16 DimensionsVisualizePropertyType::angle,
17 DimensionsVisualizePropertyType::length
29 constexpr static const
char* TypeName() noexcept {
return "ConeObject"; }
30 virtual const char*
typeName()
const override {
return TypeName(); }
32 constexpr static const char*
ClassName() noexcept {
return "Cone"; }
33 virtual std::string
className()
const override {
return ClassName(); }
95 float getNormalizedRadius_(
ViewportId id = {} )
const;
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:80
#define MRMESH_CLASS
Definition MRMesh/MRMeshFwd.h:84
angle
Definition MRObjectDimensionsEnum.h:13
Definition MRAddVisualPropertiesMixin.h:14
Definition MRConeObject.h:19
virtual MRMESH_API Vector3f getBasePoint(ViewportId id={}) const override
MRMESH_API float getHeight(ViewportId id={}) const
calculates cone height from xf
MRMESH_API void setDirection(const Vector3f &normal, ViewportId id={})
updates xf to fit main axis
static constexpr const char * ClassName() noexcept
Definition MRConeObject.h:32
MRMESH_API void setAngle(float angle, ViewportId id={})
updates xf to fit given cone angle. It is an angle betweeh main axis and side
virtual std::string className() const override
Definition MRConeObject.h:33
MRMESH_API void setCenter(const Vector3f ¢er, ViewportId id={})
updates xf to fit given center. Center is the apex of the cone.
MRMESH_API ConeObject()
Creates simple Cone object with center in zero and radius - 1.
ConeObject(const ConeObject &other)=default
MRMESH_API Vector3f getDirection(ViewportId id={}) const
calculates main axis direction from xf
virtual MRMESH_API void swapBase_(Object &other) override
swaps this object with other
MRMESH_API void setupRenderObject_() const override
virtual Expected< void > deserializeModel_(const std::filesystem::path &, ProgressCallback) override
Reads model from file.
Definition MRConeObject.h:86
MRMESH_API void setHeight(float height, ViewportId id={})
updates xf to fit cone height
virtual const char * typeName() const override
Definition MRConeObject.h:30
MRMESH_API Vector3f getCenter(ViewportId id={}) const
calculates center from xf. Center is the apex of the cone.
MRMESH_API float getBaseRadius(ViewportId id={}) const
Computes the base base radius from the xf.
virtual MRMESH_API const std::vector< FeatureObjectSharedProperty > & getAllSharedProperties() const override
Create and generate list of bounded getters and setters for the main properties of feature object,...
virtual std::string classNameInPlural() const override
Definition MRConeObject.h:36
virtual MRMESH_API std::shared_ptr< Object > shallowClone() const override
virtual Expected< std::future< Expected< void > > > serializeModel_(const std::filesystem::path &) const override
Definition MRConeObject.h:81
ConeObject(ProtectedStruct, const ConeObject &obj)
Definition MRConeObject.h:39
MRMESH_API ConeObject(const std::vector< Vector3f > &pointsToApprox)
Finds best Cone to approx given points.
MRMESH_API FeatureObjectProjectPointResult projectPoint(const Vector3f &point, ViewportId id={}) const override
MRMESH_API float getAngle(ViewportId id={}) const
calculates cone angle from xf. It is an angle betweeh main axis and side.
MRMESH_API void setBaseRadius(float radius, ViewportId id={})
Updates the xf for the new base radius.
virtual MRMESH_API void serializeFields_(Json::Value &root) const override
static constexpr const char * ClassNameInPlural() noexcept
Definition MRConeObject.h:35
ConeObject(ConeObject &&) noexcept=default
virtual MRMESH_API std::shared_ptr< Object > clone() const override
named object in the data model
Definition MRObject.h:62
Definition MRViewportId.h:16
std::function< bool(float)> ProgressCallback
Definition MRMesh/MRMeshFwd.h:729
Definition MRCameraOrientationPlugin.h:8
tl::expected< T, E > Expected
Definition MRExpected.h:25
Definition MRFeatureObject.h:78
Definition MRObject.h:279