Celeritas  0.5.0-56+6b053cd
Public Member Functions | List of all members
celeritas::optical::MaterialView Class Reference

Access optical material properties. More...

#include <MaterialView.hh>

Public Types

Type aliases
using ParamsRef = NativeCRef< MaterialParamsData >
 
using MaterialId = OpticalMaterialId
 

Public Member Functions

CELER_FUNCTION MaterialView (ParamsRef const &params, MaterialId id)
 Construct from an optical material.
 
CELER_FUNCTION MaterialView (ParamsRef const &params, VolumeId vol)
 Construct from the current geometry volume.
 
CELER_FUNCTION operator bool () const
 Whether the view is into an optical material. More...
 
CELER_FORCEINLINE_FUNCTION MaterialId material_id () const
 Get the optical material id.
 
CELER_FUNCTION GenericCalculator make_refractive_index_calculator () const
 Access energy-dependent refractive index.
 

Detailed Description

Access optical material properties.

Member Function Documentation

◆ operator bool()

CELER_FORCEINLINE_FUNCTION celeritas::optical::MaterialView::operator bool ( ) const
inline

Whether the view is into an optical material.

This accessor is so that tracks can enter a non-optical region and be killed without crashing the code.


The documentation for this class was generated from the following file: