ad_map_access
BoundingSphereOperation.hpp
Go to the documentation of this file.
1 // ----------------- BEGIN LICENSE BLOCK ---------------------------------
2 //
3 // Copyright (C) 2018-2021 Intel Corporation
4 //
5 // SPDX-License-Identifier: MIT
6 //
7 // ----------------- END LICENSE BLOCK -----------------------------------
12 #pragma once
13 
17 
19 namespace ad {
21 namespace map {
23 namespace point {
24 
29 inline physics::Distance distance(BoundingSphere const &left, BoundingSphere const &right)
30 {
31  physics::Distance const distanceCenter = distance(left.center, right.center);
32  return std::max(physics::Distance(0.), distanceCenter - left.radius - right.radius);
33 }
34 
38 BoundingSphere calcBoundingSphere(Geometry const &edgeLeft, Geometry const &edgeRight);
39 
40 } // namespace point
41 } // namespace map
42 } // namespace ad
43 
ad
namespace ad
Definition: GeometryStoreItem.hpp:28
ad::map::point::BoundingSphere::center
::ad::map::point::ECEFPoint center
Definition: BoundingSphere.hpp:123
ECEFOperation.hpp
operator+
::ad::map::point::BoundingSphere operator+(::ad::map::point::BoundingSphere const &a, ::ad::map::point::BoundingSphere const &b)
calculate the union of two BoundingSpheres
ad::map::point::distance
physics::Distance distance(BoundingSphere const &left, BoundingSphere const &right)
Computes distance between BoundingSpheres.
Definition: BoundingSphereOperation.hpp:29
Geometry.hpp
ad::map::point::BoundingSphere
DataType BoundingSphere.
Definition: BoundingSphere.hpp:46
ad::map::point::calcBoundingSphere
BoundingSphere calcBoundingSphere(Geometry const &edgeLeft, Geometry const &edgeRight)
calculate the bounding sphere of two edges
ad::map::point::BoundingSphere::radius
::ad::physics::Distance radius
Definition: BoundingSphere.hpp:128
BoundingSphere.hpp