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/coordinates/cartesian2D.hpp"
17#include "detray/geometry/detail/shape_utils.hpp"
27template <std::
size_t DIM = 2>
31 static constexpr std::string_view
name =
"unmasked";
37 template <concepts::scalar scalar_t>
41 template <concepts::algebra algebra_t>
45 template <
typename bool_t>
49 static constexpr std::size_t
dim{DIM};
57 template <concepts::scalar scalar_t, concepts::po
int po
int_t>
60 return std::numeric_limits<scalar_t>::max();
71 template <concepts::algebra algebra_t>
85 template <concepts::scalar scalar_t, concepts::po
int po
int_t>
88 const scalar_t tol = 0.f,
const scalar_t edge_tol = 0.f) const
89 -> decltype(tol < edge_tol) {
99 template <concepts::scalar scalar_t>
100 DETRAY_HOST_DEVICE
constexpr scalar_t
measure(
102 if constexpr (
dim == 2) {
112 template <concepts::scalar scalar_t>
113 DETRAY_HOST_DEVICE
constexpr scalar_t
area(
115 return std::numeric_limits<scalar_t>::max();
121 template <concepts::scalar scalar_t>
122 DETRAY_HOST_DEVICE
constexpr scalar_t
volume(
124 return std::numeric_limits<scalar_t>::max();
130 template <concepts::scalar scalar_t>
143 template <concepts::algebra algebra_t>
149 constexpr scalar_t inv{detail::invalid_value<scalar_t>()};
151 return {-inv, -inv, -inv, inv, inv, inv};
155 template <concepts::algebra algebra_t>
158 return {0.f, 0.f, 0.f};
166 template <concepts::algebra algebra_t>
175 template <concepts::scalar scalar_t>
178 const std::ostream& )
const {
Generic shape without boundaries.
Definition unmasked.hpp:28
static constexpr std::size_t dim
Dimension of the local coordinate system.
Definition unmasked.hpp:49
darray< scalar_t, boundaries::e_size > bounds_type
Container definition for the shape boundary values.
Definition unmasked.hpp:38
dvector< dpoint3D< algebra_t > > vertices(const bounds_type< dscalar< algebra_t > > &bounds, dindex) const
Generate vertices in local cartesian frame.
Definition unmasked.hpp:167
static constexpr std::string_view name
The name for this shape.
Definition unmasked.hpp:31
bool_t result_type
Result type of a boundary check.
Definition unmasked.hpp:46
constexpr bounds_type< scalar_t > merge(const bounds_type< scalar_t > &, const bounds_type< scalar_t > &) const
Merge two unmasked shapes.
Definition unmasked.hpp:131
constexpr 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 unmasked.hpp:72
constexpr bool check_consistency(const bounds_type< scalar_t > &, const std::ostream &) const
Check consistency of boundary values.
Definition unmasked.hpp:176
cartesian2D< algebra_t > local_frame_type
Local coordinate frame for boundary checks.
Definition unmasked.hpp:42
constexpr scalar_t volume(const bounds_type< scalar_t > &) const
The volume of a the shape.
Definition unmasked.hpp:122
darray< dscalar< algebra_t >, 6 > local_min_bounds(const bounds_type< dscalar< algebra_t > > &, const dscalar< algebra_t >=std::numeric_limits< dscalar< algebra_t > >::epsilon()) const
Lower and upper point for minimal axis aligned bounding box.
Definition unmasked.hpp:144
constexpr scalar_t area(const bounds_type< scalar_t > &) const
The area of a the shape.
Definition unmasked.hpp:113
boundaries
Boundary array layout; this shape has one placeholder entry.
Definition unmasked.hpp:34
dpoint3D< algebra_t > centroid(const bounds_type< dscalar< algebra_t > > &) const
Definition unmasked.hpp:156
constexpr auto check_boundaries(const bounds_type< scalar_t > &, const point_t &, const scalar_t tol=0.f, const scalar_t edge_tol=0.f) const -> decltype(tol< edge_tol)
Always accept a point supplied in local coordinates.
Definition unmasked.hpp:86
constexpr scalar_t measure(const bounds_type< scalar_t > &bounds) const
Measure of the shape: Inf.
Definition unmasked.hpp:100
scalar_t min_dist_to_boundary(const bounds_type< scalar_t > &, const point_t &) const
Find the minimum distance to any boundary.
Definition unmasked.hpp:58
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
Projection into a 2D cartesian coordinate frame.
Definition cartesian2D.hpp:19