ad_map_access
BoundingSphereValidInputRange.hpp
Go to the documentation of this file.
1 /*
2  * ----------------- BEGIN LICENSE BLOCK ---------------------------------
3  *
4  * Copyright (C) 2018-2020 Intel Corporation
5  *
6  * SPDX-License-Identifier: MIT
7  *
8  * ----------------- END LICENSE BLOCK -----------------------------------
9  */
10 
18 #pragma once
19 
20 #include <cmath>
21 #include <limits>
24 #include "ad/physics/DistanceValidInputRange.hpp"
25 #include "spdlog/fmt/ostr.h"
26 #include "spdlog/spdlog.h"
27 
38 inline bool withinValidInputRange(::ad::map::point::BoundingSphere const &input, bool const logErrors = true)
39 {
40  // check for generic member input ranges
41  bool inValidInputRange = true;
42  inValidInputRange = withinValidInputRange(input.center, logErrors) && withinValidInputRange(input.radius, logErrors);
43  if (!inValidInputRange && logErrors)
44  {
45  spdlog::error("withinValidInputRange(::ad::map::point::BoundingSphere)>> {} has invalid member",
46  input); // LCOV_EXCL_BR_LINE
47  }
48 
49  return inValidInputRange;
50 }
ad::map::point::BoundingSphere::center
::ad::map::point::ECEFPoint center
Definition: BoundingSphere.hpp:123
withinValidInputRange
bool withinValidInputRange(::ad::map::point::BoundingSphere const &input, bool const logErrors=true)
check if the given BoundingSphere is within valid input range
Definition: BoundingSphereValidInputRange.hpp:38
ad::map::point::BoundingSphere
DataType BoundingSphere.
Definition: BoundingSphere.hpp:46
ad::map::point::BoundingSphere::radius
::ad::physics::Distance radius
Definition: BoundingSphere.hpp:128
BoundingSphere.hpp
ECEFPointValidInputRange.hpp