18 DimensionsVisualizePropertyType::diameter,
19 DimensionsVisualizePropertyType::angle,
20 DimensionsVisualizePropertyType::length
32 constexpr static const
char*
StaticTypeName() noexcept {
return "ConeObject"; }
98 float getNormalizedRadius_(
ViewportId id = {} )
const;
#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
auto height(const Box< V > &box)
returns size along y axis
Definition MRBox.h:361
Vector3f getDirection(ViewportId id={}) const
calculates main axis direction from xf
void setDirection(const Vector3f &normal, ViewportId id={})
updates xf to fit main axis
ConeObject()
Creates simple Cone object with center in zero and radius - 1.
FeatureObjectProjectPointResult projectPoint(const Vector3f &point, ViewportId id={}) const override
static constexpr const char * StaticTypeName() noexcept
Definition MRConeObject.h:32
static constexpr const char * StaticClassName() noexcept
Definition MRConeObject.h:35
virtual std::string className() const override
Definition MRConeObject.h:36
ConeObject(const ConeObject &other)=default
float getBaseRadius(ViewportId id={}) const
Computes the base base radius from the xf.
virtual Expected< void > deserializeModel_(const std::filesystem::path &, ProgressCallback) override
Reads model from file.
Definition MRConeObject.h:89
virtual void serializeFields_(Json::Value &root) const override
tl::expected< T, E > Expected
Definition MRExpected.h:31
virtual std::shared_ptr< Object > shallowClone() const override
void setAngle(float angle, ViewportId id={})
updates xf to fit given cone angle. It is an angle betweeh main axis and side
virtual Vector3f getBasePoint(ViewportId id={}) const override
Returns point considered as base for the feature.
float getHeight(ViewportId id={}) const
calculates cone height from xf
virtual const char * typeName() const override
Definition MRConeObject.h:33
void setupRenderObject_() const override
virtual std::string classNameInPlural() const override
Definition MRConeObject.h:39
virtual std::shared_ptr< Object > clone() const override
void setBaseRadius(float radius, ViewportId id={})
Updates the xf for the new base radius.
virtual Expected< std::future< Expected< void > > > serializeModel_(const std::filesystem::path &) const override
Definition MRConeObject.h:84
float getAngle(ViewportId id={}) const
calculates cone angle from xf. It is an angle betweeh main axis and side.
void setCenter(const Vector3f ¢er, ViewportId id={})
updates xf to fit given center. Center is the apex of the cone.
ConeObject(ProtectedStruct, const ConeObject &obj)
Definition MRConeObject.h:42
ConeObject(const std::vector< Vector3f > &pointsToApprox)
Finds best Cone to approx given points.
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 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 * StaticClassNameInPlural() noexcept
Definition MRConeObject.h:38
ConeObject(ConeObject &&) noexcept=default
void setHeight(float height, ViewportId id={})
updates xf to fit cone height
Vector3f getCenter(ViewportId id={}) const
calculates center from xf. Center is the apex of the cone.
@ other
Angle, normally float. Measure in radians.
Definition MRFeatureObject.h:27
@ angle
Direction, normally Vector3f.
Definition MRFeatureObject.h:26
only for bindings generation
Definition MRCameraOrientationPlugin.h:8
Definition MRFeatureObject.h:81
Definition MRObject.h:284