LCOV - code coverage report
Current view: top level - include/ad/map/point - BoundingSphereOperation.hpp (source / functions) Hit Total Coverage
Test: ad_map_access Lines: 3 3 100.0 %
Date: 2022-10-04 09:48:07 Functions: 1 1 100.0 %
Branches: 4 8 50.0 %

           Branch data     Line data    Source code
       1                 :            : // ----------------- BEGIN LICENSE BLOCK ---------------------------------
       2                 :            : //
       3                 :            : // Copyright (C) 2018-2021 Intel Corporation
       4                 :            : //
       5                 :            : // SPDX-License-Identifier: MIT
       6                 :            : //
       7                 :            : // ----------------- END LICENSE BLOCK -----------------------------------
       8                 :            : /**
       9                 :            :  * @file
      10                 :            :  */
      11                 :            : 
      12                 :            : #pragma once
      13                 :            : 
      14                 :            : #include "ad/map/point/BoundingSphere.hpp"
      15                 :            : #include "ad/map/point/ECEFOperation.hpp"
      16                 :            : #include "ad/map/point/Geometry.hpp"
      17                 :            : 
      18                 :            : /** @brief namespace ad */
      19                 :            : namespace ad {
      20                 :            : /** @brief namespace map */
      21                 :            : namespace map {
      22                 :            : /** @brief namespace point */
      23                 :            : namespace point {
      24                 :            : 
      25                 :            : /**
      26                 :            :  * @brief Computes distance between BoundingSpheres.
      27                 :            :  * @returns Distance between two bounding spheres in meters.
      28                 :            :  */
      29                 :     475992 : inline physics::Distance distance(BoundingSphere const &left, BoundingSphere const &right)
      30                 :            : {
      31         [ +  - ]:     475992 :   physics::Distance const distanceCenter = distance(left.center, right.center);
      32   [ +  -  +  -  :     475992 :   return std::max(physics::Distance(0.), distanceCenter - left.radius - right.radius);
                   +  - ]
      33                 :            : }
      34                 :            : 
      35                 :            : /**
      36                 :            :  * @brief calculate the bounding sphere of two edges
      37                 :            :  */
      38                 :            : BoundingSphere calcBoundingSphere(Geometry const &edgeLeft, Geometry const &edgeRight);
      39                 :            : 
      40                 :            : } // namespace point
      41                 :            : } // namespace map
      42                 :            : } // namespace ad
      43                 :            : 
      44                 :            : /**
      45                 :            :  * @brief calculate the union of two BoundingSpheres
      46                 :            :  *
      47                 :            :  * @param[in] a BoundingSphere a
      48                 :            :  * @param[in] b BoundingSphere b
      49                 :            :  *
      50                 :            :  * @returns union BoundingSpere containing both: a U b
      51                 :            :  */
      52                 :            : ::ad::map::point::BoundingSphere operator+(::ad::map::point::BoundingSphere const &a,
      53                 :            :                                            ::ad::map::point::BoundingSphere const &b);

Generated by: LCOV version 1.14