1 #ifndef rl_Polarization_h_INCLUDED 2 #define rl_Polarization_h_INCLUDED 31 #include <dvm3/dvm3.h> 32 #include <rl_raylib/rl_Traits.h> 120 void init(
double b_over_a = 1.0,
145 std::ostream&
print_on( std::ostream& os )
const;
164 operator<<( std::ostream& os,
rl_PolCSPOD const& polcs )
295 dvm3_Vector
const& normal,
296 dvm3_Vector
const& dir_in,
297 dvm3_Vector
const& dir_out,
302 dvm3_Vector
const&
C_r()
const;
304 dvm3_Vector
const&
C_i()
const;
306 dvm3_Vector
const&
S_r()
const;
308 dvm3_Vector
const&
S_i()
const;
316 std::ostream&
print_on( std::ostream& os )
const;
370 rot_mtx.mvmult( rotated.C_r_, C_r_ );
371 rot_mtx.mvmult( rotated.C_i_, C_i_ );
372 rot_mtx.mvmult( rotated.S_r_, S_r_ );
373 rot_mtx.mvmult( rotated.S_i_, S_i_ );
380 rot_mtx.mtvmult( derotated.C_r_, C_r_ );
381 rot_mtx.mtvmult( derotated.C_i_, C_i_ );
382 rot_mtx.mtvmult( derotated.S_r_, S_r_ );
383 rot_mtx.mtvmult( derotated.S_i_, S_i_ );
dvm3_Vector const & S_r() const
return the real `‘sine’ polarization vector
std::complex< double > complex
Typedef for the complex type.
void cprint_on(std::FILE *of) const
Write the polarization amplitude to FILE* of.
rl_Traits::complex c2_[2]
polarization amplitude (cosine component)
void derotate(rl_Polarization &derotated, dvm3_RotMat const &rot_mtx)
Rotate polarization state back from frame described by rot_mtx.
void init(double b_over_a=1.0, double psi=0.0)
Initialization method.
void cprint_on(FILE *of) const
Write the polarization amplitude to FILE* of.
double intensity() const
Evaluate the intensity.
void rotate(rl_Polarization &rotated, dvm3_RotMat const &rot_mtx)
Rotate polarization state to frame described by rot_mtx.
std::ostream & print_on(std::ostream &os) const
Write the polarization vectors to stream os.
std::ostream & print_on(std::ostream &os) const
Write the polarization amplitude to stream os.
rl_Traits::complex s2_[2]
polarization amplitude (sine component)
A Plain Ol' Data class representing complex reflection coefficients.
A Plain Ol' Data struct (POD) encapsulating the OSAC-style complex polarization amplitudes.
void attenuate(double factor)
Attenuate intensity by a factor.
dvm3_Vector const & C_i() const
return the imaginary `‘cosine’ polarization vector
void attenuate(double factor)
Attenuate reflectivity by a factor.
void init(rl_PolCSPOD const &cs, dvm3_Vector const &dir)
Initialize the polarization state.
void get_PolCSPOD(rl_PolCSPOD &cs, dvm3_Vector const &dir) const
Evaluate rl_PolCSPOD corresponding to this polarization state.
Encapsulates the polarization state of a ray.
~rl_Polarization()
Destructor (NON-VIRTUAL)
dvm3_Vector const & S_i() const
return the imaginary `‘sine’ polarization vector
dvm3_Vector const & C_r() const
return the real `‘cosine’ polarization vector
double intensity() const
Evaluate intensity.
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.
rl_Polarization()
Default constructor; constructs rl_Polarization with INVALID fields.
rl_Traits::complex complex
complex type