MeVisLab Toolbox Reference
ml::MainAxisPCA Class Reference

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

#include <MainAxisPCA.h>

Public Member Functions

 MainAxisPCA ()
 Constructor. More...
 
virtual ~MainAxisPCA ()
 Destructor. More...
 
void computeMainAxis (const std::vector< Vector3 > &points)
 Computes the main axes on behalf of the given point cloud. More...
 
void getMainAxis (Vector3 &longestAxis, Vector3 &midAxis, Vector3 &shortestAxis) const
 Returns the main axes (normalized). The axes are sorted by extent, largest first. More...
 
void getExtension (float &longestExtent, float &midExtent, float &shortestExtent) const
 Returns the three extents of the object aligned bounding box, largest first. More...
 
Vector3 getLargestMainAxis () const
 Returns a copy of the largest main axis. More...
 
float getLargestExtension () const
 Returns the largest extend of the object aligned bounding box. More...
 
Vector3 getCenterOfMass () const
 Returns the center of mass of the object, which is the mean of all 3d points. More...
 
Vector3 getMidPoint () const
 Returns the middle point of the object aligned bounding box. More...
 

Detailed Description

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

Definition at line 25 of file MainAxisPCA.h.

Constructor & Destructor Documentation

◆ MainAxisPCA()

ml::MainAxisPCA::MainAxisPCA ( )

Constructor.

◆ ~MainAxisPCA()

virtual ml::MainAxisPCA::~MainAxisPCA ( )
virtual

Destructor.

Member Function Documentation

◆ computeMainAxis()

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

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

The principal component vectors are established internally.

◆ getCenterOfMass()

Vector3 ml::MainAxisPCA::getCenterOfMass ( ) const

Returns the center of mass of the object, which is the mean of all 3d points.

◆ getExtension()

void ml::MainAxisPCA::getExtension ( float &  longestExtent,
float &  midExtent,
float &  shortestExtent 
) const

Returns the three extents of the object aligned bounding box, largest first.

◆ getLargestExtension()

float ml::MainAxisPCA::getLargestExtension ( ) const

Returns the largest extend of the object aligned bounding box.

◆ getLargestMainAxis()

Vector3 ml::MainAxisPCA::getLargestMainAxis ( ) const

Returns a copy of the largest main axis.

◆ getMainAxis()

void ml::MainAxisPCA::getMainAxis ( Vector3 longestAxis,
Vector3 midAxis,
Vector3 shortestAxis 
) const

Returns the main axes (normalized). The axes are sorted by extent, largest first.

◆ getMidPoint()

Vector3 ml::MainAxisPCA::getMidPoint ( ) const

Returns the middle point of the object aligned bounding box.


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