Celeritas 0.7.0-dev.79+develop.b3dc2e108
|
Optical surface physics data for a track. More...
#include <SurfacePhysicsView.hh>
Classes | |
struct | Initializer |
Public Types | |
Type aliases | |
using | SurfaceParamsRef = NativeCRef< SurfacePhysicsParamsData > |
using | SurfaceStateRef = NativeRef< SurfacePhysicsStateData > |
Public Member Functions | |
CELER_FUNCTION | SurfacePhysicsView (SurfaceParamsRef const &, SurfaceStateRef const &, TrackSlotId) |
Initialize view from surface physics data and state for a given track. | |
CELER_FUNCTION SurfacePhysicsView & | operator= (Initializer const &) |
Initialize track state with given initializer data. | |
CELER_FUNCTION void | reset () |
Reset the state of a track. | |
CELER_FUNCTION SurfaceId | surface () const |
Get geometric surface ID the track is currently on. | |
CELER_FUNCTION SubsurfaceDirection | orientation () const |
Get traversal orientation of the current surface. | |
CELER_FUNCTION Real3 const & | global_normal () const |
Get global surface normal. | |
CELER_FUNCTION bool | is_crossing_boundary () const |
Whether the track is undergoing boundary crossing. | |
CELER_FUNCTION bool | is_exiting (SubsurfaceDirection) const |
Whether the direction is exiting the surface. | |
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 SurfaceTrackPosition | subsurface_position () const |
Current position of the track in the sub-surfaces, in track-local coordinates. | |
CELER_FUNCTION void | subsurface_position (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 OptMatId | subsurface_material () const |
Return the subsurface material ID of the current track position. | |
CELER_FUNCTION PhysSurfaceId | subsurface_interface (SubsurfaceDirection) const |
Get the physics surface ID of the subsurface in the given direction. | |
CELER_FUNCTION SubsurfaceDirection | traversal_direction (Real3 const &) const |
Calculate traversal direction from track momentum. | |
CELER_FUNCTION SurfacePhysicsMapView | surface_physics_map (SurfacePhysicsOrder, PhysSurfaceId) const |
Get surface model map for the given step and physics surface. | |
CELER_FUNCTION Real3 const & | facet_normal () const |
Get local facet normal after roughness sampling. | |
CELER_FUNCTION void | facet_normal (Real3 const &) |
Assign local facet normal from roughness sampling. | |
CELER_FUNCTION void | cross_subsurface_interface (SubsurfaceDirection) |
Cross the subsurface interface in the given direction. | |
CELER_FUNCTION SurfaceId | default_surface () const |
Get the default surface. | |
CELER_FUNCTION ActionId | init_boundary_action () const |
Get init-boundary action. | |
CELER_FUNCTION ActionId | surface_stepping_action () const |
Get surface stepping loop action. | |
CELER_FUNCTION ActionId | post_boundary_action () const |
Get post-boundary action. | |
Optical surface physics data for a track.
Tracks maintain a position while traversing the interstitial materials of an optical surface. This class provides transformations from this position based on the surface orientation and traversal direction to access relevant material and interface data in storage.
|
inline |
Get global surface normal.
The global surface normal is the normal defined by the geometry and does not include any roughness effects. By convention it points from the post-volume into the pre-volume.
|
inline |
Whether the track is undergoing boundary crossing.
Returns true if there's a valid surface ID, otherwise false.
|
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 |
Get traversal orientation of the current surface.
Subsurfaces are ordered in storage between two volumes. This orientation specifies if the track is traversing the stored list of sub-surfaces in forward or reverse order.
|
inline |
Reset the state of a track.
Invalidates the surface ID, indicating the track is no longer undergoing boundary crossing.
|
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.
|
inline |
Get geometric surface ID the track is currently on.
The ID is invalid if the track is not undergoing a boundary crossing.