25 constexpr static const
char*
StaticTypeName() noexcept {
return "PlaneObject"; }
90 void orientateFollowMainAxis_(
ViewportId id = {} );
91 void setupPlaneSize2DByOriginalPoints_(
const std::vector<Vector3f>& pointsToApprox );
#define MRMESH_API
Definition MRMeshFwd.h:80
#define MRMESH_CLASS
Definition MRMeshFwd.h:87
named object in the data model
Definition MRObject.h:62
Definition MRViewportId.h:16
std::function< bool(float)> ProgressCallback
Definition MRMeshFwd.h:753
virtual const std::vector< FeatureObjectSharedProperty > & getAllSharedProperties() const override
Create and generate list of bounded getters and setters for the main properties of feature object,...
void setNormal(const Vector3f &normal, ViewportId id={})
updates xf to fit given normal
float getSizeX(ViewportId id={}) const
void setSize(float size, ViewportId id={})
updates xf to scale size
virtual Expected< std::future< Expected< void > > > serializeModel_(const std::filesystem::path &) const override
Definition MRPlaneObject.h:77
void setSizeX(float size, ViewportId id={})
virtual Expected< void > deserializeModel_(const std::filesystem::path &, ProgressCallback) override
Reads model from file.
Definition MRPlaneObject.h:82
virtual Vector3f getBasePoint(ViewportId id={}) const override
Returns point considered as base for the feature.
ImVec2 size(const ViewportRectangle &rect)
Definition MRViewport.h:32
Vector3f getNormal(ViewportId id={}) const
calculates normal from xf
static constexpr const char * StaticTypeName() noexcept
Definition MRPlaneObject.h:25
float getSizeY(ViewportId id={}) const
virtual const char * typeName() const override
Definition MRPlaneObject.h:26
float getSize(ViewportId id={}) const
calculates plane size from xf
PlaneObject(const PlaneObject &other)=default
FeatureObjectProjectPointResult projectPoint(const Vector3f &point, ViewportId id={}) const override
void setupRenderObject_() const override
tl::expected< T, E > Expected
Definition MRExpected.h:31
virtual void swapBase_(Object &other) override
swaps this object with other
Matrix3f calcLocalBasis(ViewportId id={}) const
calculates normalized directions of X,Y axis of the plane and normal as Z
virtual std::string className() const override
Definition MRPlaneObject.h:29
void setCenter(const Vector3f ¢er, ViewportId id={})
updates xf to fit given center
PlaneObject(PlaneObject &&) noexcept=default
static constexpr const char * StaticClassName() noexcept
Definition MRPlaneObject.h:28
PlaneObject()
Creates simple plane object.
static constexpr const char * StaticClassNameInPlural() noexcept
Definition MRPlaneObject.h:31
virtual std::string classNameInPlural() const override
Definition MRPlaneObject.h:32
virtual void serializeFields_(Json::Value &root) const override
FeatureObject(int numDimensions)
numDimensions is 0 for points, 1 for lines, 2 for surface meshes. We don't use 3 at the moment.
PlaneObject(const std::vector< Vector3f > &pointsToApprox)
Finds best plane to approx given points.
virtual std::shared_ptr< Object > shallowClone() const override
PlaneObject(ProtectedStruct, const PlaneObject &obj)
Definition MRPlaneObject.h:35
void setSizeY(float size, ViewportId id={})
virtual std::shared_ptr< Object > clone() const override
Vector3f normal(const MeshTopology &topology, const VertCoords &points, FaceId f)
computes triangular face normal from its vertices
Definition MRMeshMath.h:224
Vector3f getCenter(ViewportId id={}) const
calculates center from xf
@ 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