22 constexpr static const
char* TypeName() noexcept {
return "PlaneObject"; }
23 virtual const char*
typeName()
const override {
return TypeName(); }
25 constexpr static const char*
ClassName() noexcept {
return "Plane"; }
26 virtual std::string
className()
const override {
return ClassName(); }
87 void orientateFollowMainAxis_(
ViewportId id = {} );
88 void setupPlaneSize2DByOriginalPoints_(
const std::vector<Vector3f>& pointsToApprox );
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:80
#define MRMESH_CLASS
Definition MRMesh/MRMeshFwd.h:84
An interface class which allows feature objects to share setters and getters on their main properties...
Definition MRFeatureObject.h:93
named object in the data model
Definition MRObject.h:62
Definition MRPlaneObject.h:12
MRMESH_API float getSize(ViewportId id={}) const
calculates plane size from xf
MRMESH_API Vector3f getNormal(ViewportId id={}) const
calculates normal from xf
MRMESH_API void setupRenderObject_() const override
virtual Expected< std::future< Expected< void > > > serializeModel_(const std::filesystem::path &) const override
Definition MRPlaneObject.h:74
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< void > deserializeModel_(const std::filesystem::path &, ProgressCallback) override
Reads model from file.
Definition MRPlaneObject.h:79
MRMESH_API PlaneObject(const std::vector< Vector3f > &pointsToApprox)
Finds best plane to approx given points.
MRMESH_API float getSizeY(ViewportId id={}) const
virtual MRMESH_API std::shared_ptr< Object > clone() const override
virtual const char * typeName() const override
Definition MRPlaneObject.h:23
MRMESH_API Matrix3f calcLocalBasis(ViewportId id={}) const
calculates normalized directions of X,Y axis of the plane and normal as Z
static constexpr const char * ClassNameInPlural() noexcept
Definition MRPlaneObject.h:28
PlaneObject(const PlaneObject &other)=default
static constexpr const char * ClassName() noexcept
Definition MRPlaneObject.h:25
MRMESH_API float getSizeX(ViewportId id={}) const
virtual MRMESH_API void serializeFields_(Json::Value &root) const override
MRMESH_API void setSize(float size, ViewportId id={})
updates xf to scale size
MRMESH_API void setNormal(const Vector3f &normal, ViewportId id={})
updates xf to fit given normal
virtual std::string className() const override
Definition MRPlaneObject.h:26
MRMESH_API void setSizeX(float size, ViewportId id={})
MRMESH_API Vector3f getCenter(ViewportId id={}) const
calculates center from xf
PlaneObject(PlaneObject &&) noexcept=default
virtual std::string classNameInPlural() const override
Definition MRPlaneObject.h:29
virtual MRMESH_API std::shared_ptr< Object > shallowClone() const override
MRMESH_API FeatureObjectProjectPointResult projectPoint(const Vector3f &point, ViewportId id={}) const override
MRMESH_API PlaneObject()
Creates simple plane object.
PlaneObject(ProtectedStruct, const PlaneObject &obj)
Definition MRPlaneObject.h:32
MRMESH_API void setCenter(const Vector3f ¢er, ViewportId id={})
updates xf to fit given center
MRMESH_API void setSizeY(float size, ViewportId id={})
virtual MRMESH_API void swapBase_(Object &other) override
swaps this object with other
virtual MRMESH_API Vector3f getBasePoint(ViewportId id={}) const override
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