ESyS-Particle
4.0.1
|
A class representing a cloud.of points. More...
#include <PointCloud.h>
Public Member Functions | |
PointCloud () | |
Vec3 | getCenter () |
void | addPoint (const Vec3 &) |
Plane | getFitPlane () |
A class representing a cloud.of points.
construct an empty point cloud - do nothing
void PointCloud::addPoint | ( | const Vec3 & | p | ) |
add a point
p | the position of the point |
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(), and getCenter().