|
Mechanics of Defect Evolution Library
|
#include <PlanesIntersection.h>
Public Types | |
| typedef Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > | MatrixDimDynamic |
| typedef Eigen::Matrix< double, dim, 1 > | VectorDim |
| typedef Eigen::JacobiSVD< MatrixDimDynamic > | SVDsolverType |
Public Member Functions | |
| PlanesIntersection (const MatrixDimDynamic &N, const MatrixDimDynamic &P, const double &tol=FLT_EPSILON) | |
| std::pair< bool, VectorDim > | snap (const VectorDim &x) const |
Public Attributes | |
| const std::pair< MatrixDimDynamic, MatrixDimDynamic > | NP |
| const SVDsolverType | svd |
Definition at line 20 of file PlanesIntersection.h.
| typedef Eigen::Matrix<double,Eigen::Dynamic,Eigen::Dynamic> model::PlanesIntersection< dim >::MatrixDimDynamic |
Definition at line 23 of file PlanesIntersection.h.
| typedef Eigen::JacobiSVD<MatrixDimDynamic> model::PlanesIntersection< dim >::SVDsolverType |
Definition at line 25 of file PlanesIntersection.h.
| typedef Eigen::Matrix<double,dim,1> model::PlanesIntersection< dim >::VectorDim |
Definition at line 24 of file PlanesIntersection.h.
| model::PlanesIntersection< dim >::PlanesIntersection | ( | const MatrixDimDynamic & | N, |
| const MatrixDimDynamic & | P, | ||
| const double & | tol = FLT_EPSILON ) |
Definition at line 22 of file PlanesIntersection.cpp.
| std::pair< bool, typename PlanesIntersection< dim >::VectorDim > model::PlanesIntersection< dim >::snap | ( | const VectorDim & | x | ) | const |
| [in] | x | point to be snapped to the intersection between the planes |
The snapped point y minimizes the distance from x constrained to y belonging to the planes. Using lgrange multipliers, the solution is y=x-N*lam, where lam is a vector of Lagrance multipliers solving N^T*N lam = b, and b_k = n_k(x-P_k), where n_k and P_k are the normal and origin of the k0th plane. We solve this using svd, hence we get the "best solution", which may not actually satisfy the contraints if the planes are not intersecting. Hence we check that the solution actually belongs to the intersectoin between the planes before returning it.
Definition at line 29 of file PlanesIntersection.cpp.
| const std::pair<MatrixDimDynamic,MatrixDimDynamic> model::PlanesIntersection< dim >::NP |
Definition at line 27 of file PlanesIntersection.h.
| const SVDsolverType model::PlanesIntersection< dim >::svd |
Definition at line 28 of file PlanesIntersection.h.