Using Point Selection

Most of the point selection is currently only available in C++.

Below functions can be called directly on the Point Cloud asset, as well as the Point Cloud Component. In the latter case, the transformation settings of the component will also be considered when processing selections.

Retrieve Points Using Selection

Those functions will populate the provided array reference with all points within the given constrain. Points are stored as pointers to allow its modification later.

Note: If you only want to process the selection once, consider using SetVisibilityOf… or ExecuteActionOn… functions, as they will execute faster in such scenario. Retrieving points is recommended if you want to process the selection multiple times or delay the processing in time.

Get Points In Sphere

Get Points In Box

// Retrieve all points withing 1000 units of 0,0,0
TArray<FPointCloudPoint*> SelectedPoints;
MyPointCloud->GetPointsInSphere(SelectedPoints, FVector(0,0,0), 1000, false);

Modify Visibility Using Selection

Those functions allow you to efficiently apply new visibility flag to the selection of points. Available in Blueprints.

Note: Async versions of the functions do not wait for completion before returning from the call. Completion callback is available.

Set Visibility Of Points In Sphere

Set Visibility Of Points In Box

// Make all points withing 1000 units of 0,0,0 invisible
MyPointCloud->SetVisibilityOfPointsInSphere(false, FVector(0,0,0), 1000);

Execute Actions On Points In Selection

Those functions allow you to execute a set actions on all points within the selection using Lambda expressions.

Note: Async versions of the functions do not wait for completion before returning from the call. Completion callback is available.

Execute Action On Points In Sphere

Execute Action On Points In Box

// Change color of all points withing 1000 units of 0,0,0 to red
MyPointCloud->ExecuteActionOnPointsInSphere([](FPointCloudPoint* Point){
    Point->Color = FColor::Red;
}, FVector(0,0,0), 1000, false);