Celeritas
0.5.0-56+6b053cd
|
Data for surfaces within a single unit. More...
#include <OrangeData.hh>
Public Types | |
using | RealId = OpaqueId< real_type > |
Public Member Functions | |
CELER_FUNCTION size_type | size () const |
Number of surfaces stored. | |
CELER_FUNCTION | operator bool () const |
True if defined consistently. | |
Public Attributes | |
ItemRange< SurfaceType > | types |
ItemRange< RealId > | data_offsets |
Data for surfaces within a single unit.
Surfaces each have a compile-time number of real data needed to define them. (These usually are the nonzero coefficients of the quadric equation.) The two fields in this record point to the collapsed surface types and linearized data for all surfaces in a unit.
The "types" and "data offsets" are both indexed into using the local surface ID. The result of accessing "data offset" is an index into the real_ids
array, which then points us to the start address in reals
. This marks the beginning of the data used by the surface. Since the surface type tells us the number of real values needed for that surface, we implicitly get a Span of real values with a single indirection.