23 name_{ std::move(
name ) }
27 if (
auto p = obj->polylinePtr() )
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_->polylinePtr() )
86 clonePoints_ = p->points;
92 clonePoints_{ std::move( newPoints ) },
93 name_{ std::move(
name ) }
98 virtual std::string
name()
const override
108 if (
auto p = objLines_->varPolyline() )
110 std::swap( p->points, clonePoints_ );
123 return name_.capacity() + clonePoints_.heapBytes();
127 std::shared_ptr<ObjectLines> objLines_;
128 VertCoords clonePoints_;
142 name_{ std::move(
name ) }
146 if (
auto p = objLines_->polylinePtr() )
147 cloneTopology_ = p->topology;
150 virtual std::string
name()
const override
160 if (
auto p = objLines_->varPolyline() )
162 std::swap( p->topology, cloneTopology_ );
175 return name_.capacity() + cloneTopology_.heapBytes();
179 std::shared_ptr<ObjectLines> objLines_;
197 name_{ std::move(
name ) }
201 if (
auto m = obj->polylinePtr() )
202 if ( m->points.size() > pointId_ )
203 safeCoords_ = m->points[pointId_];
211 safeCoords_{ newCoords },
212 name_{ std::move(
name ) }
217 virtual std::string
name()
const override
227 if (
auto m = objPoints_->varPolyline() )
229 if ( m->points.size() > pointId_ )
231 std::swap( safeCoords_, m->points[pointId_] );
245 return name_.capacity();
249 std::shared_ptr<ObjectLines> objPoints_;
251 Vector3f safeCoords_;
virtual void action(HistoryAction::Type) override
This function is called on history action (undo, redo, etc.)
Definition MRChangePolylineAction.h:222
virtual std::string name() const override
Definition MRChangePolylineAction.h:217
virtual size_t heapBytes() const override
returns the amount of memory this object occupies on heap
Definition MRChangePolylineAction.h:243
ChangeOnePointInPolylineAction(std::string name, const std::shared_ptr< ObjectLines > &obj, VertId pointId, const Vector3f &newCoords)
use this constructor to remember point's coordinates and immediate set new coordinates
Definition MRChangePolylineAction.h:208
ChangeOnePointInPolylineAction(std::string name, const std::shared_ptr< ObjectLines > &obj, VertId pointId)
use this constructor to remember point's coordinates before making any changes in it
Definition MRChangePolylineAction.h:194
static void setObjectDirty(const std::shared_ptr< ObjectLines > &obj)
Definition MRChangePolylineAction.h:237
ObjectLines Obj
Definition MRChangePolylineAction.h:191
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
ObjectLines Obj
Definition MRChangePolylineAction.h:18
ObjectLines Obj
Definition MRChangePolylineAction.h:76
virtual void action(HistoryAction::Type) override
This function is called on history action (undo, redo, etc.)
Definition MRChangePolylineAction.h:103
ChangePolylinePointsAction(std::string name, const std::shared_ptr< ObjectLines > &obj, VertCoords &&newPoints)
use this constructor to remember object's lines points and immediate set new value
Definition MRChangePolylineAction.h:90
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:121
static void setObjectDirty(const std::shared_ptr< ObjectLines > &obj)
Definition MRChangePolylineAction.h:115
virtual std::string name() const override
Definition MRChangePolylineAction.h:98
virtual void action(HistoryAction::Type) override
This function is called on history action (undo, redo, etc.)
Definition MRChangePolylineAction.h:155
virtual size_t heapBytes() const override
returns the amount of memory this object occupies on heap
Definition MRChangePolylineAction.h:173
virtual std::string name() const override
Definition MRChangePolylineAction.h:150
static void setObjectDirty(const std::shared_ptr< ObjectLines > &obj)
Definition MRChangePolylineAction.h:167
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:140
ObjectLines Obj
Definition MRChangePolylineAction.h:137
Definition MRObjectLines.h:14
Definition MRPolylineTopology.h:18
size_t heapBytes(const BitSet &bs)
returns the amount of memory given BitSet occupies on heap
Definition MRBitSet.h:377
Type
Definition MRHistoryAction.h:27
HistoryAction()=default
explicitly define ctors to avoid warning C5267: definition of implicit copy constructor is deprecated...
@ Redo
Definition MRHistoryAction.h:29
@ DIRTY_POSITION
Definition MRVisualObject.h:77
@ DIRTY_FACE
Definition MRVisualObject.h:85
@ DIRTY_ALL
Definition MRVisualObject.h:94
only for bindings generation
Definition MRCameraOrientationPlugin.h:8