28 constexpr static const
char*
StaticTypeName() noexcept {
return "SphereObject"; }
#define MRMESH_API
Definition MRMeshFwd.h:80
#define MRMESH_CLASS
Definition MRMeshFwd.h:87
Definition MRAddVisualPropertiesMixin.h:17
named object in the data model
Definition MRObject.h:62
Definition MRViewportId.h:16
std::function< bool(float)> ProgressCallback
Definition MRMeshFwd.h:753
SphereObject(const SphereObject &other)=default
virtual void serializeFields_(Json::Value &root) const override
virtual std::string classNameInPlural() const override
Definition MRSphereObject.h:35
virtual const std::vector< FeatureObjectSharedProperty > & getAllSharedProperties() const override
Create and generate list of bounded getters and setters for the main properties of feature object,...
static constexpr const char * StaticClassName() noexcept
Definition MRSphereObject.h:31
void setCenter(const Vector3f ¢er, ViewportId id={})
updates xf to fit given center
static constexpr const char * StaticClassNameInPlural() noexcept
Definition MRSphereObject.h:34
virtual const char * typeName() const override
Definition MRSphereObject.h:29
Vector3f getCenter(ViewportId id={}) const
calculates center from xf
void setRadius(float radius, ViewportId id={})
updates xf to fit given radius
void setupRenderObject_() const override
SphereObject(SphereObject &&) noexcept=default
virtual Expected< void > deserializeModel_(const std::filesystem::path &, ProgressCallback) override
Reads model from file.
Definition MRSphereObject.h:67
tl::expected< T, E > Expected
Definition MRExpected.h:31
SphereObject(ProtectedStruct, const SphereObject &obj)
Definition MRSphereObject.h:38
static constexpr const char * StaticTypeName() noexcept
Definition MRSphereObject.h:28
virtual Expected< std::future< Expected< void > > > serializeModel_(const std::filesystem::path &) const override
Definition MRSphereObject.h:64
SphereObject()
Creates simple sphere object with center in zero and radius - 1.
virtual std::shared_ptr< Object > shallowClone() const override
virtual std::shared_ptr< Object > clone() const override
virtual std::string className() const override
Definition MRSphereObject.h:32
SphereObject(const std::vector< Vector3f > &pointsToApprox)
Finds best sphere to approx given points.
float getRadius(ViewportId id={}) const
calculates radius from xf
FeatureObjectProjectPointResult projectPoint(const Vector3f &point, ViewportId id={}) const override
virtual void swapBase_(Object &other) override
swaps this object with other
@ other
Angle, normally float. Measure in radians.
Definition MRFeatureObject.h:27
only for bindings generation
Definition MRCameraOrientationPlugin.h:8
Definition MRFeatureObject.h:81
Definition MRObject.h:284