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

Public Member Functions

 Downsampler (double step)
 Constructs downsampler with equal step size in all directions. More...
 
 Downsampler (double x, double y, double z)
 Construct downsampler with given step sizes in x, y, z directions. More...
 
void setStep (double step)
 Sets equal step size in all direction. More...
 
void setStep (double x, double y, double z)
 Sets step sizes in x, y, z directions. More...
 
int getIndex (int x, int y, int z)
 Returns location index given by x, y, z position. More...
 
int getSize ()
 Returns map size. More...
 
void setSizes (BoundingBoxInfo &bb)
 Sets sizes (in x, y, z direction) based on the given bounding box. More...
 
bool isActive (int i)
 Decides whether the cell is active or not. More...
 
void addPoint (PointXYZ &p)
 Adds given point to the map. More...
 
void downsample (BoundingBoxInfo &bb, std::vector< PointXYZ > &points)
 Adds given points to the map specified by the bounding box. More...
 
void getPoints (std::vector< PointXYZ > &pts)
 Returns points (with x, y, z coordinates) stored in the map. More...
 
void getPoints (std::vector< PointXYZNormal > &pts)
 Returns points (with x, y, z coordinates and normal vector) stored in the map. More...
 
void computeNormals ()
 Calculates normals.
 

Constructor & Destructor Documentation

Downsampler::Downsampler ( double  step)
inline

Constructs downsampler with equal step size in all directions.

Parameters
stepStep to be set
Downsampler::Downsampler ( double  x,
double  y,
double  z 
)
inline

Construct downsampler with given step sizes in x, y, z directions.

Parameters
xStep to be set in x-direction
yStep to be set in y-direction
zStep to be set in z-direction

Member Function Documentation

void Downsampler::addPoint ( PointXYZ p)
inline

Adds given point to the map.

Parameters
pPoint to be added
void Downsampler::downsample ( BoundingBoxInfo bb,
std::vector< PointXYZ > &  points 
)
inline

Adds given points to the map specified by the bounding box.

Parameters
bbBounding box definig the map size
pointsPoints to be added
int Downsampler::getIndex ( int  x,
int  y,
int  z 
)
inline

Returns location index given by x, y, z position.

Parameters
xPosition in x-direction
yPosition in y-direction
zPosition in z-direction
Returns
Calculated index
void Downsampler::getPoints ( std::vector< PointXYZ > &  pts)
inline

Returns points (with x, y, z coordinates) stored in the map.

Parameters
ptsReturn parametr storing the points
void Downsampler::getPoints ( std::vector< PointXYZNormal > &  pts)
inline

Returns points (with x, y, z coordinates and normal vector) stored in the map.

Parameters
ptsReturn parametr storing the points
int Downsampler::getSize ( )
inline

Returns map size.

Returns
Map size
bool Downsampler::isActive ( int  i)
inline

Decides whether the cell is active or not.

Parameters
iCell index
Returns
True if cell is active
False if cell is inactive
void Downsampler::setSizes ( BoundingBoxInfo bb)
inline

Sets sizes (in x, y, z direction) based on the given bounding box.

Parameters
bbBounding box based on which to set the size
void Downsampler::setStep ( double  step)
inline

Sets equal step size in all direction.

Parameters
stepStep to be set
void Downsampler::setStep ( double  x,
double  y,
double  z 
)
inline

Sets step sizes in x, y, z directions.

Parameters
xStep to be set in x-direction
yStep to be set in y-direction
zStep to be set in z-direction

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