25 constexpr static const
char* TypeName() noexcept {
return "SphereObject"; }
26 virtual const char*
typeName()
const override {
return TypeName(); }
31 virtual std::string
getClassName()
const override {
return "Sphere"; }
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:46
#define MRMESH_CLASS
Definition MRMesh/MRMeshFwd.h:50
Definition MRAddVisualPropertiesMixin.h:14
named object in the data model
Definition MRObject.h:60
Definition MRSphereObject.h:15
SphereObject(const SphereObject &other)=default
virtual MRMESH_API std::shared_ptr< Object > clone() const override
virtual std::string getClassName() const override
return human readable name of subclass
Definition MRSphereObject.h:31
virtual const char * typeName() const override
Definition MRSphereObject.h:26
MRMESH_API void setRadius(float radius, ViewportId id={})
updates xf to fit given radius
MRMESH_API SphereObject(const std::vector< Vector3f > &pointsToApprox)
Finds best sphere to approx given points.
SphereObject(SphereObject &&) noexcept=default
virtual Expected< void > deserializeModel_(const std::filesystem::path &, ProgressCallback) override
Reads model from file.
Definition MRSphereObject.h:60
MRMESH_API FeatureObjectProjectPointResult projectPoint(const Vector3f &point, ViewportId id={}) const override
MRMESH_API void setCenter(const Vector3f ¢er, ViewportId id={})
updates xf to fit given center
MRMESH_API Vector3f getCenter(ViewportId id={}) const
calculates center from xf
virtual MRMESH_API void serializeFields_(Json::Value &root) const override
virtual MRMESH_API void swapBase_(Object &other) override
swaps this object with other
MRMESH_API void setupRenderObject_() const override
SphereObject(ProtectedStruct, const SphereObject &obj)
Definition MRSphereObject.h:29
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 Expected< std::future< Expected< void > > > serializeModel_(const std::filesystem::path &) const override
Definition MRSphereObject.h:57
MRMESH_API SphereObject()
Creates simple sphere object with center in zero and radius - 1.
virtual MRMESH_API std::shared_ptr< Object > shallowClone() const override
MRMESH_API float getRadius(ViewportId id={}) const
calculates radius from xf
Definition MRViewportId.h:16
std::function< bool(float)> ProgressCallback
Definition MRMesh/MRMeshFwd.h:576
Definition MRCameraOrientationPlugin.h:8
tl::expected< T, E > Expected
Definition MRExpected.h:58
Definition MRFeatureObject.h:78
Definition MRObject.h:246