23 name_{ std::move(
name ) }
27 if (
auto p = obj->polyline() )
28 clonePolyline_ = std::make_shared<Polyline3>( *p );
32 virtual std::string
name()
const override
42 clonePolyline_ = objLines_->updatePolyline( clonePolyline_ );
51 [[nodiscard]]
virtual size_t heapBytes()
const override
57 std::shared_ptr<ObjectLines> objLines_;
58 std::shared_ptr<Polyline3> clonePolyline_;
72 name_{ std::move(
name ) }
76 if (
auto p = objLines_->polyline() )
77 clonePoints_ = p->points;
80 virtual std::string
name()
const override
90 if (
auto p = objLines_->varPolyline() )
92 std::swap( p->points, clonePoints_ );
105 return name_.capacity() + clonePoints_.heapBytes();
109 std::shared_ptr<ObjectLines> objLines_;
110 VertCoords clonePoints_;
124 name_{ std::move(
name ) }
128 if (
auto p = objLines_->polyline() )
129 cloneTopology_ = p->topology;
132 virtual std::string
name()
const override
142 if (
auto p = objLines_->varPolyline() )
144 std::swap( p->topology, cloneTopology_ );
157 return name_.capacity() + cloneTopology_.
heapBytes();
161 std::shared_ptr<ObjectLines> objLines_;
Undo action for ObjectLines polyline change.
Definition MRChangePolylineAction.h:16
ChangePolylineAction(std::string name, const std::shared_ptr< ObjectLines > &obj)
use this constructor to remember object's polyline before making any changes in it
Definition MRChangePolylineAction.h:21
static void setObjectDirty(const std::shared_ptr< ObjectLines > &obj)
Definition MRChangePolylineAction.h:45
virtual std::string name() const override
Definition MRChangePolylineAction.h:32
virtual size_t heapBytes() const override
returns the amount of memory this object occupies on heap
Definition MRChangePolylineAction.h:51
virtual void action(HistoryAction::Type) override
This function is called on history action (undo, redo, etc.)
Definition MRChangePolylineAction.h:37
Undo action for ObjectLines points only (not topology) change.
Definition MRChangePolylineAction.h:65
virtual void action(HistoryAction::Type) override
This function is called on history action (undo, redo, etc.)
Definition MRChangePolylineAction.h:85
ChangePolylinePointsAction(std::string name, const std::shared_ptr< ObjectLines > &obj)
use this constructor to remember object's lines points before making any changes in it
Definition MRChangePolylineAction.h:70
virtual size_t heapBytes() const override
returns the amount of memory this object occupies on heap
Definition MRChangePolylineAction.h:103
static void setObjectDirty(const std::shared_ptr< ObjectLines > &obj)
Definition MRChangePolylineAction.h:97
virtual std::string name() const override
Definition MRChangePolylineAction.h:80
Undo action for ObjectLines topology only (not points) change.
Definition MRChangePolylineAction.h:117
virtual void action(HistoryAction::Type) override
This function is called on history action (undo, redo, etc.)
Definition MRChangePolylineAction.h:137
virtual size_t heapBytes() const override
returns the amount of memory this object occupies on heap
Definition MRChangePolylineAction.h:155
virtual std::string name() const override
Definition MRChangePolylineAction.h:132
static void setObjectDirty(const std::shared_ptr< ObjectLines > &obj)
Definition MRChangePolylineAction.h:149
ChangePolylineTopologyAction(std::string name, const std::shared_ptr< ObjectLines > &obj)
use this constructor to remember object's lines points before making any changes in it
Definition MRChangePolylineAction.h:122
Definition MRHistoryAction.h:12
Type
Definition MRHistoryAction.h:19
Definition MRObjectLines.h:11
Definition MRPolylineTopology.h:15
MRMESH_API size_t heapBytes() const
returns the amount of memory this object occupies on heap
size_t heapBytes(const std::vector< T > &vec)
returns the amount of memory given vector occupies on heap
Definition MRHeapBytes.h:15
@ DIRTY_POSITION
Definition MRVisualObject.h:90
@ DIRTY_FACE
Definition MRVisualObject.h:99
@ DIRTY_ALL
Definition MRVisualObject.h:109
Definition MRCameraOrientationPlugin.h:8