23 name_{ std::move(
name ) }
27 if (
auto p = obj->polyline() )
28 clonePolyline_ = std::make_shared<Polyline3>( *p );
35 name_{ std::move(
name ) }
38 clonePolyline_ = obj->updatePolyline( std::move( newPolyline ) );
41 virtual std::string
name()
const override
51 clonePolyline_ = objLines_->updatePolyline( clonePolyline_ );
60 [[nodiscard]]
virtual size_t heapBytes()
const override
66 std::shared_ptr<ObjectLines> objLines_;
67 std::shared_ptr<Polyline3> clonePolyline_;
81 name_{ std::move(
name ) }
85 if (
auto p = objLines_->polyline() )
86 clonePoints_ = p->points;
89 virtual std::string
name()
const override
99 if (
auto p = objLines_->varPolyline() )
101 std::swap( p->points, clonePoints_ );
114 return name_.capacity() + clonePoints_.heapBytes();
118 std::shared_ptr<ObjectLines> objLines_;
119 VertCoords clonePoints_;
133 name_{ std::move(
name ) }
137 if (
auto p = objLines_->polyline() )
138 cloneTopology_ = p->topology;
141 virtual std::string
name()
const override
151 if (
auto p = objLines_->varPolyline() )
153 std::swap( p->topology, cloneTopology_ );
166 return name_.capacity() + cloneTopology_.
heapBytes();
170 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:54
virtual std::string name() const override
Definition MRChangePolylineAction.h:41
virtual size_t heapBytes() const override
returns the amount of memory this object occupies on heap
Definition MRChangePolylineAction.h:60
virtual void action(HistoryAction::Type) override
This function is called on history action (undo, redo, etc.)
Definition MRChangePolylineAction.h:46
ChangePolylineAction(std::string name, const std::shared_ptr< ObjectLines > &obj, std::shared_ptr< Polyline3 > newPolyline)
use this constructor to remember object's polyline and immediately set new polyline
Definition MRChangePolylineAction.h:33
Undo action for ObjectLines points only (not topology) change.
Definition MRChangePolylineAction.h:74
virtual void action(HistoryAction::Type) override
This function is called on history action (undo, redo, etc.)
Definition MRChangePolylineAction.h:94
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:79
virtual size_t heapBytes() const override
returns the amount of memory this object occupies on heap
Definition MRChangePolylineAction.h:112
static void setObjectDirty(const std::shared_ptr< ObjectLines > &obj)
Definition MRChangePolylineAction.h:106
virtual std::string name() const override
Definition MRChangePolylineAction.h:89
Undo action for ObjectLines topology only (not points) change.
Definition MRChangePolylineAction.h:126
virtual void action(HistoryAction::Type) override
This function is called on history action (undo, redo, etc.)
Definition MRChangePolylineAction.h:146
virtual size_t heapBytes() const override
returns the amount of memory this object occupies on heap
Definition MRChangePolylineAction.h:164
virtual std::string name() const override
Definition MRChangePolylineAction.h:141
static void setObjectDirty(const std::shared_ptr< ObjectLines > &obj)
Definition MRChangePolylineAction.h:158
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:131
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 BitSet &bs)
returns the amount of memory given BitSet occupies on heap
Definition MRMesh/MRBitSet.h:226
@ DIRTY_POSITION
Definition MRVisualObject.h:80
@ DIRTY_FACE
Definition MRVisualObject.h:89
@ DIRTY_ALL
Definition MRVisualObject.h:100
Definition MRCameraOrientationPlugin.h:8