Unique identifier for geometry objects, based on the ACTS GeometryIdentifier.
More...
#include <detray/geometry/identifier.hpp>
|
|
using | encoder = detail::bit_encoder<value_t> |
| | Bit encoder used to read and update the packed fields.
|
|
using | value_t = std::uint_least64_t |
| | Unsigned storage type for the packed identifier fields.
|
Unique identifier for geometry objects, based on the ACTS GeometryIdentifier.
Encodes the volume index, the type of surface (portal, sensitive, passive etc), an index to identify a surface in a geometry accelerator structure, as well as two extra bytes that can be used to tag surfaces arbitrarily.
- Note
- the detray identifier is not compatible with the ACTS GeometryIdentifier!
- See also
- https://github.com/acts-project/acts/blob/main/Core/include/Acts/Geometry/GeometryIdentifier.hpp
◆ identifier()
| detray::geometry::identifier::identifier |
( |
value_t | encoded | ) |
|
|
explicitconstexpr |
Construct from an already encoded value.
- Parameters
-
| encoded | Value containing the encoded geometry fields. |
◆ extra()
| dindex detray::geometry::identifier::extra |
( |
| ) |
const |
|
constexpr |
- Returns
- the extra identifier
◆ id()
| surface_id detray::geometry::identifier::id |
( |
| ) |
const |
|
constexpr |
◆ index()
| dindex detray::geometry::identifier::index |
( |
| ) |
const |
|
constexpr |
- Returns
- the surface index.
◆ is_invalid()
| bool detray::geometry::identifier::is_invalid |
( |
| ) |
const |
|
constexprnoexcept |
Check whether the identifier is valid to use.
- Note
- The extra bits are allowed to be invalid and will not be checked
- Returns
- True when a required field has its invalid sentinel value.
◆ operator==()
| bool detray::geometry::identifier::operator== |
( |
const identifier & | rhs | ) |
const |
|
default |
Compare the complete packed identifier value.
- Parameters
-
| rhs | Identifier to compare with. |
- Returns
- True when both encoded values are equal.
◆ set_extra()
Set the extra identifier.
- Parameters
-
| extra | Extra tag value to encode. |
- Returns
- Reference to this identifier.
◆ set_id()
Set the surface id.
- Parameters
-
| id | Surface category to encode. |
- Returns
- Reference to this identifier.
◆ set_index()
Set the surface index.
- Parameters
-
| index | Surface index to encode. |
- Returns
- Reference to this identifier.
◆ set_transform()
Set the transform index.
- Parameters
-
| index | Transform index to encode. |
- Returns
- Reference to this identifier.
◆ set_volume()
Set the volume index.
- Parameters
-
| volume | Volume index to encode. |
- Returns
- Reference to this identifier.
◆ transform()
| dindex detray::geometry::identifier::transform |
( |
| ) |
const |
|
constexpr |
- Returns
- the transform index
◆ value()
| value_t detray::geometry::identifier::value |
( |
| ) |
const |
|
constexprnoexcept |
- Returns
- the encoded value.
◆ volume()
| dindex detray::geometry::identifier::volume |
( |
| ) |
const |
|
constexpr |