28 #include <rl_raylib/rl_Ray.h> 54 dvm3_Vector old_dir( dir_ );
55 reflect_direction_vector( normal );
56 pol_.reflect( normal, old_dir, dir_, rflcoef );
64 dvm3_RotMat
const& rotmat )
66 rl_BasicRay::translate_rotate( trans, rotmat );
68 tmp.
rotate( pol_, rotmat );
76 dvm3_RotMat
const& rotmat )
78 rl_BasicRay::derotate_detranslate( trans, rotmat );
91 if ( ::strlen(pre) ) { os << pre; }
92 os.setf(ios::showpoint);
94 os << setw(8) << id_ <<
" : ";
95 os <<
" " << setw(18) << energy_ <<
" : (";
97 os <<
") (" << setw(18);
100 if ( ::strlen(pst) ) { os << pst; }
103 if ( ::strlen(pre) ) { os << pre; }
104 os << setw(8) << id_ <<
" : ";
106 if ( ::strlen(pst) ) { os << pst; }
void translate_rotate(dvm3_Vector const &trans, dvm3_RotMat const &rotmat)
Translate to BCS origin and rotate from STD to BCS coordinates.
void derotate(rl_Polarization &derotated, dvm3_RotMat const &rot_mtx)
Rotate polarization state back from frame described by rot_mtx.
std::ostream & print_on(std::ostream &os, char const pre[]="", char const pst[]="") const
Write the ray contents with optional pre and post comment strings.
virtual ~rl_Ray()
Destructor.
void reflect(dvm3_Vector const &normal, rl_ReflectionCoefPOD const &rflcoef)
Reflect this ray's direction vector and polarization state.
void rotate(rl_Polarization &rotated, dvm3_RotMat const &rot_mtx)
Rotate polarization state to frame described by rot_mtx.
A Plain Ol' Data class representing complex reflection coefficients.
Encapsulates the polarization state of a ray.
void derotate_detranslate(dvm3_Vector const &trans, dvm3_RotMat const &rotmat)
Derotate back to std coordinates; detranslate back to std origin.