ESyS-Particle  2.3.4
PointCloud Class Reference

A class representing a cloud.of points. More...

#include <PointCloud.h>

Collaboration diagram for PointCloud:

Public Member Functions

 PointCloud ()
 
Vec3 getCenter ()
 
void addPoint (const Vec3 &)
 
Plane3D getFitPlane ()
 

Private Attributes

vector< Vec3m_points
 

Detailed Description

A class representing a cloud.of points.

Author
Steffen Abe $Revision$ $Date$

Constructor & Destructor Documentation

◆ PointCloud()

PointCloud::PointCloud ( )

construct an empty point cloud - do nothing

Member Function Documentation

◆ addPoint()

void PointCloud::addPoint ( const Vec3 p)

add a point

Parameters
pthe position of the point

References m_points.

Referenced by fitPlaneToFracture().

Here is the caller graph for this function:

◆ getCenter()

Vec3 PointCloud::getCenter ( )

calculate center point

References esys::lsm::bpu::iter(), and m_points.

Referenced by getFitPlane().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getFitPlane()

Plane3D PointCloud::getFitPlane ( )

find a plane that best fits the could of points. Algorithm as described in Schneider & Eberly "Geometric Tools for Computer Graphics", pp 884/885, i.e. getting the eigenvectors of a matrix with m_11=\sum(x_i-a)^2 m_12=\sum(x_i-a)(y_i-b) m_13=\sum(x_i-a)(z_i-c) m_22=\sum(y_i-b)^2 m_23=\sum(y_i-b)(z_i-c) m_33=\sum(z_i-c)^2 where (a,b,c) is the center of the cloud

References Matrix3::eigen(), getCenter(), esys::lsm::bpu::iter(), m_points, Vec3::X(), Vec3::Y(), and Vec3::Z().

Referenced by fitPlaneToFracture().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_points

vector<Vec3> PointCloud::m_points
private

Referenced by addPoint(), getCenter(), and getFitPlane().


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