25 vector<Node> vector_of_nodes(num_nodes);
26 for (
int i = 0; i < num_nodes; i++) {
27 const auto& arr = array_of_nodes[i];
28 auto& vec = vector_of_nodes[i];
30 vec[0] = arr[0]; vec[1] = arr[1]; vec[2] = arr[2];
50 vector<Node> vector_of_nodes(num_nodes);
51 for (
int i = 0; i < num_nodes; i++) {
52 const auto& arr = array_of_nodes[i];
53 auto& vec = vector_of_nodes[i];
55 vec[0] = arr[0]; vec[1] = arr[1]; vec[2] = arr[2];
76 vector<Node> vector_a(size_a);
77 vector<Node> vector_b(size_b);
78 for (
int i = 0; i < size_a; i++) {
79 const auto& arra = array_a[i];
80 auto& va = vector_a[i];
81 va[0] = arra[0]; va[1] = arra[1]; va[2] = arra[2];
83 for (
int i = 0; i < size_b; i++) {
84 const auto& arrb = array_b[i];
85 auto& vb = vector_b[i];
86 vb[0] = arrb[0]; vb[1] = arrb[1]; vb[2] = arrb[2];
88 *out_graph =
new Graph();
92 if ((*out_graph)->GetCSRPointers().AreValid()) {
Contains definitions for the VisibilityGraph class.
Contains definitions for the Exceptions namespace.
Contains definitions for the EmbreeRayTracer
std::vector< std::array< float, 3 > > ConvertRawFloatArrayToPoints(const float *raw_array, int size)
Convert a raw array from an external caller to an organized vector of points
Contains definitions for the Graph class.
Contains definitions for the Node structure.
Header file for functions related to creating a visibility graph.
C_INTERFACE CreateVisibilityGraphAllToAll(EmbreeRayTracer *ert, const float *nodes, int num_nodes, Graph **out_graph, float height)
Create a new directed visibility graph between all nodes in parameter nodes.
C_INTERFACE CreateVisibilityGraphAllToAllUndirected(EmbreeRayTracer *ert, const float *nodes, int num_nodes, Graph **out_graph, float height, const int cores)
Create a new undirected visibility graph between all nodes in nodes.
C_INTERFACE CreateVisibilityGraphGroupToGroup(HF::RayTracer::EmbreeRayTracer *ert, const float *group_a, const int size_a, const float *group_b, const int size_b, Graph **out_graph, float height)
Create a new visibility graph from the nodes in group_a, into the nodes of group_b.
Perform human scale analysis on 3D environments.
Cast rays to determine if and where they intersect geometry.
Contains standard fundamental data structures for representing space used throughout DHARTAPI.
Graph AllToAll(EmbreeRayTracer &ert, const vector< Node > &nodes, float height)
Generate a Visibility Graph between every node in a set of nodes in parallel.
Graph AllToAllUndirected(EmbreeRayTracer &ert, const vector< Node > &nodes, float height, int cores)
Generate a Visibility Graph with every edge stored twice.
Graph GroupToGroup(EmbreeRayTracer &ert, const vector< Node > &from, const vector< Node > &to, float height)
Generate a Visibility Graph from a set of nodes to another set of nodes.
@ OK
Operation was successful.
@ NO_GRAPH
This requires a valid graph in the DB to execute successfully.
A wrapper for Intel's Embree Library.
A Graph of nodes connected by edges that supports both integers and HF::SpatialStructures::Node.