/**************************************************************************** * Copyright (c) 2017-2022 by the ArborX authors * * All rights reserved. * * * * This file is part of the ArborX library. ArborX is * * distributed under a BSD 3-clause license. For the licensing terms see * * the LICENSE file in the top-level directory. * * * * SPDX-License-Identifier: BSD-3-Clause * ****************************************************************************/ #ifndef ARBORX_Sphere_HPP #define ARBORX_Sphere_HPP #include #include #include namespace ArborX { struct Sphere { KOKKOS_DEFAULTED_FUNCTION Sphere() = default; KOKKOS_INLINE_FUNCTION constexpr Sphere(Point const ¢roid, double radius) // FIXME : _centroid(centroid) , _radius(static_cast(radius)) {} KOKKOS_INLINE_FUNCTION constexpr Point ¢roid() { return _centroid; } KOKKOS_INLINE_FUNCTION constexpr Point const ¢roid() const { return _centroid; } KOKKOS_INLINE_FUNCTION constexpr float radius() const { return _radius; } Point _centroid = {}; float _radius = 0.; }; template <> struct GeometryTraits::dimension { static constexpr int value = 3; }; template <> struct GeometryTraits::tag { using type = SphereTag; }; template <> struct ArborX::GeometryTraits::coordinate_type { using type = float; }; } // namespace ArborX #endif