#include "base-precomp.h"#include <mrpt/math/geometry.h>#include <mrpt/math/CPolygon.h>#include <mrpt/math/CSparseMatrixTemplate.h>#include <mrpt/math/CMatrixTemplateNumeric.h>#include <mrpt/math/data_utils.h>#include <mrpt/math/ops_containers.h>#include <mrpt/poses/CPoint2D.h>#include <mrpt/poses/CPose2D.h>#include <mrpt/math/lightweight_geom_data.h>Go to the source code of this file.
Classes | |
| struct | T2ListsOfSegments |
| struct | TCommonRegion |
| struct | TTempIntersection |
| struct | TSegmentWithLine |
| struct | MatchingVertex |
| class | FCreatePolygon |
| class | FUnprojectPolygon2D |
Functions | |
| template<class T2D , class U2D , class T3D , class U3D > | |
| bool | intersectInCommonPlane (const T3D &o1, const U3D &o2, const mrpt::math::TPlane &p, mrpt::math::TObject3D &obj) |
| bool | intersectInCommonLine (const mrpt::math::TSegment3D &s1, const mrpt::math::TSegment3D &s2, const mrpt::math::TLine3D &lin, mrpt::math::TObject3D &obj) |
| bool | intersectInCommonLine (const TSegment2D &s1, const TSegment2D &s2, const TLine2D &lin, TObject2D &obj) |
| void | unsafeProjectPoint (const TPoint3D &point, const CPose3D &pose, TPoint2D &newPoint) |
| void | unsafeProjectPolygon (const TPolygon3D &poly, const CPose3D &pose, TPolygon2D &newPoly) |
| bool | intersect (const TPolygonWithPlane &p1, const TLine3D &l2, double &d, double bestKnown) |
| bool | intersect (const TPolygonWithPlane &p1, const TPolygonWithPlane &p2, TObject3D &obj) |
| void | createFromPoseAndAxis (const CPose3D &p, TLine3D &r, size_t axis) |
| bool | intersect (const TSegmentWithLine &s1, const TSegmentWithLine &s2, TObject2D &obj) |
| void | getSegmentsWithLine (const TPolygon2D &poly, vector< TSegmentWithLine > &segs) |
| char | fromObject (const TObject2D &obj) |
| bool | intersectAux (const TPolygon3D &p1, const TPlane &pl1, const TPolygon3D &p2, const TPlane &pl2, TObject3D &obj) |
| bool | compatibleBounds (const TPoint3D &min1, const TPoint3D &max1, const TPoint3D &min2, const TPoint3D &max2) |
| void | getPlanes (const std::vector< TPolygon3D > &polys, std::vector< TPlane > &planes) |
| void | getMinAndMaxBounds (const std::vector< TPolygon3D > &v1, std::vector< TPoint3D > &minP, std::vector< TPoint3D > &maxP) |
| void | createPlaneFromPoseAndAxis (const CPose3D &pose, TPlane &plane, size_t axis) |
| template<class T > | |
| size_t | getIndexOfMin (const T &e1, const T &e2, const T &e3) |
| template<class T > | |
| size_t | getIndexOfMax (const T &e1, const T &e2, const T &e3) |
| bool | firstOrNonPresent (size_t i, const std::vector< MatchingVertex > &v) |
| bool | depthFirstSearch (const CSparseMatrixTemplate< unsigned char > &mat, std::vector< std::vector< MatchingVertex >> &res, std::vector< bool > &used, size_t searching, unsigned char mask, std::vector< MatchingVertex > ¤t) |
| void | depthFirstSearch (const CSparseMatrixTemplate< unsigned char > &mat, std::vector< std::vector< MatchingVertex >> &res, std::vector< bool > &used) |
| bool | intersect (const TLine2D &l1, const TSegmentWithLine &s2, TObject2D &obj) |
| bool | intersect (const TSegmentWithLine &s1, const TLine2D &l2, TObject2D &obj) |
Variables | |
| static double | geometryEpsilon = 1e-5 |
| bool compatibleBounds | ( | const TPoint3D & | min1, |
| const TPoint3D & | max1, | ||
| const TPoint3D & | min2, | ||
| const TPoint3D & | max2 | ||
| ) |
Definition at line 1606 of file geometry.cpp.
Referenced by mrpt::math::intersect().

Definition at line 932 of file geometry.cpp.
Referenced by mrpt::math::createFromPoseX(), mrpt::math::createFromPoseY(), and mrpt::math::createFromPoseZ().

Definition at line 2033 of file geometry.cpp.
References mrpt::math::TPlane::coefs, and mrpt::poses::CPose3D::getHomogeneousMatrixVal().
Referenced by mrpt::math::createPlaneFromPoseXY(), mrpt::math::createPlaneFromPoseXZ(), and mrpt::math::createPlaneFromPoseYZ().


| bool depthFirstSearch | ( | const CSparseMatrixTemplate< unsigned char > & | mat, |
| std::vector< std::vector< MatchingVertex >> & | res, | ||
| std::vector< bool > & | used, | ||
| size_t | searching, | ||
| unsigned char | mask, | ||
| std::vector< MatchingVertex > & | current | ||
| ) |
Definition at line 2226 of file geometry.cpp.
References firstOrNonPresent(), mrpt::math::CSparseMatrixTemplate< T >::getColCount(), and mrpt::math::CSparseMatrixTemplate< T >::isNotNull().
Referenced by mrpt::math::assemblePolygons(), and depthFirstSearch().


| void depthFirstSearch | ( | const CSparseMatrixTemplate< unsigned char > & | mat, |
| std::vector< std::vector< MatchingVertex >> & | res, | ||
| std::vector< bool > & | used | ||
| ) |
Definition at line 2272 of file geometry.cpp.
References depthFirstSearch().

|
inline |
Definition at line 2218 of file geometry.cpp.
Referenced by depthFirstSearch().

|
inline |
Definition at line 1447 of file geometry.cpp.
References mrpt::math::GEOMETRIC_TYPE_LINE, mrpt::math::GEOMETRIC_TYPE_POINT, mrpt::math::GEOMETRIC_TYPE_POLYGON, and mrpt::math::GEOMETRIC_TYPE_SEGMENT.
Referenced by mrpt::math::intersect().

|
inline |
Definition at line 2132 of file geometry.cpp.
Referenced by mrpt::math::getRegressionLine().

|
inline |
Definition at line 2126 of file geometry.cpp.
Referenced by mrpt::math::getRegressionPlane().

| void getMinAndMaxBounds | ( | const std::vector< TPolygon3D > & | v1, |
| std::vector< TPoint3D > & | minP, | ||
| std::vector< TPoint3D > & | maxP | ||
| ) |
Definition at line 1638 of file geometry.cpp.
References mrpt::math::getPrismBounds().
Referenced by mrpt::math::intersect().


|
inline |
Definition at line 1629 of file geometry.cpp.
References mrpt::math::getRegressionPlane().
Referenced by mrpt::math::intersect().


| void getSegmentsWithLine | ( | const TPolygon2D & | poly, |
| vector< TSegmentWithLine > & | segs | ||
| ) |
Definition at line 1438 of file geometry.cpp.
Referenced by mrpt::math::intersect().

| bool intersect | ( | const TPolygonWithPlane & | p1, |
| const TLine3D & | l2, | ||
| double & | d, | ||
| double | bestKnown | ||
| ) |
Definition at line 544 of file geometry.cpp.
References mrpt::math::TPolygon2D::contains(), mrpt::math::TLine3D::director, geometryEpsilon, mrpt::math::TPolygonWithPlane::inversePose, mrpt::math::TLine3D::pBase, mrpt::math::TPolygonWithPlane::plane, mrpt::math::TPolygonWithPlane::poly, unsafeProjectPoint(), and unsafeProjectPolygon().
Referenced by intersect(), and intersectInCommonPlane().


| bool intersect | ( | const TPolygonWithPlane & | p1, |
| const TPolygonWithPlane & | p2, | ||
| TObject3D & | obj | ||
| ) |
Definition at line 568 of file geometry.cpp.
References mrpt::math::TLine3D::generate2DObject(), mrpt::math::TObject2D::generate3DObject(), mrpt::math::TObject3D::getPoint(), mrpt::math::TObject3D::getSegment(), intersect(), intersectInCommonLine(), mrpt::math::TPolygonWithPlane::inversePose, mrpt::math::TPolygonWithPlane::plane, mrpt::math::TPolygonWithPlane::poly2D, mrpt::math::TPolygonWithPlane::pose, and mrpt::math::project3D().

| bool intersect | ( | const TSegmentWithLine & | s1, |
| const TSegmentWithLine & | s2, | ||
| TObject2D & | obj | ||
| ) |
Definition at line 1428 of file geometry.cpp.
References mrpt::math::TSegment2D::contains(), mrpt::math::intersect(), intersectInCommonLine(), TSegmentWithLine::line, and TSegmentWithLine::segment.

| bool intersect | ( | const TLine2D & | l1, |
| const TSegmentWithLine & | s2, | ||
| TObject2D & | obj | ||
| ) |
Definition at line 2363 of file geometry.cpp.
References mrpt::math::TSegment2D::contains(), mrpt::math::intersect(), TSegmentWithLine::line, and TSegmentWithLine::segment.

|
inline |
Definition at line 2383 of file geometry.cpp.
References mrpt::math::intersect().

| bool intersectAux | ( | const TPolygon3D & | p1, |
| const TPlane & | pl1, | ||
| const TPolygon3D & | p2, | ||
| const TPlane & | pl2, | ||
| TObject3D & | obj | ||
| ) |
Definition at line 1575 of file geometry.cpp.
References mrpt::math::TObject3D::getPoint(), mrpt::math::TObject3D::getSegment(), mrpt::math::intersect(), and intersectInCommonLine().
Referenced by mrpt::math::intersect().


| bool intersectInCommonLine | ( | const mrpt::math::TSegment3D & | s1, |
| const mrpt::math::TSegment3D & | s2, | ||
| const mrpt::math::TLine3D & | lin, | ||
| mrpt::math::TObject3D & | obj | ||
| ) |
Definition at line 483 of file geometry.cpp.
References mrpt::math::TLine3D::director, and geometryEpsilon.
Referenced by mrpt::math::intersect(), intersect(), and intersectAux().

| bool intersectInCommonLine | ( | const TSegment2D & | s1, |
| const TSegment2D & | s2, | ||
| const TLine2D & | lin, | ||
| TObject2D & | obj | ||
| ) |
Definition at line 507 of file geometry.cpp.
References mrpt::math::TLine2D::coefs, and geometryEpsilon.
| bool intersectInCommonPlane | ( | const T3D & | o1, |
| const U3D & | o2, | ||
| const mrpt::math::TPlane & | p, | ||
| mrpt::math::TObject3D & | obj | ||
| ) |
Definition at line 454 of file geometry.cpp.
References mrpt::math::TObject2D::generate3DObject(), mrpt::math::TPlane::getAsPose3D(), intersect(), and mrpt::math::project3D().

|
inline |
Definition at line 530 of file geometry.cpp.
References mrpt::poses::CPose3D::composePoint(), mrpt::math::TPoint2D::x, mrpt::math::TPoint3D::x, mrpt::math::TPoint2D::y, mrpt::math::TPoint3D::y, and mrpt::math::TPoint3D::z.
Referenced by intersect(), and unsafeProjectPolygon().


| void unsafeProjectPolygon | ( | const TPolygon3D & | poly, |
| const CPose3D & | pose, | ||
| TPolygon2D & | newPoly | ||
| ) |
Definition at line 536 of file geometry.cpp.
References unsafeProjectPoint().
Referenced by intersect(), and mrpt::math::TPolygonWithPlane::TPolygonWithPlane().


|
static |
Definition at line 28 of file geometry.cpp.
Referenced by mrpt::math::areAligned(), mrpt::math::assemblePolygons(), mrpt::math::conformAPlane(), mrpt::math::distance(), mrpt::math::generateAxisBaseFromDirectionAndAxis(), mrpt::math::getAngle(), mrpt::math::getAngleBisector(), mrpt::math::getEpsilon(), mrpt::math::getRegressionPlane(), mrpt::math::intersect(), intersect(), intersectInCommonLine(), mrpt::math::setEpsilon(), and mrpt::math::splitInConvexComponents().
| Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019 |