2#include "MRPch/MRBindingMacros.h"
26 constexpr static const
char*
StaticTypeName() noexcept {
return "LineObject"; }
#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
static constexpr const char * StaticClassName() noexcept
Definition MRLineObject.h:29
float getLength(ViewportId id={}) const
calculates line size from xf
void setLength(float size, ViewportId id={})
updates xf to scale size
ImVec2 size(const ViewportRectangle &rect)
Definition MRViewport.h:32
static constexpr const char * StaticClassNameInPlural() noexcept
Definition MRLineObject.h:32
virtual std::string className() const override
Definition MRLineObject.h:30
void setPoints(const Vector3f &a, const Vector3f &b, ViewportId id={})
updates xf for line visually to go from point a to point b
virtual const std::vector< FeatureObjectSharedProperty > & getAllSharedProperties() const override
Create and generate list of bounded getters and setters for the main properties of feature object,...
LineObject(const LineObject &other)=default
LineObject(LineObject &&) noexcept=default
virtual Vector3f getBasePoint(ViewportId id={}) const override
Returns point considered as base for the feature.
virtual std::shared_ptr< Object > shallowClone() const override
tl::expected< T, E > Expected
Definition MRExpected.h:31
void setupRenderObject_() const override
Vector3f getDirection(ViewportId id={}) const
calculates direction from xf
void setCenter(const Vector3f ¢er, ViewportId id={})
updates xf to fit given center
LineObject(const std::vector< Vector3f > &pointsToApprox)
Finds best plane to approx given points.
virtual std::shared_ptr< Object > clone() const override
FeatureObjectProjectPointResult projectPoint(const Vector3f &point, ViewportId id={}) const override
virtual std::string classNameInPlural() const override
Definition MRLineObject.h:33
virtual void serializeFields_(Json::Value &root) const override
virtual Expected< void > deserializeModel_(const std::filesystem::path &, ProgressCallback) override
Reads model from file.
Definition MRLineObject.h:87
FeatureObject(int numDimensions)
numDimensions is 0 for points, 1 for lines, 2 for surface meshes. We don't use 3 at the moment.
void setDirection(const Vector3f &normal, ViewportId id={})
updates xf to fit given normal
LineObject(ProtectedStruct, const LineObject &obj)
Definition MRLineObject.h:36
LineObject()
Creates simple plane object.
Vector3f getPointB(ViewportId id={}) const
Returns the finishing point, aka center + dir * len/2.
static constexpr const char * StaticTypeName() noexcept
Definition MRLineObject.h:26
Vector3f getCenter(ViewportId id={}) const
calculates center from xf
virtual Expected< std::future< Expected< void > > > serializeModel_(const std::filesystem::path &) const override
Definition MRLineObject.h:84
Vector3f normal(const MeshTopology &topology, const VertCoords &points, FaceId f)
computes triangular face normal from its vertices
Definition MRMeshMath.h:224
virtual void swapBase_(Object &other) override
swaps this object with other
virtual const char * typeName() const override
Definition MRLineObject.h:27
Vector3f getPointA(ViewportId id={}) const
Returns the starting point, aka center - dir * len/2.
@ 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