PointCloud2BIM Library  1.0
Library to facilitate the transpormation of point clouds into digital BIM representation
Public Member Functions | List of all members
PointCloud Class Reference

Public Member Functions

 PointCloud ()=default
 Constructs empty PointCloud.
 
 PointCloud (std::string name)
 Constructs PointCloud with given name. More...
 
void setId (double id)
 Sets PointCloud identifier. More...
 
int getId () const
 Returns PointCloud identifier. More...
 
std::string getName () const
 Returns PointCloud name. More...
 
void setName (std::string name)
 Sets PointCloud name. More...
 
PointType getPointType () const
 Returns PointType. More...
 
void setPointType (PointType name)
 Sets PointType. More...
 
fs::path getFilepath ()
 Returns path to the file storing the PointCloud. More...
 
void setFilepath (fs::path filepath)
 Sets path to the file storing the PointCloud. More...
 
void writePointsCount (int n)
 Saves number of points to the file storing the PointCloud. More...
 
int getNumberOfPoints ()
 Returns number of points in the PointCloud. More...
 
template<typename T >
void writeXYZPoint (std::fstream &output, T &point)
 Saves the point to the file. More...
 
void writeXYZNormalPoint (std::fstream &output, PointXYZ &point)
 Saves the point to the file. More...
 
void writeXYZNormalPoint (std::fstream &output, PointXYZNormal &point)
 Saves the point to the file. More...
 
template<typename T >
void setPoints (std::vector< T > &points)
 Sets points of the PointCloud. More...
 
void readXYZPoint (std::ifstream &infile, std::vector< PointXYZ > &points)
 Uploads points from the given file. More...
 
void readXYZPoint (std::ifstream &infile, std::vector< PointXYZNormal > &points)
 Uploads points from the given file. More...
 
void readXYZNormalPoint (std::ifstream &infile, std::vector< PointXYZNormal > &points)
 Uploads points from the given file. More...
 
void readXYZNormalPoint (std::ifstream &infile, std::vector< PointXYZ > &points)
 Uploads points from the given file. More...
 
template<typename T >
void getPoints (std::vector< T > &points)
 Returns points stored in the PointCloud. More...
 

Constructor & Destructor Documentation

PointCloud::PointCloud ( std::string  name)
inline

Constructs PointCloud with given name.

Parameters
namePointCloud name

Member Function Documentation

fs::path PointCloud::getFilepath ( )
inline

Returns path to the file storing the PointCloud.

Returns
File path
int PointCloud::getId ( ) const
inline

Returns PointCloud identifier.

Returns
PointCloud identifier
std::string PointCloud::getName ( ) const
inline

Returns PointCloud name.

Returns
PointCloud name
int PointCloud::getNumberOfPoints ( )
inline

Returns number of points in the PointCloud.

Returns
Number of points
template<typename T >
void PointCloud::getPoints ( std::vector< T > &  points)
inline

Returns points stored in the PointCloud.

Parameters
pointsReturn parametr storing the points
PointType PointCloud::getPointType ( ) const
inline

Returns PointType.

Returns
PointType (xyz/ xyznormal)
void PointCloud::readXYZNormalPoint ( std::ifstream &  infile,
std::vector< PointXYZNormal > &  points 
)
inline

Uploads points from the given file.

Parameters
infileFile storing the PointCloud
pointsReturn parametr storing the uploaded points
void PointCloud::readXYZNormalPoint ( std::ifstream &  infile,
std::vector< PointXYZ > &  points 
)
inline

Uploads points from the given file.

Parameters
infileFile storing the PointCloud
pointsReturn parametr storing the uploaded points
void PointCloud::readXYZPoint ( std::ifstream &  infile,
std::vector< PointXYZ > &  points 
)
inline

Uploads points from the given file.

Parameters
infileFile storing the PointCloud
pointsReturn parametr storing the uploaded points
void PointCloud::readXYZPoint ( std::ifstream &  infile,
std::vector< PointXYZNormal > &  points 
)
inline

Uploads points from the given file.

Parameters
infileFile storing the PointCloud
pointsReturn parametr storing the uploaded points
void PointCloud::setFilepath ( fs::path  filepath)
inline

Sets path to the file storing the PointCloud.

Parameters
filepathFile path to be set
void PointCloud::setId ( double  id)
inline

Sets PointCloud identifier.

Parameters
idIdentifier to be set
void PointCloud::setName ( std::string  name)
inline

Sets PointCloud name.

Parameters
nameName to be set
template<typename T >
void PointCloud::setPoints ( std::vector< T > &  points)
inline

Sets points of the PointCloud.

Parameters
pointsPoints to be saved
void PointCloud::setPointType ( PointType  name)
inline

Sets PointType.

Parameters
namePointType to be set (xyz/ xyznormal)
void PointCloud::writePointsCount ( int  n)
inline

Saves number of points to the file storing the PointCloud.

Parameters
nNumber of points to be saved
void PointCloud::writeXYZNormalPoint ( std::fstream &  output,
PointXYZ point 
)
inline

Saves the point to the file.

Parameters
outputFile where to save the point
pointPoint to be saved
void PointCloud::writeXYZNormalPoint ( std::fstream &  output,
PointXYZNormal point 
)
inline

Saves the point to the file.

Parameters
outputFile where to save the point
pointPoint to be saved
template<typename T >
void PointCloud::writeXYZPoint ( std::fstream &  output,
T &  point 
)
inline

Saves the point to the file.

Parameters
outputFile where to save the point
pointPoint to be saved

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