DHART
|
Contains definitions for the HF::SpatialStructures namespace. More...
#include <cmath>
Go to the source code of this file.
Namespaces | |
namespace | HF |
Perform human scale analysis on 3D environments. | |
namespace | HF::SpatialStructures |
Contains standard fundamental data structures for representing space used throughout DHARTAPI. | |
Functions | |
template<typename desired_type , typename numeric_type > | |
constexpr desired_type | HF::SpatialStructures::DivideBy1 (numeric_type n) |
Cast a value to the specific type and divide 1 by it. More... | |
float | HF::SpatialStructures::roundhf (float f, float p=FLOAT_PRECISION, float r=ROUNDING_PRECISION) |
Round a float to the nearest precision defined globally. The global values can be overridden with optional parameters p and r. If r is 0.01, p must be 100.0, meaning there should be one more 0 between the decimal. More... | |
float | HF::SpatialStructures::trunchf (float f, float p=1000.0, float r=0.001) |
Truncate a float to the nearest precision defined globally. The global values can be overridden with optional parameters p and r. If r is 0.01, p must be 100.0, meaning there should be one more 0 between the decimal. More... | |
template<typename numeric_type > | |
numeric_type | HF::SpatialStructures::roundhf_tail (numeric_type f, int precision) |
round a number twice, once at the precision+1, and again at the precision This method is to fix cases in which the precision to round to is 4, and the following number is 9. More... | |
template<typename numeric_type > | |
constexpr numeric_type | HF::SpatialStructures::roundhf_tmp (numeric_type f, numeric_type p, numeric_type r) |
round a number to the nearest precision defined globally. The global values can be overridden with optional parameters p and r. If r is 0.01, p must be 100.0, meaning there should be one more 0 between the decimal. More... | |
template<typename desired_type , typename numeric_type > | |
constexpr desired_type | HF::SpatialStructures::roundhf_tmp (numeric_type f, numeric_type p) |
Round a number to the nearest value to itself at a specific precision. More... | |
template<typename desired_type , typename numeric_type > | |
constexpr desired_type | HF::SpatialStructures::roundhf_tmp (numeric_type f) |
Round a number to the global rounding precision. More... | |
template<typename numeric_type > | |
constexpr numeric_type | HF::SpatialStructures::trunchf_tmp (numeric_type f, numeric_type p, numeric_type r) |
truncate a number to the nearest precision defined globally. The global values can be overridden with optional parameters p and r. If r is 0.01, p must be 100.0, meaning there should be one more 0 between the decimal. More... | |
template<typename desired_type , typename numeric_type > | |
constexpr desired_type | HF::SpatialStructures::trunchf_tmp (numeric_type f, numeric_type p) |
Truncate a number to the nearest value not greater than itself at a specific precision. More... | |
template<typename desired_type , typename numeric_type > | |
constexpr desired_type | HF::SpatialStructures::trunchf_tmp (numeric_type f) |
Truncate a number to the nearest value not greater than itself at a specific precision. More... | |
Variables | |
constexpr float | HF::SpatialStructures::ROUNDING_PRECISION = 0.0001f |
Minimum value that can be represented in DHART_API. More... | |
constexpr float | HF::SpatialStructures::FLOAT_PRECISION = 10000.0f |
Used to convert to a given precision (avoids division) More... | |
constexpr float | HF::SpatialStructures::GROUND_OFFSET = 0.001f |
Offset to be used for offsetting from a polygon when performing checks. More... | |
Contains definitions for the HF::SpatialStructures namespace.
Definition in file Constants.h.