26 vector<float>** out_scores,
27 float** out_scores_ptr,
30 vector<float>* scores =
new vector<float>();
31 vector<Node> nodes(node_ptr, node_ptr + node_size);
44 *out_scores_ptr = scores->data();
45 *out_scores_size = scores->size();
50C_INTERFACE SphereicalViewAnalysisAggregateFlat(
HF::RayTracer::EmbreeRayTracer* ERT,
const float* node_ptr,
int node_size,
int max_rays,
float upward_fov,
float downward_fov,
float height,
AGGREGATE_TYPE AT, std::vector<float>** out_scores,
float** out_scores_ptr,
int* out_scores_size)
52 vector<float>* scores =
new vector<float>();
66 *out_scores_ptr = scores->data();
67 *out_scores_size = scores->size();
81 std::vector<RayResult> ** out_results,
87 vector<RayResult> * scores =
new vector<RayResult>();
88 vector<Node> nodes(node_ptr, node_ptr + node_size);
90 *scores = ViewAnalysis::SphericalViewAnalysis<RayResult>(
99 *out_results = scores;
100 *out_results_ptr = scores->data();
101 *max_rays = scores->size()/node_size;
108 vector<RayResult>* scores =
new vector<RayResult>();
111 *scores = ViewAnalysis::SphericalViewAnalysis<RayResult>(
120 *out_results = scores;
121 *out_results_ptr = scores->data();
122 *max_rays = scores->size() / node_size;
128 vector<float>** out_direction_vector,
129 float** out_direction_data,
133 *out_direction_vector =
new vector<float>();
136 auto& out_directions = **out_direction_vector;
138 out_directions.resize(array_array.size()*3);
139 for (
int i = 0; i < array_array.size(); i += 1)
144 const auto& arr = array_array[i];
145 out_directions[os] = arr[0];
146 out_directions[y_idx] = arr[1];
147 out_directions[z_idx] = arr[2];
150 *out_direction_data = out_directions.data();
151 *num_rays = array_array.size();
Contains definitions for the ViewAnalysis namespace.
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 conducting view analysis via the C Interface.
AGGREGATE_TYPE
Determines how to aggregate edges from the results of view analysis.
C_INTERFACE SphericalViewAnalysisNoAggregateFlat(HF::RayTracer::EmbreeRayTracer *ERT, const float *node_ptr, int node_size, int *max_rays, float upward_fov, float downward_fov, float height, std::vector< RayResult > **out_results, RayResult **out_results_ptr)
Perform view analysis, and get the distance and meshid for each individual ray casted.
vector< std::array< float, 3 > > FibbonacciDistributePoints(int num_points, float upwards_fov, float downward_fov)
Evenly distribute a set of points around a sphere centered at the origin.
std::vector< float > SphericalRayshootWithAnyRTForDistance(RT &ray_tracer, const std::vector< N > &Nodes, int num_rays, float upward_limit=50.0f, float downward_limit=70.0f, float height=1.7f, const AGGREGATE_TYPE aggregation=AGGREGATE_TYPE::SUM)
Conduct view analysis and recieve a summarized set of results for each node.
C_INTERFACE SphericalViewAnalysisNoAggregate(HF::RayTracer::EmbreeRayTracer *ERT, const HF::SpatialStructures::Node *node_ptr, int node_size, int *max_rays, float upward_fov, float downward_fov, float height, std::vector< RayResult > **out_results, RayResult **out_results_ptr)
Perform view analysis, then get the distance and meshid for each individual ray casted.
C_INTERFACE SphereicalViewAnalysisAggregateFlat(HF::RayTracer::EmbreeRayTracer *ERT, const float *node_ptr, int node_size, int max_rays, float upward_fov, float downward_fov, float height, AGGREGATE_TYPE AT, std::vector< float > **out_scores, float **out_scores_ptr, int *out_scores_size)
Conduct view analysis, and aggregate the results.
C_INTERFACE SphereicalViewAnalysisAggregate(EmbreeRayTracer *ERT, Node *node_ptr, int node_size, int max_rays, float upward_fov, float downward_fov, float height, AGGREGATE_TYPE AT, vector< float > **out_scores, float **out_scores_ptr, int *out_scores_size)
Conduct view analysis, then aggregate the results.
C_INTERFACE SphericalDistribute(int *num_rays, vector< float > **out_direction_vector, float **out_direction_data, float upward_fov, float downward_fov)
Equally distribute points around a unit sphere.
Perform human scale analysis on 3D environments.
AGGREGATE_TYPE
The type of aggregation to use for ViewAnalysisAggregate
Custom exceptions and error codes used interally by DHARTAPI.
@ OK
Operation was successful.
A wrapper for Intel's Embree Library.
A Graph of nodes connected by edges that supports both integers and HF::SpatialStructures::Node.
A point in space with an ID.
The result of casting a ray at an object. Contains distance to the hitpoint and the ID of the mesh.