25 name_{ std::move(
name ) }
29 if (
auto m = obj->pointCloud() )
30 clonePointCloud_ = std::make_shared<PointCloud>( *m );
34 virtual std::string
name()
const override {
return name_; }
41 objPoints_->swapPointCloud( clonePointCloud_ );
50 [[nodiscard]]
virtual size_t heapBytes()
const override
51 {
return name_.capacity() +
MR::heapBytes( clonePointCloud_ ); }
54 std::shared_ptr<ObjectPoints> objPoints_;
55 std::shared_ptr<PointCloud> clonePointCloud_;
70 name_{ std::move(
name ) }
74 if (
auto m = obj->pointCloud() )
75 clonePoints_ = m->points;
82 clonePoints_{ std::move( newPoints ) },
83 name_{ std::move(
name ) }
88 virtual std::string
name()
const override
98 if (
auto m = objPoints_->varPointCloud() )
100 std::swap( m->points, clonePoints_ );
113 return name_.capacity() + clonePoints_.heapBytes();
117 std::shared_ptr<ObjectPoints> objPoints_;
118 VertCoords clonePoints_;
134 name_{ std::move(
name ) }
138 if (
auto m = obj->pointCloud() )
139 if ( m->points.size() > pointId_ )
140 safeCoords_ = m->points[pointId_];
148 safeCoords_{ newCoords },
149 name_{ std::move(
name ) }
154 virtual std::string
name()
const override
164 if (
auto m = objPoints_->varPointCloud() )
166 if ( m->points.size() > pointId_ )
168 std::swap( safeCoords_, m->points[pointId_] );
182 return name_.capacity();
186 std::shared_ptr<ObjectPoints> objPoints_;
188 Vector3f safeCoords_;
Definition MRChangePointCloudAction.h:126
Definition MRChangePointCloudAction.h:18
Definition MRChangePointCloudAction.h:63
Definition MRHistoryAction.h:15
Definition MRObjectPoints.h:14
size_t heapBytes(const BitSet &bs)
returns the amount of memory given BitSet occupies on heap
Definition MRBitSet.h:313
static void setObjectDirty(const std::shared_ptr< ObjectPoints > &obj)
Definition MRChangePointCloudAction.h:105
virtual std::string name() const override
Definition MRChangePointCloudAction.h:154
ChangeOnePointInCloudAction(std::string name, const std::shared_ptr< ObjectPoints > &obj, VertId pointId)
use this constructor to remember point's coordinates before making any changes in it
Definition MRChangePointCloudAction.h:131
ChangePointCloudAction(std::string name, const std::shared_ptr< ObjectPoints > &obj)
use this constructor to remember object's point cloud before making any changes in it
Definition MRChangePointCloudAction.h:23
virtual std::string name() const override
Definition MRChangePointCloudAction.h:34
virtual void action(HistoryAction::Type) override
This function is called on history action (undo, redo, etc.)
Definition MRChangePointCloudAction.h:36
static void setObjectDirty(const std::shared_ptr< ObjectPoints > &obj)
Definition MRChangePointCloudAction.h:174
ChangeOnePointInCloudAction(std::string name, const std::shared_ptr< ObjectPoints > &obj, VertId pointId, const Vector3f &newCoords)
use this constructor to remember point's coordinates and immediate set new coordinates
Definition MRChangePointCloudAction.h:145
ChangePointCloudPointsAction(std::string name, const std::shared_ptr< ObjectPoints > &obj)
use this constructor to remember object's points field before making any changes in it
Definition MRChangePointCloudAction.h:68
virtual size_t heapBytes() const override
returns the amount of memory this object occupies on heap
Definition MRChangePointCloudAction.h:180
ChangePointCloudPointsAction(std::string name, const std::shared_ptr< ObjectPoints > &obj, VertCoords &&newPoints)
use this constructor to remember object's points field and immediate set new value
Definition MRChangePointCloudAction.h:80
virtual std::string name() const override
Definition MRChangePointCloudAction.h:88
virtual size_t heapBytes() const override
returns the amount of memory this object occupies on heap
Definition MRChangePointCloudAction.h:111
Type
Definition MRHistoryAction.h:22
virtual void action(HistoryAction::Type) override
This function is called on history action (undo, redo, etc.)
Definition MRChangePointCloudAction.h:93
virtual void action(HistoryAction::Type) override
This function is called on history action (undo, redo, etc.)
Definition MRChangePointCloudAction.h:159
virtual size_t heapBytes() const override
returns the amount of memory this object occupies on heap
Definition MRChangePointCloudAction.h:50
static void setObjectDirty(const std::shared_ptr< ObjectPoints > &obj)
Definition MRChangePointCloudAction.h:44
@ DIRTY_POSITION
Definition MRVisualObject.h:77
@ DIRTY_ALL
Definition MRVisualObject.h:94
only for bindings generation
Definition MRCameraOrientationPlugin.h:8