The rl_RayLib library consists of a set of C++ classes for manipulating rays, including the effects of multilayer reflectivity.
The ray classes include:
- rl_BasicRay: a stripped-down ray consisting of position, direction, energy, and an id number.
- rl_Ray: adds ray polarization information to an rl_BasicRay. The rays can be translated/rotated from a standard coordinate system (STD) to a ``body center system'' (BCS), and de-rotated/de-translated from the BCS system back to the STD system. Given a surface normal, the ray direction can be reflected to a new direction. This replicates much of the transformation functionality of the OSAC library. the intention is to eventually implement the rest of the OSAC functionality. The main missing component at this point is the evaluation of the distorted surface interception; most of the rest of the functionality (including [multilayer] reflectivity is in rl_RayLib.
The reflectivity classes include a number of components:
- rl_DielectricData encapsulates an array of energy bins providing the dielectric decrement information and methods to evaluate (interpolate) the decrements at a requested energy. The array is built on a helper ``Plain Ol' Data'' (POD) struct rl_DielectricPOD which provides the dielectric decrement at a specific energy.
- rl_DielectricLayer encapsulates the information about the interaction of a photon with a single dielectric layer, including the layer thickness, dielectric decrements given the photon energy, the component of the photon wave vector perpendicular to the layer, and various reflection and transmission coefficients, and surface ``roughness'' information. The layer can be a ``substrate'' (in which case the layer is considered as semi-infinite), vacuum, or a dielectric layer. These are mediated by helper ``Plain Ol' Data'' (POD) structs and classes: rl_ReflectionCoefPOD, rl_TransmissionCoefPOD, rl_ReflectionCoefPOD.
- rl_Multilayer encapsulates a stack of rl_DielectricLayer's. Given the energy, sine of the graze angle, the multilayer reflectivity can be evaluated.
- rl_MultilayerSurface adds surface normal information to an rl_Multilayer. Given an rl_Ray, rl_MultilayerSurface can evaluate the reflectivity for the surface. This is also where hooks for surface interception and scattering could be placed.
The rl_RaySupLib library includes a number of classes providing i/o support: interfacing with the BPipe transport, and reading initialization information from rdb database tables. These include:
- rl_BPipe sets up and handles the BPipe transport
- rl_DielectricPOD_rdb handles initializing rl_DielectricPOD from rdb tables. The rdb table contains a list of energies and the corresponding complex dielectric decrements.
- rl_Multilaye_rdb handles initializing an rl_Multilayer from an rdb table. The rdb table provides the information on each layer (name, thickness, roughness type) and the name of an rdb file specifying the dielectric decrement information.