|
ESyS-Particle
2.3.4
|
A class representing a cloud.of points. More...
#include <PointCloud.h>

Public Member Functions | |
| PointCloud () | |
| Vec3 | getCenter () |
| void | addPoint (const Vec3 &) |
| Plane3D | getFitPlane () |
Private Attributes | |
| vector< Vec3 > | m_points |
A class representing a cloud.of points.
| PointCloud::PointCloud | ( | ) |
construct an empty point cloud - do nothing
| void PointCloud::addPoint | ( | const Vec3 & | p | ) |
add a point
| p | the position of the point |
References m_points.
Referenced by fitPlaneToFracture().

| Vec3 PointCloud::getCenter | ( | ) |
calculate center point
References esys::lsm::bpu::iter(), and m_points.
Referenced by 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().


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