22 name_{ std::move(
name ) }
26 if (
auto pc = obj->pointCloud() )
27 backupNormals_ = pc->normals;
31 virtual std::string
name()
const override
38 if ( !objPoints_ || !objPoints_->varPointCloud() )
41 std::swap( objPoints_->varPointCloud()->normals, backupNormals_ );
51 [[nodiscard]]
virtual size_t heapBytes()
const override
53 return name_.capacity() + backupNormals_.heapBytes();
57 std::shared_ptr<ObjectPoints> objPoints_;
58 VertCoords backupNormals_;
Definition MRChangePointCloudNormalsAction.h:15
virtual size_t heapBytes() const override
returns the amount of memory this object occupies on heap
Definition MRChangePointCloudNormalsAction.h:51
virtual void action(HistoryAction::Type) override
This function is called on history action (undo, redo, etc.)
Definition MRChangePointCloudNormalsAction.h:36
static void setObjectDirty(const std::shared_ptr< ObjectPoints > &obj)
Definition MRChangePointCloudNormalsAction.h:45
ChangePointCloudNormalsAction(std::string name, const std::shared_ptr< ObjectPoints > &obj)
use this constructor to remember point cloud's normals before making any changes in it
Definition MRChangePointCloudNormalsAction.h:20
virtual std::string name() const override
Definition MRChangePointCloudNormalsAction.h:31
Definition MRHistoryAction.h:12
Type
Definition MRHistoryAction.h:19
Definition MRObjectPoints.h:11
@ DIRTY_RENDER_NORMALS
Definition MRVisualObject.h:95
Definition MRCameraOrientationPlugin.h:8