Pathfinder
|
This file declares all functionality needed for computing intersections between graphs. More...
#include <boost/optional/optional_io.hpp>
#include "Plane.h"
#include "Line2.h"
#include "Line3Norm.h"
#include "Line3Unnorm.h"
Go to the source code of this file.
Namespaces | |
Pathfinder | |
Functions | |
float | Pathfinder::t (const Plane &p, const Geometry::Vec3 &p1, const Geometry::Vec3 &p2) |
Compute the t value for a plane and two points that form a line. More... | |
std::tuple< std::vector< short >, std::vector< short >, std::vector< short >, std::vector< short >, std::vector< short > > | Pathfinder::categorizetValueIndices (const std::tuple< float, float, float, float, float, float > &tValues) |
Sort each computed t into a tuple of vectors where each vector corresponds to one specific interval. More... | |
short | Pathfinder::determineIntersectionCase (const std::tuple< std::vector< short >, std::vector< short >, std::vector< short >, std::vector< short >, std::vector< short >> &categorizedtValueIndices) |
Determine which intersection case should be considered for the computed t values. More... | |
std::tuple< short, short > | Pathfinder::tIndex2endpoints (const short &id) |
Translate the index of the tValues vector to the endpoints which were involved in the t value computation. More... | |
short | Pathfinder::endpoints2tIndex (const std::tuple< short, short > &e) |
Translate a pair of endpoint indices into the corresponding index of the tValue vector. More... | |
short | Pathfinder::getEquivalenttValueIndex (const short &id) |
For a given index of the tValues tuple, return the index of the tValues tuple which contains the t value that was comuputed by the same vertices but in reverse order. More... | |
std::tuple< bool, bool, bool > | Pathfinder::intersectionTupleValid (Geometry::Vec2 &pi, Geometry::Vec2 &pj, const std::tuple< boost::optional< float >, boost::optional< float >, boost::optional< float >> &intersections, const std::tuple< Line2, Line2, Line2 > &tri, const std::tuple< bool, bool, bool > ¢erAbove) |
For a given tuple of found intersections, determine if these are valid. More... | |
boost::optional< short > | Pathfinder::chooseIntersection (const std::tuple< Line2, Line2, Line2 > &tri, const std::tuple< boost::optional< float >, boost::optional< float >, boost::optional< float >> &intersections, const std::tuple< bool, bool, bool > &valid, Geometry::Vec2 &pjFlat) |
When moving a point on an intersection line, determine which intersection to use as a new endpoint. More... | |
float | Pathfinder::distanceToNewPoint (const Line3 &lij, const short &droppedCoord, const float &pointX, const float &pointY) |
When calculating the point on a line that corresponds to a 2D point, determine the distance this new point has from the support vector of the line. More... | |
boost::optional< Geometry::Vec3 > | Pathfinder::cutPointToPolygon (const Geometry::Vec3 &pi, const Geometry::Vec3 &pj, const short &droppedCoord, const std::vector< bool > &inside, const std::tuple< Line2, Line2, Line2 > &tri) |
For a given polygon and a pair of endpoints, determine a new endpoint for this intersection line which lies inside tri. More... | |
std::vector< std::vector< boost::optional< Geometry::Vec3 > > > | Pathfinder::cutPlaneIntersectionsToPolygon (const std::vector< Geometry::Vec3 > &tri, const std::vector< std::vector< Geometry::Vec3 >> &intersections) |
For a given polygon and a list of intersections with the plane defined by that polygon, edit these intersections to fit the size of the actual polygon. More... | |
std::tuple< float, float, float, float, float, float > | Pathfinder::computetValues (const Plane &p, const Polygon *tri) |
Given a plane and a polygon, compute the six possible t values. More... | |
std::vector< uint32_t > | Pathfinder::polygonInAABBIds (MeshAccessor *ma, AABB aabb) |
Compute which polygons of the mesh managed by ma intersect with the AABB aabb. More... | |
std::vector< Geometry::Vec3 > | Pathfinder::handleIntersectionCase1 (Polygon *tri, const std::tuple< float, float, float, float, float, float > &tValues, const std::tuple< std::vector< short >, std::vector< short >, std::vector< short >, std::vector< short >, std::vector< short >> &categorizedtValueIndices) |
Do the necessary computations to obtain the intersection endpoints for intersection case 1. More... | |
std::vector< Geometry::Vec3 > | Pathfinder::handleIntersectionCase2 (const Polygon *tri, const std::tuple< float, float, float, float, float, float > &tValues, const std::tuple< std::vector< short >, std::vector< short >, std::vector< short >, std::vector< short >, std::vector< short >> &categorizedtValueIndices) |
Do the necessary computations to obtain the intersection endpoints for intersection case 2. More... | |
Geometry::Vec3 | Pathfinder::handleIntersectionCase2ii (const Polygon *tri, const short &vertexOnPlane, const std::tuple< float, float, float, float, float, float > &tValues) |
Do the necessary computations to obtain the additional intersection endpoint for intersection case 2ii. More... | |
std::vector< Geometry::Vec3 > | Pathfinder::handleIntersectionCase3 (Polygon *tri, const std::tuple< std::vector< short >, std::vector< short >, std::vector< short >, std::vector< short >, std::vector< short >> &categorizedtValueIndices) |
Do the necessary computations to obtain the intersection endpoints for intersection case 3. More... | |
std::vector< std::tuple< Graph *, Graph *, std::vector< Geometry::Vec3 > > > | Pathfinder::intersection (Graph *smaller, Graph *bigger) |
Compute the intersection between the meshes. More... | |
This file declares all functionality needed for computing intersections between graphs.