25 selection_ = objMesh_->getSelectedFaces();
35 selection_ = objMesh_->getSelectedFaces();
36 objMesh_->selectFaces( std::move( newSelection ) );
39 virtual std::string
name()
const override {
return name_; }
45 auto tmp = objMesh_->getSelectedFaces();
46 objMesh_->selectFaces( selection_ );
47 selection_ = std::move( tmp );
50 const FaceBitSet &
selection()
const {
return selection_; }
55 [[nodiscard]]
virtual size_t heapBytes()
const override
57 return name_.capacity() + selection_.heapBytes();
62 std::shared_ptr<ObjectMesh> objMesh_;
63 FaceBitSet selection_;
79 selection_ = objMesh_->getSelectedEdges();
89 selection_ = objMesh_->getSelectedEdges();
90 objMesh_->selectEdges( std::move( newSelection ) );
93 virtual std::string
name()
const override {
return name_; }
99 auto tmp = objMesh_->getSelectedEdges();
100 objMesh_->selectEdges( std::move( selection_ ) );
101 selection_ = std::move( tmp );
104 const UndirectedEdgeBitSet &
selection()
const {
return selection_; }
111 return name_.capacity() + selection_.heapBytes();
116 std::shared_ptr<ObjectMesh> objMesh_;
117 UndirectedEdgeBitSet selection_;
133 creases_ = objMesh_->creases();
136 virtual std::string
name()
const override {
return name_; }
142 auto tmp = objMesh_->creases();
143 objMesh_->setCreases( std::move( creases_ ) );
144 creases_ = std::move( tmp );
147 const UndirectedEdgeBitSet &
creases()
const {
return creases_; }
154 return name_.capacity() + creases_.heapBytes();
159 std::shared_ptr<ObjectMesh> objMesh_;
160 UndirectedEdgeBitSet creases_;
172 objPoints_{ objPoints }
176 selection_ = objPoints_->getSelectedPoints();
179 virtual std::string
name()
const override {
return name_; }
185 auto tmp = objPoints_->getSelectedPoints();
186 objPoints_->selectPoints( selection_ );
187 selection_ = std::move( tmp );
190 const VertBitSet&
selection()
const {
return selection_; }
198 return name_.capacity() + selection_.heapBytes();
203 std::shared_ptr<ObjectPoints> objPoints_;
204 VertBitSet selection_;
Undo action for ObjectMesh creases.
Definition MRChangeSelectionAction.h:122
virtual void action(Type) override
This function is called on history action (undo, redo, etc.)
Definition MRChangeSelectionAction.h:138
ChangeMeshCreasesAction(const std::string &name, const std::shared_ptr< ObjectMesh > &objMesh)
use this constructor to remember object's creases before making any changes in it
Definition MRChangeSelectionAction.h:127
static void setObjectDirty(const std::shared_ptr< ObjectMesh > &)
empty because set dirty is inside setCreases
Definition MRChangeSelectionAction.h:150
virtual size_t heapBytes() const override
returns the amount of memory this object occupies on heap
Definition MRChangeSelectionAction.h:152
const UndirectedEdgeBitSet & creases() const
Definition MRChangeSelectionAction.h:147
virtual std::string name() const override
Definition MRChangeSelectionAction.h:136
Undo action for ObjectMesh edge selection.
Definition MRChangeSelectionAction.h:68
virtual size_t heapBytes() const override
returns the amount of memory this object occupies on heap
Definition MRChangeSelectionAction.h:109
static void setObjectDirty(const std::shared_ptr< ObjectMesh > &)
empty because set dirty is inside selectEdges
Definition MRChangeSelectionAction.h:107
ChangeMeshEdgeSelectionAction(const std::string &name, const std::shared_ptr< ObjectMesh > &objMesh)
use this constructor to remember object's edge selection before making any changes in it
Definition MRChangeSelectionAction.h:73
virtual std::string name() const override
Definition MRChangeSelectionAction.h:93
const UndirectedEdgeBitSet & selection() const
Definition MRChangeSelectionAction.h:104
ChangeMeshEdgeSelectionAction(const std::string &name, const std::shared_ptr< ObjectMesh > &objMesh, UndirectedEdgeBitSet &&newSelection)
use this constructor to remember object's edge selection and immediate set new selection
Definition MRChangeSelectionAction.h:83
virtual void action(Type) override
This function is called on history action (undo, redo, etc.)
Definition MRChangeSelectionAction.h:95
Undo action for ObjectMesh face selection.
Definition MRChangeSelectionAction.h:14
virtual size_t heapBytes() const override
returns the amount of memory this object occupies on heap
Definition MRChangeSelectionAction.h:55
const FaceBitSet & selection() const
Definition MRChangeSelectionAction.h:50
virtual void action(Type) override
This function is called on history action (undo, redo, etc.)
Definition MRChangeSelectionAction.h:41
virtual std::string name() const override
Definition MRChangeSelectionAction.h:39
ChangeMeshFaceSelectionAction(const std::string &name, const std::shared_ptr< ObjectMesh > &objMesh)
use this constructor to remember object's face selection before making any changes in it
Definition MRChangeSelectionAction.h:19
ChangeMeshFaceSelectionAction(const std::string &name, const std::shared_ptr< ObjectMesh > &objMesh, FaceBitSet &&newSelection)
use this constructor to remember object's face selection and immediate set new value
Definition MRChangeSelectionAction.h:29
static void setObjectDirty(const std::shared_ptr< ObjectMesh > &)
empty because set dirty is inside selectFaces
Definition MRChangeSelectionAction.h:53
Undo action for ObjectPoints point selection.
Definition MRChangeSelectionAction.h:165
const VertBitSet & selection() const
Definition MRChangeSelectionAction.h:190
ChangePointPointSelectionAction(const std::string &name, const std::shared_ptr< ObjectPoints > &objPoints)
use this constructor to remember object's vertex selection before making any changes in it
Definition MRChangeSelectionAction.h:170
static void setObjectDirty(const std::shared_ptr< ObjectPoints > &)
empty because set dirty is inside selectPoints
Definition MRChangeSelectionAction.h:193
virtual std::string name() const override
Definition MRChangeSelectionAction.h:179
virtual void action(Type) override
This function is called on history action (undo, redo, etc.)
Definition MRChangeSelectionAction.h:181
virtual size_t heapBytes() const override
returns the amount of memory this object occupies on heap
Definition MRChangeSelectionAction.h:196
Definition MRHistoryAction.h:12
Type
Definition MRHistoryAction.h:19
Definition MRObjectMesh.h:11
Definition MRObjectPoints.h:11
Definition MRCameraOrientationPlugin.h:8