MeVisLabToolboxReference
ml::MainAxisPCA Class Reference

This class computes the main axis for a point cloud by a principal component analysis. More...

#include <MainAxisPCA.h>

List of all members.

Public Member Functions

 MainAxisPCA ()
 Constructor.
virtual ~MainAxisPCA ()
 Destructor.
void computeMainAxis (const std::vector< ml::Vector3 > &points)
 Computes the main axes on behalf of the given point cloud.
void getMainAxis (ml::Vector3 &xAxis, ml::Vector3 &yAxis, ml::Vector3 &zAxis)
 Returns the main axes.
void getExtension (float &xExt, float &yExt, float &zExt)
 Returns the three extends of the object aligned bounding box.
float * getLargestMainAxis ()
 Returns a copy of the largest main axis.
float getLargestExtension ()
 Returns the largest extend of the object aligned bounding box.
ml::Vector3 getBaryCenter ()
 Returns the barycenter (center of mass) of the object.
ml::Vector3 getMidPoint ()
 Returns the middle point of the object aligned bounding box.

Detailed Description

This class computes the main axis for a point cloud by a principal component analysis.

Definition at line 21 of file MainAxisPCA.h.


Constructor & Destructor Documentation

ml::MainAxisPCA::MainAxisPCA ( )

Constructor.

virtual ml::MainAxisPCA::~MainAxisPCA ( ) [virtual]

Destructor.


Member Function Documentation

void ml::MainAxisPCA::computeMainAxis ( const std::vector< ml::Vector3 > &  points)

Computes the main axes on behalf of the given point cloud.

The principal component vectors are established internally.

ml::Vector3 ml::MainAxisPCA::getBaryCenter ( )

Returns the barycenter (center of mass) of the object.

void ml::MainAxisPCA::getExtension ( float &  xExt,
float &  yExt,
float &  zExt 
)

Returns the three extends of the object aligned bounding box.

float ml::MainAxisPCA::getLargestExtension ( )

Returns the largest extend of the object aligned bounding box.

float* ml::MainAxisPCA::getLargestMainAxis ( )

Returns a copy of the largest main axis.

void ml::MainAxisPCA::getMainAxis ( ml::Vector3 xAxis,
ml::Vector3 yAxis,
ml::Vector3 zAxis 
)

Returns the main axes.

ml::Vector3 ml::MainAxisPCA::getMidPoint ( )

Returns the middle point of the object aligned bounding box.


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