MCPcopy Create free account
hub / github.com/PointCloudLibrary/pcl / execute

Method execute

apps/point_cloud_editor/src/cutCommand.cpp:56–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54= default;
55
56void
57CutCommand::execute ()
58{
59 if (!cloud_ptr_)
60 return;
61 if (selection_ptr_->empty())
62 return;
63
64 // do the copy
65 copy_buffer_ptr_ -> set(cloud_ptr_, *selection_ptr_);
66
67 // back up copied points for undo
68 cut_cloud_buffer_ = *copy_buffer_ptr_;
69 cut_selection_ = *selection_ptr_;
70
71 // remove the copied points from the cloud.
72 cloud_ptr_ -> remove(cut_selection_);
73
74 // The selection points to the incorrect points or may have indices out of
75 // bounds, so we must clear it.
76 selection_ptr_ -> clear();
77
78 // notify the cloud that the selection has changed
79 cloud_ptr_ -> setSelection(selection_ptr_);
80}
81
82void
83CutCommand::undo()

Callers 6

endMethod · 0.45
copyMethod · 0.45
pasteMethod · 0.45
removeMethod · 0.45
cutMethod · 0.45
denoiseMethod · 0.45

Calls 5

setSelectionMethod · 0.80
emptyMethod · 0.45
setMethod · 0.45
removeMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected