Geogram
Version 1.9.1-rc
A programming library of geometric algorithms
|
#include <geogram/points/principal_axes.h>
Public Member Functions | |
PrincipalAxes3d () | |
PrincipalAxes3d constructor. | |
void | begin () |
Begins a principal axes estimation. | |
void | end () |
Ends a principal axes estimation. | |
void | add_point (const vec3 &p, double weight=1.0) |
Adds a point to the current principal axes estimation. More... | |
vec3 | center () const |
Gets the center. More... | |
const vec3 & | axis (index_t i) const |
Gets one of the axes. More... | |
double | eigen_value (index_t i) const |
Gets one of the eigenvalues. More... | |
vec3 | normal () const |
Gets the estimated normal to the point cloud. More... | |
PrincipalAxes3d enables the center and inertia axes of a cloud of 3d points to be computed.
Definition at line 61 of file principal_axes.h.
void GEO::PrincipalAxes3d::add_point | ( | const vec3 & | p, |
double | weight = 1.0 |
||
) |
Adds a point to the current principal axes estimation.
[in] | p | the current point |
[in] | weight | an optional weight |
Gets one of the axes.
Can be called only after end_points().
[in] | i | one of 0,1,2 |
Definition at line 101 of file principal_axes.h.
|
inline |
Gets the center.
Can be called only after end_points().
Definition at line 91 of file principal_axes.h.
|
inline |
Gets one of the eigenvalues.
Can be called only after end_points().
[in] | i | one of 0,1,2 |
Definition at line 111 of file principal_axes.h.
|
inline |
Gets the estimated normal to the point cloud.
Equivalent to axis(2).
Definition at line 120 of file principal_axes.h.