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_;
84 colorMap_ = obj->getFacesColorMap();
87 virtual std::string
name()
const override
96 obj_->updateFacesColorMap( colorMap_ );
107 return name_.capacity() + colorMap_.heapBytes();
111 std::shared_ptr<ObjectMeshHolder> obj_;
112 FaceColors colorMap_;
128 colorMap_ = obj->getLinesColorMap();
131 virtual std::string
name()
const override
140 obj_->updateLinesColorMap( colorMap_ );
151 return name_.capacity() + colorMap_.heapBytes();
155 std::shared_ptr<ObjectLinesHolder> obj_;
156 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:92
virtual std::string name() const override
Definition MRChangeColoringActions.h:87
static void setObjectDirty(const std::shared_ptr< ObjectMeshHolder > &obj)
Definition MRChangeColoringActions.h:99
ChangeFacesColorMapAction(const std::string &name, const std::shared_ptr< ObjectMeshHolder > &obj)
Constructed from original obj.
Definition MRChangeColoringActions.h:79
virtual size_t heapBytes() const override
returns the amount of memory this object occupies on heap
Definition MRChangeColoringActions.h:105
Definition MRChangeColoringActions.h:119
virtual std::string name() const override
Definition MRChangeColoringActions.h:131
static void setObjectDirty(const std::shared_ptr< ObjectLinesHolder > &obj)
Definition MRChangeColoringActions.h:143
virtual size_t heapBytes() const override
returns the amount of memory this object occupies on heap
Definition MRChangeColoringActions.h:149
virtual void action(HistoryAction::Type) override
This function is called on history action (undo, redo, etc.)
Definition MRChangeColoringActions.h:136
ChangeLinesColorMapAction(const std::string &name, const std::shared_ptr< ObjectLinesHolder > &obj)
Constructed from original obj.
Definition MRChangeColoringActions.h:123
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:7