OGS
anonymous_namespace{CoordinateSystem.cpp} Namespace Reference

Functions

unsigned char getCoordinateSystem (GeoLib::AABB const &bbox)
 

Function Documentation

◆ getCoordinateSystem()

unsigned char anonymous_namespace{CoordinateSystem.cpp}::getCoordinateSystem ( GeoLib::AABB const & bbox)

Definition at line 20 of file CoordinateSystem.cpp.

21{
22 unsigned char coords = 0;
23
24 auto const [bbox_min, bbox_max] = bbox.getMinMaxPoints();
25 Eigen::Vector3d const pt_diff = bbox_max - bbox_min;
26
27 // The axis aligned bounding box is a from the right half-open interval.
28 // Therefore, the difference between the particular coordinates of the
29 // points is modified by the unit in the last place towards zero.
30 if (std::nexttoward(std::abs(pt_diff[0]), 0.0) > .0)
31 {
33 }
34 if (std::nexttoward(std::abs(pt_diff[1]), 0.0) > .0)
35 {
37 }
38 if (std::nexttoward(std::abs(pt_diff[2]), 0.0) > .0)
39 {
41 }
42
43 return coords;
44}
constexpr ranges::views::view_closure coords
Definition Mesh.h:232

References GeoLib::AABB::getMinMaxPoints(), MeshLib::CoordinateSystemType::X, MeshLib::CoordinateSystemType::Y, and MeshLib::CoordinateSystemType::Z.