Commit 58279a83 authored by David Flynn's avatar David Flynn
Browse files

pointcloud: concatenation of two point clouds via append()

With slice/tile-based coding, it is necessary to build an output
point cloud from independent slice/tiles.  An append operation allows
the points of two point clouds to be concatenated.
parent 29ab50ed
......@@ -351,6 +351,31 @@ public:
void append(const PCCPointSet3& src)
if (!getPointCount())
addRemoveAttributes(src.hasColors(), src.hasReflectances());
int dstEnd = positions.size();
int srcSize = src.positions.size();
resize(dstEnd + srcSize);
src.positions.begin(), src.positions.end(),
std::next(positions.begin(), dstEnd));
if (hasColors() && src.hasColors())
src.colors.begin(), src.colors.end(),
std::next(colors.begin(), dstEnd));
if (hasReflectances() && src.hasReflectances())
src.reflectances.begin(), src.reflectances.end(),
std::next(reflectances.begin(), dstEnd));
void swapPoints(const size_t index1, const size_t index2)
assert(index1 < getPointCount());
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment