gtsam_points
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
gtsam_points::PointCloud Struct Reference

Standard point cloud class that holds only pointers to point attributes. More...

#include <point_cloud.hpp>

Inheritance diagram for gtsam_points::PointCloud:
Inheritance graph
[legend]

Public Types

using Ptr = std::shared_ptr< PointCloud >
 
using ConstPtr = std::shared_ptr< const PointCloud >
 

Public Member Functions

 PointCloud (const PointCloud &)=delete
 
PointCloudoperator= (PointCloud const &)=delete
 
size_t size () const
 Number of points.
 
bool has_times () const
 Check if the point cloud has per-point timestamps.
 
bool has_points () const
 Check if the point cloud has points.
 
bool has_normals () const
 Check if the point cloud has point normals.
 
bool has_covs () const
 Check if the point cloud has point covariances.
 
bool has_intensities () const
 Check if the point cloud has point intensities.
 
bool check_times () const
 Warn if the point cloud doesn't have times.
 
bool check_points () const
 Warn if the point cloud doesn't have points.
 
bool check_normals () const
 Warn if the point cloud doesn't have normals.
 
bool check_covs () const
 Warn if the point cloud doesn't have covs.
 
bool check_intensities () const
 Warn if the point cloud doesn't have intensities.
 
bool has_times_gpu () const
 Check if the point cloud has per-point timestamps on GPU.
 
bool has_points_gpu () const
 Check if the point cloud has points on GPU.
 
bool has_normals_gpu () const
 Check if the point cloud has point normals on GPU.
 
bool has_covs_gpu () const
 Check if the point cloud has point covariances on GPU.
 
bool has_intensities_gpu () const
 Check if the point cloud has point intensities on GPU.
 
bool check_times_gpu () const
 Warn if the point cloud doesn't have times on GPU.
 
bool check_points_gpu () const
 Warn if the point cloud doesn't have points on GPU.
 
bool check_normals_gpu () const
 Warn if the point cloud doesn't have normals on GPU.
 
bool check_covs_gpu () const
 Warn if the point cloud doesn't have covs on GPU.
 
bool check_intensities_gpu () const
 Warn if the point cloud doesn't have intensities on GPU.
 
template<typename T >
const T * aux_attribute (const std::string &attrib) const
 Get the pointer to an aux attribute.
 
void save (const std::string &path) const
 Save the point cloud data.
 
void save_compact (const std::string &path) const
 Save the point cloud data with a compact representation without unnecessary fields (e.g., the last element of homogeneous coordinates).
 

Public Attributes

size_t num_points
 Number of points.
 
double * times
 Per-point timestamp w.r.t. the first point (should be sorted)
 
Eigen::Vector4d * points
 Point coordinates (x, y, z, 1)
 
Eigen::Vector4d * normals
 Point normals (nx, ny, nz, 0)
 
Eigen::Matrix4d * covs
 Point covariances cov(3, 3) = 0.
 
double * intensities
 Point intensities.
 
std::unordered_map< std::string, std::pair< size_t, void * > > aux_attributes
 Aux attributes <attribute_name, pair<element_size, data_ptr>>
 
float * times_gpu
 Per-point timestamp on GPU.
 
Eigen::Vector3f * points_gpu
 Point coordinates on GPU.
 
Eigen::Vector3f * normals_gpu
 Point normals on GPU.
 
Eigen::Matrix3f * covs_gpu
 Point covariances on GPU.
 
float * intensities_gpu
 Point intensities on GPU.
 

Detailed Description

Standard point cloud class that holds only pointers to point attributes.

Note
If you don't want to manage the lifetime of point data by yourself, use gtsam_points::PointCloudCPU.

Member Function Documentation

◆ aux_attribute()

template<typename T >
const T * gtsam_points::PointCloud::aux_attribute ( const std::string &  attrib) const
inline

Get the pointer to an aux attribute.

Parameters
attribAttribute name
Returns
Returns the pointer to it if the specified attribute exists. Otherwise, returns nullptr.

◆ save()

void gtsam_points::PointCloud::save ( const std::string &  path) const

Save the point cloud data.

Parameters
pathDestination path

◆ save_compact()

void gtsam_points::PointCloud::save_compact ( const std::string &  path) const

Save the point cloud data with a compact representation without unnecessary fields (e.g., the last element of homogeneous coordinates).

Parameters
path

The documentation for this struct was generated from the following file: