rl_RayLib User's Guide
1.1.6
Copyright (C) 2006 Smithsonian Astrophysical Observatory
This file is part of the rl_raylib package.
rl_raylib is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
tracefct is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor Boston, MA 02110-1301, USA
- Author:
- Terry Gaetz
The rl_RayLib library consists of a set of C++ classes for manipulating rays, including the effects of multilayer reflectivity.
The
rl_Ray class generalizes the rl_BasicRay class (found in the rl_basicray package) to include polarization information to the rl_BasicRay's position, direction, energy, and id number components. See the rl_basicray package documentation for further information on the rl_BasicRay and rl_RayMath classes.
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 yields much of the transformation functionality needed for basic raytracing.
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.