|
AGX Dynamics
2.37.3.2
|
A plane created from points using least squares minimization. More...
#include <RegressionPlane.h>
Public Types | |
| enum | DimensionType { EMPTY, POINT, LINE, PLANE } |
| Dimension type of the sub-space resulted by the regression. More... | |
Public Member Functions | |
| RegressionPlane (const agxData::LocalVector< agx::Vec3 > &points) | |
| Creates a RegressionPlane from a number of 3D-points. More... | |
| RegressionPlane (const agx::Vec3Vector &points) | |
| RegressionPlane (const agx::Vec3 &linearCoefficients, const agx::SPDMatrix3x3 &quadraticCoefficients, const agx::Vec3 &averagePoint, const size_t numPoints) | |
| Creates a RegressionPlane from the coefficients precomputed from a number of 3D points. More... | |
| agx::Vec3 | getAveragePoint () const |
| Gets the average point of the plane. More... | |
| DimensionType | getDimensionType () const |
| Gets the dimension type of the plane. More... | |
| agx::Vec3 | getLineDirection () const |
| Gets the average point of the plane. More... | |
| agx::Real | getMaxDeterminant () const |
| Returns the maximum determinant from the least squares minimization. More... | |
| agx::Plane | getPlane () const |
| Gets the average point of the plane. More... | |
| bool | isPlane () const |
| Is the regression plane a plane (and not empty, point or line)? More... | |
A plane created from points using least squares minimization.
If no valid plane can be created, regression to a line or point is attempted.
Definition at line 39 of file RegressionPlane.h.
Dimension type of the sub-space resulted by the regression.
| Enumerator | |
|---|---|
| EMPTY | |
| POINT | |
| LINE | |
| PLANE | |
Definition at line 44 of file RegressionPlane.h.
| agxCollide::RegressionPlane::RegressionPlane | ( | const agxData::LocalVector< agx::Vec3 > & | points | ) |
Creates a RegressionPlane from a number of 3D-points.
If there a no points in the Vector, the RegressionPlane's DimensionType will be EMPTY. If all points are (roughly) identical, the RegressionPlane's DimensionType will be POINT. If all points lie (roughly) in a line with finite positive length, the RegressionPlane's DimensionType will be LINE. In all other cases, a plane can be constructed from the points, and the RegressionPlane's DimensionType will be PLANE.
| points | A pointer to a vector of points. The RegressionPlane does not take over ownership of or store references to the pointer. |
| agxCollide::RegressionPlane::RegressionPlane | ( | const agx::Vec3Vector & | points | ) |
| agxCollide::RegressionPlane::RegressionPlane | ( | const agx::Vec3 & | linearCoefficients, |
| const agx::SPDMatrix3x3 & | quadraticCoefficients, | ||
| const agx::Vec3 & | averagePoint, | ||
| const size_t | numPoints | ||
| ) |
Creates a RegressionPlane from the coefficients precomputed from a number of 3D points.
| linearCoefficients | sum of derivations of all points from averagePoint (x, y, z) |
| quadraticCoefficients | sum of component wise product of derivation of each point from averagePoint (xx, xy, xz, yx, yy, yz, zx, zy, zz) |
| averagePoint | Mean value of all points. |
| numPoints | The number of points. |
| agx::Vec3 agxCollide::RegressionPlane::getAveragePoint | ( | ) | const |
Gets the average point of the plane.
Definition at line 142 of file RegressionPlane.h.
References agxAssert.
| RegressionPlane::DimensionType agxCollide::RegressionPlane::getDimensionType | ( | ) | const |
Gets the dimension type of the plane.
Definition at line 131 of file RegressionPlane.h.
| agx::Vec3 agxCollide::RegressionPlane::getLineDirection | ( | ) | const |
Gets the average point of the plane.
Definition at line 149 of file RegressionPlane.h.
References agxAssert.
| agx::Real agxCollide::RegressionPlane::getMaxDeterminant | ( | ) | const |
Returns the maximum determinant from the least squares minimization.
Definition at line 136 of file RegressionPlane.h.
| agx::Plane agxCollide::RegressionPlane::getPlane | ( | ) | const |
Gets the average point of the plane.
Definition at line 156 of file RegressionPlane.h.
References agxAssert.
| bool agxCollide::RegressionPlane::isPlane | ( | ) | const |
Is the regression plane a plane (and not empty, point or line)?
Definition at line 163 of file RegressionPlane.h.