ESyS-Particle  4.0.1
Public Member Functions | List of all members
PointCloud Class Reference

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

#include <PointCloud.h>

Public Member Functions

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

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
Vec3 PointCloud::getCenter ( )

calculate center point

Referenced by getFitPlane().

Here is the caller graph for this function:

Plane 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(), and getCenter().

Here is the call graph for this function:


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