SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
A wrapper for point cloud data. More...
#include <PointCloud.h>
Public Member Functions | |
PointCloud (std::size_t nPoints, const std::function< std::array< double, 3 >(std::size_t)> &coordinates, const std::function< double(std::size_t)> &data, const std::function< bool(std::size_t)> &valid) | |
PointCloud () | |
Returns an invalid PointCloud. | |
PointCloud (std::size_t nPoints, const std::function< std::array< double, 3 >(std::size_t)> &coordinates, const std::function< double(std::size_t)> &data) | |
Constructs a PointCloud with no blanking (all points are considered valid). | |
PointCloud (std::size_t nPoints, const double *const coordinates, const double *const data) | |
Constructs a PointCloud from arrays of coordinates and data. More... | |
PointCloud (std::size_t nPoints, const float *const coordinates, const float *const data) | |
Constructs a PointCloud from arrays of coordinates and data. More... | |
PointCloud (std::vector< double > &&coordinates, std::vector< double > &&data) | |
Constructs a PointCloud from vectors of coordinates and data. | |
std::size_t | size () const |
const std::function< std::array< double, 3 >std::size_t)> & | coordinates () const |
const std::function< double(std::size_t)> & | data () const |
bool | containsIndex (std::size_t i) const |
Given an index into the structured data, determine whether or not the point is valid. | |
Protected Attributes | |
std::size_t | m_size |
std::function< std::array< double, 3 >std::size_t)> | m_coordinates |
std::function< double(std::size_t)> | m_data |
std::function< bool(std::size_t)> | m_valid |
A wrapper for point cloud data.
This class is a facade for describing external data sets that consist of unstructured points and associated scalar values. While there is convenience API for converting arrays of coordinates and data into this format, the general use of this class is to pass it a size nPoints and two functors coordinates and data. coordinates is an I->R^3 function for accessing the ith coordinate of the data set, and data is an I->R function for accessing the scalar value associated with the ith point.
|
inline |
Constructs a PointCloud from arrays of coordinates and data.
The arrays must remain in scope for the lifetime of the PointCloud.
|
inline |
Constructs a PointCloud from arrays of coordinates and data.
The arrays must remain in scope for the lifetime of the PointCloud.