33 colors_ = type_ ==
Type::Back ? obj_->getBackColorsForAllViewports() :
37 virtual std::string
name()
const override
47 type_ ==
Type::Back ? obj_->getBackColorsForAllViewports() :
50 obj_->setBackColorsForAllViewports( colors_ );
52 obj_->setFrontColorsForAllViewports( colors_, type_ ==
Type::Selected );
60 [[nodiscard]]
virtual size_t heapBytes()
const override
62 return name_.capacity();
66 std::shared_ptr<VisualObject> obj_;
85 colorMap_ = obj->getFacesColorMap();
95 colorMap_ = std::move( newColorMap );
96 obj_->updateFacesColorMap( colorMap_ );
100 virtual std::string
name()
const override
109 obj_->updateFacesColorMap( colorMap_ );
120 return name_.capacity() + colorMap_.heapBytes();
124 std::shared_ptr<ObjectMeshHolder> obj_;
125 FaceColors colorMap_;
141 colorMap_ = obj->getLinesColorMap();
144 virtual std::string
name()
const override
153 obj_->updateLinesColorMap( colorMap_ );
164 return name_.capacity() + colorMap_.heapBytes();
168 std::shared_ptr<ObjectLinesHolder> obj_;
169 UndirectedEdgeColors colorMap_;
Definition MRChangeColoringActions.h:75
virtual void action(HistoryAction::Type) override
This function is called on history action (undo, redo, etc.)
Definition MRChangeColoringActions.h:105
virtual std::string name() const override
Definition MRChangeColoringActions.h:100
static void setObjectDirty(const std::shared_ptr< ObjectMeshHolder > &obj)
Definition MRChangeColoringActions.h:112
ChangeFacesColorMapAction(const std::string &name, const std::shared_ptr< ObjectMeshHolder > &obj)
use this constructor to remember object's face colors before making any changes in them
Definition MRChangeColoringActions.h:80
virtual size_t heapBytes() const override
returns the amount of memory this object occupies on heap
Definition MRChangeColoringActions.h:118
ChangeFacesColorMapAction(const std::string &name, const std::shared_ptr< ObjectMeshHolder > &obj, FaceColors &&newColorMap)
use this constructor to remember object's face colors and immediate set new value
Definition MRChangeColoringActions.h:89
Definition MRChangeColoringActions.h:132
virtual std::string name() const override
Definition MRChangeColoringActions.h:144
static void setObjectDirty(const std::shared_ptr< ObjectLinesHolder > &obj)
Definition MRChangeColoringActions.h:156
virtual size_t heapBytes() const override
returns the amount of memory this object occupies on heap
Definition MRChangeColoringActions.h:162
virtual void action(HistoryAction::Type) override
This function is called on history action (undo, redo, etc.)
Definition MRChangeColoringActions.h:149
ChangeLinesColorMapAction(const std::string &name, const std::shared_ptr< ObjectLinesHolder > &obj)
Constructed from original obj.
Definition MRChangeColoringActions.h:136
Definition MRChangeColoringActions.h:15
ChangeObjectColorAction(const std::string &name, const std::shared_ptr< VisualObject > &obj, Type type)
Constructed from original obj.
Definition MRChangeColoringActions.h:27
virtual size_t heapBytes() const override
returns the amount of memory this object occupies on heap
Definition MRChangeColoringActions.h:60
Type
Definition MRChangeColoringActions.h:20
static void setObjectDirty(const std::shared_ptr< VisualObject > &)
Definition MRChangeColoringActions.h:56
virtual std::string name() const override
Definition MRChangeColoringActions.h:37
virtual void action(HistoryAction::Type) override
This function is called on history action (undo, redo, etc.)
Definition MRChangeColoringActions.h:42
Definition MRHistoryAction.h:12
Type
Definition MRHistoryAction.h:19
Definition MRObjectLinesHolder.h:19
Definition MRObjectMeshHolder.h:30
Definition MRViewportProperty.h:17
Visual Object.
Definition MRVisualObject.h:131
@ DIRTY_PRIMITIVE_COLORMAP
Definition MRVisualObject.h:101
Definition MRCameraOrientationPlugin.h:8