DHART
Loading...
Searching...
No Matches
cinterface_utils.h
Go to the documentation of this file.
1#include <vector>
2#include <array>
3
4#ifndef HF_SPATIAL_STRUCTURES
5#define HF_SPATIAL_STRUCTURES
6
15namespace HF {
16}
17
18#define C_INTERFACE extern "C" __declspec(dllexport) int
19
26
37std::vector<std::array<float, 3>> ConvertRawFloatArrayToPoints(const float* raw_array, int size);
38
45
56std::vector<std::array<int, 3>> ConvertRawIntArrayToPoints(const int* raw_array, int size);
57
61
77C_INTERFACE DestroyFloatVector(std::vector<float>* float_vector);
78
79
87C_INTERFACE DestroyIntVector(std::vector<int>* int_vector);
88
89C_INTERFACE DestroyCharArray(char* char_array);
90
95
111template <typename T>
112inline void DeleteRawPtr(T * ptr ) {
113 if (ptr)
114 delete ptr;
115}
116
117#endif
void DeleteRawPtr(T *ptr)
Delete some object pointed to by ptr
C_INTERFACE DestroyCharArray(char *char_array)
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
Definition: CInterface.cpp:24
#define C_INTERFACE
C_INTERFACE DestroyIntVector(std::vector< int > *int_vector)
Delete a vector of integers.
std::vector< std::array< int, 3 > > ConvertRawIntArrayToPoints(const int *raw_array, int size)
Convert a raw array from an external caller to an organized vector of points
Definition: CInterface.cpp:35
C_INTERFACE DestroyFloatVector(std::vector< float > *float_vector)
Delete a float vector that's pointed to by float_vector
Perform human scale analysis on 3D environments.