|
|
using | algebra_type = algebra_t |
| | Linear algebra types.
|
|
using | boundaries = typename shape::boundaries |
| | Boundary index enum supplied by the shape.
|
|
using | links_type = links_t |
| | Type used to link this mask to its volume.
|
|
using | local_frame = typename shape::template local_frame_type<algebra_t> |
| | Coordinate frame used for shape boundary checks.
|
|
using | mask_values = typename shape::template bounds_type<scalar_type> |
| | Array type that stores the shape boundary values.
|
|
using | point2_type = dpoint2D<algebra_t> |
| | Two-dimensional point type in the algebra backend.
|
|
using | point3_type = dpoint3D<algebra_t> |
| | Three-dimensional point type in the algebra backend.
|
|
using | result_type = typename shape::template result_type<dbool<algebra_t>> |
| | Result type returned by shape boundary checks.
|
|
using | scalar_type = dscalar<algebra_t> |
| | Scalar type used for boundary values.
|
|
using | shape = shape_t |
| | Geometric shape whose boundaries define this mask.
|
|
using | transform3_type = dtransform3D<algebra_t> |
| | Transform type used to map between local and global coordinates.
|
|
using | vector3_type = dvector3D<algebra_t> |
| | Three-dimensional vector type in the algebra backend.
|
|
|
constexpr | mask ()=default |
| | Default constructor.
|
template<typename... Args>
requires (sizeof...(Args) == shape::boundaries::e_size) |
| constexpr | mask (const links_type &link, Args &&... args) |
| | Constructor from single mask boundary values.
|
| constexpr | mask (const mask_values &values, const links_type &link) |
| | Constructor from mask boundary array.
|
| | mask (const std::vector< scalar_type > &values, const links_type &link) |
| | Constructor from mask boundary vector.
|
template<typename S = shape_t>
requires (S::dim == 2) |
| constexpr auto | area () const -> scalar_type |
| auto | centroid () const |
| auto | local_min_bounds (const scalar_type env=std::numeric_limits< scalar_type >::epsilon()) const -> mask< cuboid3D, algebra_t, unsigned int > |
| | Lower and upper point for minimum axis aligned bounding box.
|
| constexpr auto | measure () const -> scalar_type |
| auto | min_dist_to_boundary (const point3_type &loc_p) const -> scalar_type |
| | Find the minimum distance to any boundary.
|
| auto | operator= (const mask_values &rhs) -> mask< shape_t, algebra_t, links_t > & |
| | Assignment operator from an array, convenience function.
|
| bool | operator== (const mask &rhs) const =default |
| | Equality operator.
|
| constexpr auto | operator[] (const std::size_t value_index) -> scalar_type & |
| | Subscript operator - non-const.
|
| constexpr auto | operator[] (const std::size_t value_index) const -> scalar_type |
| | Subscript operator - const.
|
| constexpr bool | self_check (std::ostream &os) const |
| constexpr auto | to_global_frame (const transform3_type &trf, const point2_type &loc, const vector3_type &dir) const -> point3_type |
| auto | to_string () const -> std::string |
| auto | values () const -> const mask_values & |
| auto | vertices (const dindex n_seg) const -> dvector< point3_type > |
| | Vertices of the mask in local cartesian coordinates.
|
template<typename S = shape_t>
requires (S::dim == 3) |
| constexpr auto | volume () const -> scalar_type |
| auto | volume_link () -> links_type & |
| auto | volume_link () const -> const links_type & |
| template<concepts::point point_t> |
| constexpr result_type | resolve (const point_t &loc_p, const scalar_type tol=std::numeric_limits< scalar_type >::epsilon(), const scalar_type edge_tol=0.f) const |
| | Mask this shape onto a surface.
|
| constexpr result_type | resolve (const transform3_type &trf, const point3_type &glob_p, const scalar_type tol=std::numeric_limits< scalar_type >::epsilon(), const scalar_type edge_tol=0.f) const |
| template<concepts::point point_t> |
| constexpr dbool< algebra_t > | is_inside (const point_t &loc_p, const scalar_type tol=std::numeric_limits< scalar_type >::epsilon()) const |
| constexpr dbool< algebra_type > | is_inside (const transform3_type &trf, const point3_type &glob_p, const scalar_type tol=std::numeric_limits< scalar_type >::epsilon()) const |
template<typename shape_t, concepts::algebra algebra_t, typename links_t = std::uint_least16_t>
requires concepts::shape<shape_t, algebra_t>
class detray::mask< shape_t, algebra_t, links_t >
Mask a region on a surface and link it to a volume.
The class uses a lightweight 'shape' that defines the local geometry of a surface (local coordinates and how to check boundaries on local point that lies on the surface). A simple example is rectangle2D , can be used to mask a rectangle on an underlying plane. This class can then be instantiated as a concrete mask that holds the boundary values, as well as the link to a particular volume, which is needed during geometry navigation.
- Template Parameters
-
| shape_t | underlying geometrical shape of the mask, rectangle etc |
| links_t | the type of link into the volume container (e.g. single index vs range) |