0
私はstd :: vectorコレクションにいくつかのポイントを持っており、これを使ってpcl :: PointCloudオブジェクトを作成しようとしています。ドキュメントを見ても私を助けませんでした。何か案は?std :: vectorからPointCloudを作成する
私はstd :: vectorコレクションにいくつかのポイントを持っており、これを使ってpcl :: PointCloudオブジェクトを作成しようとしています。ドキュメントを見ても私を助けませんでした。何か案は?std :: vectorからPointCloudを作成する
ちょうど要素ごとにコピーします。
void CloudToVector(const std::vector<PointType>& inPointVector, PointCloud& outPointCloud)
{
for(const PointType& point : inPointVector)
{
outPointCloud.push_back(point);
}
}
UPDは、これも動作するはず
void CloudToVector(const std::vector<PointType>& inPointVector, PointCloud& outPointCloud)
{
outPointCloud.points = inPointVector;
}