rl_raylib
1.1.10
|
Encapsulates the polarization state of a ray. More...
#include <rl_Polarization.h>
Public Types | |
typedef rl_Traits::complex | complex |
complex type | |
Public Member Functions | |
~rl_Polarization () | |
Destructor (NON-VIRTUAL) | |
rl_Polarization () | |
Default constructor; constructs rl_Polarization with INVALID fields. | |
rl_Polarization (rl_Polarization const &rhs) | |
Copy constructor; constructs rl_Polarization with INVALID fields. More... | |
rl_Polarization (rl_PolCSPOD const &cs, dvm3_Vector const &dir) | |
Conversion constructor. More... | |
void | init (rl_PolCSPOD const &cs, dvm3_Vector const &dir) |
Initialize the polarization state. More... | |
void | get_PolCSPOD (rl_PolCSPOD &cs, dvm3_Vector const &dir) const |
Evaluate rl_PolCSPOD corresponding to this polarization state. More... | |
double | intensity () const |
Evaluate intensity. More... | |
void | rotate (rl_Polarization &rotated, dvm3_RotMat const &rot_mtx) |
Rotate polarization state to frame described by rot_mtx. More... | |
void | derotate (rl_Polarization &derotated, dvm3_RotMat const &rot_mtx) |
Rotate polarization state back from frame described by rot_mtx. More... | |
void | attenuate (double factor) |
Attenuate reflectivity by a factor. More... | |
void | reflect (dvm3_Vector const &normal, dvm3_Vector const &dir_in, dvm3_Vector const &dir_out, rl_ReflectionCoefPOD const &rflcoef) |
Evaluate the reflected polarization vectors. More... | |
dvm3_Vector const & | C_r () const |
return the real `‘cosine’ polarization vector | |
dvm3_Vector const & | C_i () const |
return the imaginary `‘cosine’ polarization vector | |
dvm3_Vector const & | S_r () const |
return the real `‘sine’ polarization vector | |
dvm3_Vector const & | S_i () const |
return the imaginary `‘sine’ polarization vector | |
std::ostream & | print_on (std::ostream &os) const |
Write the polarization vectors to stream os. More... | |
void | cprint_on (std::FILE *of) const |
Write the polarization amplitude to FILE* of. More... | |
Encapsulates the polarization state of a ray.
The class is a simple class to handle the ray polarization state resolved onto a specific coordinate system. The polarization axes are constructed from a direction vector and the coordinate axes. A coordinate triple is constructed in which one axis is the direction vector.
Definition at line 186 of file rl_Polarization.h.
|
inline |
Copy constructor; constructs rl_Polarization with INVALID fields.
rhs | - rl_Polarization object to be copied. |
Definition at line 359 of file rl_Polarization.h.
|
inline |
Conversion constructor.
Convert OSAC-style polarization amplitudes into polarization vector set.
cs | OSAC-style polarization amplitude |
dir | ray direction vector |
Definition at line 354 of file rl_Polarization.h.
void rl_Polarization::attenuate | ( | double | factor | ) |
Attenuate reflectivity by a factor.
factor | attenuation factor. (NOTE: this multiplies the polarization components by sqrt(factor).) |
Definition at line 243 of file rl_Polarization.cc.
void rl_Polarization::cprint_on | ( | std::FILE * | of | ) | const |
Write the polarization amplitude to FILE* of.
The state is written as "[x y z][x y z][x y z][x y z]".
of | output FILE*. |
Definition at line 350 of file rl_Polarization.cc.
|
inline |
Rotate polarization state back from frame described by rot_mtx.
derotated | output derotated polarization state. The state is now back in the original frame. |
rot_mtx | rotation matrix. |
Definition at line 378 of file rl_Polarization.h.
void rl_Polarization::get_PolCSPOD | ( | rl_PolCSPOD & | cs, |
dvm3_Vector const & | dir | ||
) | const |
Evaluate rl_PolCSPOD corresponding to this polarization state.
cs | OSAC-style polarization amplitude |
dir | ray direction vector |
Definition at line 217 of file rl_Polarization.cc.
void rl_Polarization::init | ( | rl_PolCSPOD const & | cs, |
dvm3_Vector const & | dir | ||
) |
Initialize the polarization state.
cs | OSAC-style polarization amplitude |
dir | ray direction vector |
Definition at line 171 of file rl_Polarization.cc.
double rl_Polarization::intensity | ( | ) | const |
Evaluate intensity.
Definition at line 208 of file rl_Polarization.cc.
std::ostream & rl_Polarization::print_on | ( | std::ostream & | os | ) | const |
Write the polarization vectors to stream os.
The state is written as "[x y z][x y z][x y z][x y z]".
os | output stream. |
Definition at line 339 of file rl_Polarization.cc.
void rl_Polarization::reflect | ( | dvm3_Vector const & | normal, |
dvm3_Vector const & | dir_in, | ||
dvm3_Vector const & | dir_out, | ||
rl_ReflectionCoefPOD const & | rflcoef | ||
) |
Evaluate the reflected polarization vectors.
Given a surface normal, incident and reflected ray direction vectors, and the parallel and perpendicular reflection coefficients, evaluate the reflected polarization vectors.
normal | surface normal vector. |
dir_in | direction vector for incoming ray. |
dir_out | direction vector for reflected ray. |
rflcoef | complex reflection coefficients for surface. |
Definition at line 262 of file rl_Polarization.cc.
|
inline |
Rotate polarization state to frame described by rot_mtx.
rotated | output rotated polarization state. The state is now in the frame obtained by applying rot_mtx. |
rot_mtx | rotation matrix. |
Definition at line 368 of file rl_Polarization.h.