25 constexpr static const char*
TypeName() noexcept {
return "LinesHolder"; }
26 virtual const char*
typeName()
const override {
return TypeName(); }
32 [[nodiscard]]
virtual bool hasModel()
const override {
return bool( polyline_ ); }
37 const std::shared_ptr<const Polyline3>&
polyline()
const
38 {
return reinterpret_cast< const std::shared_ptr<const Polyline3>&
>( polyline_ ); }
109 float lineWidth_{ 1.0f };
110 float pointSize_{ 5.f };
115 void setDefaultColors_();
118 void setDefaultSceneProperties_();
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:46
#define MRMESH_CLASS
Definition MRMesh/MRMeshFwd.h:50
Points
Definition MRObjectLinesHolder.h:10
Definition MRVisualObject.h:67
Definition MRObjectLinesHolder.h:19
MRMESH_API ObjectLinesHolder()
virtual MRMESH_API void swapBase_(Object &other) override
swaps this object with other
virtual MRMESH_API void setPointSize(float size)
virtual MRMESH_API void setLineWidth(float width)
ObjectLinesHolder & operator=(ObjectLinesHolder &&)=default
virtual MRMESH_API void setupRenderObject_() const override
const UndirectedEdgeColors & getLinesColorMap() const
Definition MRObjectLinesHolder.h:50
virtual MRMESH_API void setDirtyFlags(uint32_t mask, bool invalidateCaches=true) override
virtual MRMESH_API Box3f computeBoundingBox_() const override
UndirectedEdgeColors linesColorMap_
Definition MRObjectLinesHolder.h:103
virtual void updateLinesColorMap(UndirectedEdgeColors &updated)
Definition MRObjectLinesHolder.h:53
ViewportMask smoothConnections_
Definition MRObjectLinesHolder.h:106
MRMESH_API void serializeBaseFields_(Json::Value &root) const
MRMESH_API size_t numComponents() const
returns cached information about the number of components in the polyline
virtual const char * typeName() const override
Definition MRObjectLinesHolder.h:26
static constexpr const char * TypeName() noexcept
Definition MRObjectLinesHolder.h:25
virtual float getPointSize() const
Definition MRObjectLinesHolder.h:45
virtual bool hasModel() const override
Definition MRObjectLinesHolder.h:32
MRMESH_API void setAllVisualizeProperties_(const AllVisualizeProperties &properties, std::size_t &pos) override
set all visualize properties masks
virtual MRMESH_API void applyScale(float scaleFactor) override
scale object size (all point positions)
MRMESH_API float totalLength() const
return cached total length
virtual MRMESH_API std::shared_ptr< Object > clone() const override
virtual MRMESH_API void deserializeFields_(const Json::Value &root) override
deserializeFields_: deserializeBaseFields_ plus polyline deserialization
MRMESH_API bool supportsVisualizeProperty(AnyVisualizeMaskEnum type) const override
Returns true if this class supports the property type. Otherwise passing it to the functions below is...
virtual MRMESH_API std::shared_ptr< Object > shallowClone() const override
ObjectLinesHolder(ObjectLinesHolder &&)=default
MRMESH_API void deserializeBaseFields_(const Json::Value &root)
MRMESH_API const ViewportMask & getVisualizePropertyMask(AnyVisualizeMaskEnum type) const override
returns mask of viewports where given property is set
virtual MRMESH_API bool hasVisualRepresentation() const override
does the object have any visual representation (visible points, triangles, edges, etc....
virtual MRMESH_API Box3f getWorldBox(ViewportId={}) const override
std::optional< size_t > numComponents_
Definition MRObjectLinesHolder.h:99
virtual MRMESH_API void serializeFields_(Json::Value &root) const override
serializeFields_: serializeBaseFields_ plus polyline serialization
ObjectLinesHolder(const ObjectLinesHolder &other)=default
ViewportMask showPoints_
Definition MRObjectLinesHolder.h:105
virtual void setLinesColorMap(UndirectedEdgeColors linesColorMap)
Definition MRObjectLinesHolder.h:51
virtual float getLineWidth() const
Definition MRObjectLinesHolder.h:43
virtual MRMESH_API size_t heapBytes() const override
returns the amount of memory this object occupies on heap
const std::shared_ptr< const Polyline3 > & polyline() const
Definition MRObjectLinesHolder.h:37
ObjectLinesHolder(ProtectedStruct, const ObjectLinesHolder &obj)
Definition MRObjectLinesHolder.h:48
std::optional< float > totalLength_
Definition MRObjectLinesHolder.h:100
MRMESH_API AllVisualizeProperties getAllVisualizeProperties() const override
get all visualize properties masks
ViewportProperty< XfBasedCache< Box3f > > worldBox_
Definition MRObjectLinesHolder.h:101
std::shared_ptr< Polyline3 > polyline_
Definition MRObjectLinesHolder.h:111
named object in the data model
Definition MRObject.h:60
Definition MRViewportId.h:16
stores mask of viewport unique identifiers
Definition MRViewportId.h:38
Definition MRViewportProperty.h:17
Visual Object.
Definition MRVisualObject.h:131
std::vector< ViewportMask > AllVisualizeProperties
Definition MRVisualObject.h:85
@ DIRTY_PRIMITIVE_COLORMAP
Definition MRVisualObject.h:101
Definition MRCameraOrientationPlugin.h:8
@ Smooth
create mesh using dual marching cubes from OpenVDB library
Definition MRVisualObject.h:45
Definition MRObject.h:246