12#include "detray/definitions/algebra.hpp"
13#include "detray/definitions/containers.hpp"
14#include "detray/definitions/detail/qualifiers.hpp"
15#include "detray/definitions/indexing.hpp"
16#include "detray/geometry/detail/shape_utils.hpp"
17#include "detray/utils/string_helpers.hpp"
28template <
typename shape_t>
37 template <concepts::scalar scalar_t>
47 template <concepts::algebra algebra_t>
51 template <
typename bool_t>
55 static constexpr std::size_t
dim{shape_t::dim};
63 template <concepts::scalar scalar_t, concepts::po
int po
int_t>
66 return std::numeric_limits<scalar_t>::max();
77 template <concepts::algebra algebra_t>
84 if constexpr (std::same_as<result_type<dbool<algebra_t>>,
99 const bounds_t& ,
const point_t& ,
100 const scalar_t tol = 0.f,
const scalar_t edge_tol = 0.f)
const {
101 using bool_t =
decltype(tol < edge_tol);
103 if constexpr (std::same_as<result_type<bool_t>, bool_t>) {
116 template <concepts::scalar scalar_t>
117 DETRAY_HOST_DEVICE
constexpr scalar_t
measure(
119 if constexpr (
dim == 2) {
129 template <concepts::scalar scalar_t>
130 DETRAY_HOST_DEVICE
constexpr scalar_t
area(
132 return std::numeric_limits<scalar_t>::max();
138 template <concepts::scalar scalar_t>
139 DETRAY_HOST_DEVICE
constexpr scalar_t
volume(
141 return std::numeric_limits<scalar_t>::max();
147 template <concepts::scalar scalar_t>
168 template <concepts::algebra algebra_t>
178 template <concepts::algebra algebra_t>
190 template <concepts::algebra algebra_t>
199 template <concepts::scalar scalar_t>
202 const std::ostream& )
const {
Wraps any shape, but does not enforce boundaries.
Definition unbounded.hpp:29
constexpr scalar_t volume(const bounds_type< scalar_t > &) const
The volume of a the shape.
Definition unbounded.hpp:139
constexpr bounds_type< scalar_t > merge(const bounds_type< scalar_t > &, const bounds_type< scalar_t > &) const
Merge two unbounded shapes.
Definition unbounded.hpp:148
constexpr scalar_t measure(const bounds_type< scalar_t > &bounds) const
Measure of the shape: Inf.
Definition unbounded.hpp:117
detail::boundary_check_result< bool_t > result_type
Result type of a boundary check.
Definition unbounded.hpp:52
typename shape::boundaries boundaries
Boundary index enum inherited from the wrapped shape.
Definition unbounded.hpp:34
static constexpr std::string_view name_prefix
Convenience member to construct the name.
Definition unbounded.hpp:41
typename shape::template local_frame_type< algebra_t > local_frame_type
Local coordinate frame for boundary checks.
Definition unbounded.hpp:48
constexpr scalar_t area(const bounds_type< scalar_t > &) const
The area of a the shape.
Definition unbounded.hpp:130
constexpr result_type< dbool< algebra_t > > check_boundaries(const bounds_type< dscalar< algebra_t > > &, const dtransform3D< algebra_t > &, const dpoint3D< algebra_t > &, const dscalar< algebra_t >=0.f, const dscalar< algebra_t >=0.f) const
Check boundary values for a local point.
Definition unbounded.hpp:78
constexpr auto check_boundaries(const bounds_t &, const point_t &, const scalar_t tol=0.f, const scalar_t edge_tol=0.f) const
Return an inside result for a point supplied in local coordinates.
Definition unbounded.hpp:98
darray< scalar_t, boundaries::e_size > bounds_type
Container definition for the shape boundary values.
Definition unbounded.hpp:38
dvector< dpoint3D< algebra_t > > vertices(const bounds_type< dscalar< algebra_t > > &bounds, dindex n_seg) const
Generate vertices in local cartesian frame.
Definition unbounded.hpp:191
darray< dscalar< algebra_t >, 6 > local_min_bounds(const bounds_type< dscalar< algebra_t > > &bounds, const dscalar< algebra_t > env=std::numeric_limits< dscalar< algebra_t > >::epsilon()) const
Lower and upper point for minimal axis aligned bounding box.
Definition unbounded.hpp:169
static constexpr std::size_t dim
Dimension of the local coordinate system.
Definition unbounded.hpp:55
static constexpr utils::string_view_concat2 name
The name for this shape.
Definition unbounded.hpp:44
shape_t shape
Wrapped shape whose boundary checks always accept a point.
Definition unbounded.hpp:32
auto centroid(const bounds_type< dscalar< algebra_t > > &bounds) const
Definition unbounded.hpp:179
constexpr bool check_consistency(const bounds_type< scalar_t > &, const std::ostream &) const
Check consistency of boundary values.
Definition unbounded.hpp:200
constexpr scalar_t min_dist_to_boundary(const bounds_type< scalar_t > &, const point_t &) const
Find the minimum distance to any boundary.
Definition unbounded.hpp:64
Point concepts.
Definition concepts.hpp:71
Scalar concept: Elements of vectors/matrices (can be simd vectors).
Definition concepts.hpp:40
Detray include(s).
Definition array_operators.hpp:18
get_scalar_t< A, T > dscalar
Scalar type for algebra A and value type T.
Definition algebra.hpp:64
vecmem::vector< value_t > dvector
Vector container backed by vecmem.
Definition containers.hpp:34
unsigned int dindex
Default index type.
Definition indexing.hpp:18
get_boolean_t< A > dbool
Boolean type associated with the algebra backend.
Definition algebra.hpp:52
std::array< value_t, kDIM > darray
Fixed-size array container.
Definition containers.hpp:30
get_transform3D_t< A, T > dtransform3D
Three-dimensional transform type for algebra A and value type T.
Definition algebra.hpp:84
get_point3D_t< A, T > dpoint3D
Three-dimensional point type for algebra A and value type T.
Definition algebra.hpp:72
Convenience class to statically concatenate two string views.
Definition string_helpers.hpp:22