ESyS-Particle  2.3
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 ( )

construct an empty point cloud - do nothing

Member Function Documentation

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:

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:

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=(x_i-a)^2 m_12=(x_i-a)(y_i-b) m_13=(x_i-a)(z_i-c) m_22=(y_i-b)^2 m_23=(y_i-b)(z_i-c) m_33=(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

vector<Vec3> PointCloud::m_points
private

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


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