Celeritas 0.7.0-dev.127+develop.e63889793
|
Manage one-dimensional logic for traversing an optical surface. More...
#include <SurfaceTraversalView.hh>
Classes | |
struct | Initializer |
Public Types | |
Type aliases | |
using | SurfaceParamsRef = NativeCRef< SurfacePhysicsParamsData > |
using | SurfaceStateRef = NativeRef< SurfacePhysicsStateData > |
Public Member Functions | |
CELER_FUNCTION | SurfaceTraversalView (SurfaceParamsRef const &, SurfaceStateRef const &, TrackSlotId) |
Create view from surface physics data and state for a given track. | |
CELER_FUNCTION SurfaceTraversalView & | operator= (Initializer const &) |
Initialize track state with given initializer data. | |
CELER_FUNCTION bool | in_pre_volume () const |
Whether the track is in the pre-volume. | |
CELER_FUNCTION bool | in_post_volume () const |
Whether the track is in the post-volume. | |
CELER_FUNCTION bool | is_exiting () const |
Whether the current track direction is exiting the surface. | |
CELER_FUNCTION bool | is_exiting (SubsurfaceDirection) const |
Whether the direction is exiting the surface. | |
CELER_FUNCTION SurfaceTrackPosition | pos () const |
Current position of the track in the sub-surfaces, in track-local coordinates. | |
CELER_FUNCTION SurfaceTrackPosition | next_pos () const |
CELER_FUNCTION void | pos (SurfaceTrackPosition) |
Set current position of the track in the sub-surfaces, in track-local coordinates. | |
CELER_FUNCTION SurfaceTrackPosition::size_type | num_positions () const |
Get number of valid track positions in the surface. | |
CELER_FUNCTION SubsurfaceDirection | dir () const |
Get current track traversal direction. | |
CELER_FUNCTION void | dir (SubsurfaceDirection) |
Set current track traversal direction. | |
CELER_FUNCTION void | cross_interface (SubsurfaceDirection) |
Cross the subsurface interface in the given direction. | |
Manage one-dimensional logic for traversing an optical surface.
|
inline |
Get current track traversal direction.
This quantity is cached for a single loop of surface boundary crossing to avoid repeated queries of the geometry. The traversal direction should be updated when the geometry direction is updated after an interaction.
|
inline |
Get number of valid track positions in the surface.
This is equivalent to the number of interstitial sub-surface materials, plus the pre-volume and post-volumes.
|
inline |
Current position of the track in the sub-surfaces, in track-local coordinates.
Tracks traverse a surface in track-local coordinates where 0 is the pre-volume and N is the post-volume. Depending on the surface orientation, this will be mapped to the appropriate sub-surface material and interface.