1 #ifndef rl_ReflectionCoefPOD_h_INCLUDED 2 #define rl_ReflectionCoefPOD_h_INCLUDED 61 #include <rl_raylib/rl_Traits.h> 112 double reflectivity(
double polarization_factor = 0.0 )
const;
157 std::ostream&
print_on( std::ostream& os,
char const pre[] =
"",
158 char const pst[] =
"" )
const;
167 void cprint_on( std::FILE* of,
char const pre[] =
"",
168 char const pst[] =
"" )
const;
205 return ( norm( perp_ ) * (1.0 + polarization_factor )
206 + norm( para_ ) * (1.0 - polarization_factor ) ) / 2.0;
210 print_on( std::ostream& os,
char const pre[],
char const pst[] )
const 212 if ( std::strlen(pre) ) { os << pre; }
213 os <<
"[" << para_ <<
"][" << perp_ <<
"]";
214 if ( std::strlen(pst) ) { os << pst; }
219 cprint_on( std::FILE* of,
char const pre[],
char const pst[] )
const 221 if ( std::strlen(pre) ) { std::fprintf(of,
"%s", pre); }
222 std::fprintf(of,
"[%.15e, %.15e] [%.15e, %.15e]\n",
224 if ( std::strlen(pst) ) { std::fprintf(of,
"%s", pst); }
std::complex< double > complex
Typedef for the complex type.
void init()
initialize perpendicular (s) and parallel (p) reflection coefficients to zero.
A Plain Ol' Data class representing complex reflection coefficients.
double reflectivity(double polarization_factor=0.0) const
evaluate the reflectivity.
std::ostream & print_on(std::ostream &os, char const pre[]="", char const pst[]="") const
Print reflectivity information to output stream.
rl_Traits::complex para() const
rl_Traits::complex perp() const
void cprint_on(std::FILE *of, char const pre[]="", char const pst[]="") const
Print reflectivity information to output FILE* stream.