18#ifndef GEOM_POINT_CLOUD_H
19#define GEOM_POINT_CLOUD_H
42 static_assert((
dim == 1 ||
dim == 2 ||
dim == 3),
"PointCloud: `dim` must be 1, 2 or 3.");
136 {
return points_.col(
idx); };
144 {
return points_.cols(); };
PointCloud(ConstEigRef< EigMatNX< Float, dim > > points)
Constructs a PointCloud with given point data.
void clear_data()
Clears the point cloud data.
void set_line_data(ConstEigRef< EigColVecN< Float, dim > > start, ConstEigRef< EigColVecN< Float, dim > > stop, const Index num_pts)
Sets PointCloud data as points along a straight line.
Index num_points() const
Returns the number of points in the cloud.
void set_block_data(ConstEigRef< EigColVecN< Float, dim > > start, ConstEigRef< EigColVecN< Float, dim > > stop, ConstEigRef< EigColVecN< Index, dim > > num_pts)
Sets PointCloud data as a block of points.
void set_data(ConstEigRef< EigMatNX< Float, dim > > points)
Sets the point cloud data.
PointCloud()
Constructs an empty PointCloud.
EigColVecN< Float, dim > points(Index idx) const
Returns the coordinates of the point at a specific index in the cloud.
void set_polar_data(ConstEigRef< EigColVecN< Float, dim > > start, ConstEigRef< EigColVecN< Float, dim > > stop, ConstEigRef< EigColVecN< Float, dim > > center, ConstEigRef< EigColVecN< Index, dim > > num_pts)
Sets PointCloud data as points of a polar grid.
const EigMatNX< Float, dim > & points() const
Returns the coordinates of the points in the cloud.
const Eigen::Ref< const EigObj > ConstEigRef
Read-only reference to an Eigen object.
Eigen::Matrix< T, N, 1 > EigColVecN
Fixed-size column vector of size N containing type T.
std::size_t Index
Unsigned integer type for indices and container sizes.
Primary namespace for the OpenBEM library.