MeshLib C++ Docs
Loading...
Searching...
No Matches
MRPointCloudPart.h
Go to the documentation of this file.
1#pragma once
2
3#include "MRMeshFwd.h"
4
5namespace MR
6{
7
9struct PointCloudPart
10{
11 const PointCloud& cloud;
12 const VertBitSet* region = nullptr; // nullptr here means all valid points of point cloud
13
14 PointCloudPart( const PointCloud& c, const VertBitSet* bs = nullptr ) noexcept : cloud( c ), region( bs ) {}
15
16 // Make this assignable. A better idea would be to rewrite the class to not use references, but doing this instead preserves API compatibility.
17 PointCloudPart( const PointCloudPart& other ) noexcept = default;
18 PointCloudPart& operator=( const PointCloudPart& other ) noexcept
19 {
20 if ( this != &other )
21 {
22 // In modern C++ the result doesn't need to be `std::launder`ed, right?
23 this->~PointCloudPart();
24 ::new( ( void* )this ) PointCloudPart( other );
25 }
26 return *this;
27 }
28};
29
30} // namespace MR
unsafe PointCloudPart(MR.Const_PointCloudPart other)
Definition MRCameraOrientationPlugin.h:8