Pathfinder
|
This file implements all functionality declared in Flat.h. More...
#include <boost/optional/optional_io.hpp>
#include <memory>
#include <chrono>
#include <spdlog/spdlog.h>
#include <spdlog/sinks/basic_file_sink.h>
#include <spdlog/stopwatch.h>
#include <spdlog/fmt/chrono.h>
#include "Flat.h"
#include "TupleAccess.h"
#include "Compare.h"
Namespaces | |
Pathfinder | |
Enumerations | |
enum | Pathfinder::relativePosition : short { Pathfinder::below, Pathfinder::online, Pathfinder::above, Pathfinder::below, Pathfinder::online, Pathfinder::above } |
Easier description of a point being above, below or on a line. More... | |
Functions | |
short | Pathfinder::coordToDrop (const Polygon *tri) |
Decide which coordinate shall be dropped for flattening this polygon. More... | |
std::tuple< Geometry::Vec2, Geometry::Vec2, Geometry::Vec2 > | Pathfinder::flattenTri (const Polygon *tri, const short &coord) |
Flatten the given polygon onto the xy/xz/yz plane. More... | |
Geometry::Vec2 | Pathfinder::flattenVec3 (const Geometry::Vec3 &a, const short &coord) |
Flatten the given vector onto the xy/xz/yz plane. More... | |
std::tuple< short, short, short > | Pathfinder::determineRelativePos (Geometry::Vec2 point, const std::tuple< Line2, Line2, Line2 > &tri) |
Determine the relative position of a point to three lines. More... | |
std::vector< bool > | Pathfinder::pointVecInsideTri (const std::vector< Geometry::Vec3 > &pointVec, const std::tuple< Line2, Line2, Line2 > &tri, const short &droppedCoord, const std::tuple< short, short, short > &relPosCenter) |
For a vector of points in three-dimensional space, determine if the inidividual points lie inside or outside a polygon. More... | |
std::vector< bool > | Pathfinder::pointVecInsideTri (const std::vector< Geometry::Vec2 > &pointVec, const std::tuple< Line2, Line2, Line2 > &tri, const std::tuple< short, short, short > &relPosCenter) |
For a vector of points in two-dimensional space, determine if the individual points lie inside or outside a polygon. More... | |
bool | Pathfinder::pointInsideTri (const Geometry::Vec3 &point, const std::tuple< Line2, Line2, Line2 > &tri, const short &droppedCoord, const std::tuple< short, short, short > &relPosCenter) |
For a point in three-dimensional space, determine if it lies inside or outside a given polygon. More... | |
bool | Pathfinder::pointInsideTri (const Geometry::Vec2 &point, const std::tuple< Line2, Line2, Line2 > &tri, const std::tuple< short, short, short > &relPosCenter) |
For a point in two-dimensional space, determine if it lies inside or outside a given polygon. More... | |
bool | Pathfinder::pointInRectangle (Geometry::Vec2 &p, Geometry::Vec2 &lowerLeft, Geometry::Vec2 &upperRight) |
Given a rectangle defined by two points, check if p lies inside it. More... | |
std::tuple< Geometry::Vec2, Geometry::Vec2 > | Pathfinder::buildRectangle (Geometry::Vec2 &pi, Geometry::Vec2 &pj) |
Given two points, construct a tuple of points that describe the lower left and upper right corner of the rectangle defined by the two points. More... | |
This file implements all functionality declared in Flat.h.