Unit.ixx File
Included Headers
#include <string>
#include <helios.math.types>
Namespaces Index
| namespace | helios |
| namespace | core |
|
Core utilities shared across the helios engine. More... | |
| namespace | units |
File Listing
The file content with the documentation metadata removed is:
13export namespace helios::core::units {
48 constexpr auto HELIOS_SPATIAL_UNIT = Unit::Meter;
53 constexpr auto HELIOS_TEMPORAL_UNIT = Unit::Seconds;
58 constexpr float CENTIMETERS = 0.01f;
68 constexpr float MILLISECONDS = 0.001f;
83 return cm * CENTIMETERS;
94 return m * METERS;
104 constexpr helios::math::vec3f fromM(helios::math::vec3f v) noexcept {
105 return helios::math::vec3f{v[0] * METERS, v[1] * METERS, v[2] * METERS};
115 constexpr helios::math::aabbf fromM(helios::math::aabbf v) noexcept {
116 return helios::math::aabbf{
130 return s * SECONDS;
141 return ms * MILLISECONDS;
157 case Unit::Meter:
158 return fromM(v);
159 case Unit::Centimeter:
160 return fromCm(v);
161 case Unit::Seconds:
162 return fromS(v);
163 case Unit::MilliSeconds:
164 return fromMs(v);
178 [[nodiscard]] constexpr helios::math::aabbf from(helios::math::aabbf aabb, const Unit unit) noexcept {
180 case Unit::Meter:
181 return fromM(aabb);
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.