DHART
|
Contains declarations for all functions related to the graph generator. More...
#include <cmath>
#include <set>
#include <vector>
#include <array>
#include <Node.h>
#include <cassert>
#include <variant>
#include <MultiRT.h>
#include <unordered_map>
Go to the source code of this file.
Classes | |
struct | HF::GraphGenerator::Precision |
Various parameters to set the precision of certain parts of the graph generator. More... | |
struct | HF::GraphGenerator::GeometryFlagMap |
Manages rules and ids for different types of geometry in the graph generator. More... | |
struct | HF::GraphGenerator::GraphParams |
Holds parameters for the GraphGenerator. More... | |
struct | HF::GraphGenerator::optional_real3 |
A simple wrapper for real3 that is able to determine whether or not it's defined. More... | |
class | HF::GraphGenerator::GraphGenerator |
Generate a graph of accessible space from a given start point. More... | |
Namespaces | |
namespace | HF |
Perform human scale analysis on 3D environments. | |
namespace | HF::RayTracer |
Cast rays to determine if and where they intersect geometry. | |
namespace | HF::SpatialStructures |
Contains standard fundamental data structures for representing space used throughout DHARTAPI. | |
namespace | HF::GraphGenerator |
Generate a graph of accessible space from a given start point. | |
Macros | |
#define | _USE_MATH_DEFINES |
Typedefs | |
using | HF::GraphGenerator::real_t = double |
Internal decimal type of the graph generator. More... | |
using | HF::GraphGenerator::real3 = std::array< real_t, 3 > |
Type used for the standard coordinate set of the graph generator. More... | |
using | HF::GraphGenerator::graph_edge = HF::SpatialStructures::Edge |
Type of edge for the graph generator to use internally. More... | |
using | HF::GraphGenerator::RayTracer = HF::RayTracer::MultiRT |
Type of raytracer to be used internally. More... | |
using | HF::GraphGenerator::pair = std::pair< int, int > |
Type for Directions to be stored as. More... | |
using | HF::GraphGenerator::hashmap = std::unordered_map< int, HIT_FLAG > |
Hashmap used for assigning and storing hitflags for IDs. More... | |
Enumerations | |
enum | HF::GraphGenerator::HIT_FLAG { HF::GraphGenerator::NO_FLAG = 0 , HF::GraphGenerator::FLOORS = 1 , HF::GraphGenerator::OBSTACLES = 2 , HF::GraphGenerator::BOTH = 3 } |
Determines which geometry the ray will collide with. More... | |
enum class | HF::GraphGenerator::GeometryFilterMode { HF::GraphGenerator::ALL_INTERSECTIONS = 0 , HF::GraphGenerator::OBSTACLES_ONLY = 1 , HF::GraphGenerator::OBSTACLES_AND_FLOORS } |
Different rules for how geometry is filtered by the graph generator. More... | |
Functions | |
template<typename real_type > | |
real_t | HF::GraphGenerator::CastToReal (real_type t) |
Cast an input value to real_t using static cast. More... | |
template<typename real_3_type > | |
real3 | HF::GraphGenerator::CastToReal3 (real_3_type t) |
Cast an array of 3 values to the graph_generator's real_3 type. More... | |
std::set< std::pair< int, int > > | HF::GraphGenerator::permutations (int limit) |
Calculate P(n,r) as an array with each unique permutaton of 2 values being a pair. More... | |
optional_real3 | HF::GraphGenerator::ValidateStartPoint (RayTracer &RT, const real3 &start_point, const GraphParams &Params) |
Determine if the start point of the graph is over valid ground. More... | |
optional_real3 | HF::GraphGenerator::CheckRay (RayTracer &RT, const real3 &origin, const real3 &direction, real_t node_z_tolerance, HIT_FLAG flag=BOTH, const GeometryFlagMap &geometry_dict=GeometryFlagMap()) |
Cast a ray and get the point of intersection if it connects. More... | |
std::vector< pair > | HF::GraphGenerator::CreateDirecs (int max_step_connections) |
Create a set of directions based on max_step_connections. More... | |
std::vector< graph_edge > | HF::GraphGenerator::GetChildren (const real3 &parent, const std::vector< real3 > &possible_children, RayTracer &rt, const GraphParams &GP) |
Calculate all possible edges between parent and possible_children. More... | |
std::vector< real3 > | HF::GraphGenerator::GeneratePotentialChildren (const real3 &parent, const std::vector< pair > &direcs, const real3 &spacing, const GraphParams &gp) |
Populare out_children with a potential child position for every direction in directions. More... | |
template<typename A , typename D , typename N > | |
void | HF::GraphGenerator::MoveNode (const A &dist, const D &direction, N &node) |
Move a node in direction by dist units. More... | |
std::vector< real3 > | HF::GraphGenerator::CheckChildren (const real3 &parent, const std::vector< real3 > &possible_children, RayTracer &rt, const GraphParams ¶ms) |
Determine whether children are over valid ground, and and meet upstep/downstep requirements. More... | |
HF::SpatialStructures::STEP | HF::GraphGenerator::CheckConnection (const real3 &parent, const real3 &child, RayTracer &rt, const GraphParams ¶ms) |
Determine what kind of step (if any) is between parent and child. More... | |
bool | HF::GraphGenerator::OcclusionCheck (const real3 &parent, const real3 &child, RayTracer &RT) |
Determine if there is a valid line of sight between parent and child. More... | |
bool | HF::GraphGenerator::CheckSlope (const real3 &parent, const real3 &child, const GraphParams &gp) |
Determine if the slope between parent and child is traversable according to the graph parameters. More... | |
Variables | |
constexpr real_t | HF::GraphGenerator::default_z_precision = 0.0001 |
constexpr real_t | HF::GraphGenerator::default_ground_offset = 0.01 |
constexpr real_t | HF::GraphGenerator::default_spacing_precision = 0.00001 |
Contains declarations for all functions related to the graph generator.
Definition in file graph_generator.h.
struct HF::GraphGenerator::Precision |
Various parameters to set the precision of certain parts of the graph generator.
Definition at line 111 of file graph_generator.h.
Class Members | ||
---|---|---|
real_t | ground_offset | Distance to offset nodes from the ground before checking line of sight. |
real_t | node_spacing | Precision to round nodes after spacing is calculated. |
real_t | node_z | Precision to round the z-component of nodes after a raycast is performed. |
struct HF::GraphGenerator::GraphParams |
Holds parameters for the GraphGenerator.
Definition at line 255 of file graph_generator.h.
Class Members | ||
---|---|---|
real_t | down_slope | The maximum downward slope the graph can traverse. Any slopes steeper than this will be considered inaccessible. |
real_t | down_step | Maximum step down the graph can traverse.Any steps steeper than this will be considered inaccessible. |
GeometryFlagMap | geom_ids | Stores a map of geometry IDs to their HIT_FLAGS and the current filter mode of the graph. |
Precision | precision | Tolerances for the graph. |
real_t | up_slope | Maximum upward slope the graph can traverse in degrees.Any slopes steeper than this will be considered inaccessible. |
real_t | up_step | Maximum height of a step the graph can traverse.Any steps higher this will be considered inaccessible. |
#define _USE_MATH_DEFINES |
Definition at line 8 of file graph_generator.h.