rl_raylib  1.1.10
rl_Ray Class Reference

An rl_BasicRay with added polarization information. More...

#include <rl_Ray.h>

Inherits rl_BasicRay.

Public Member Functions

virtual ~rl_Ray ()
 Destructor.
 
 rl_Ray ()
 Default constructor. More...
 
 rl_Ray (rl_BasicRay const &ray, rl_PolCSPOD const &cspol)
 Constructor. More...
 
 rl_Ray (dvm3_Vector const &pos, dvm3_Vector const &dir, double energy, long int id, rl_PolCSPOD const &cspol)
 Constructor. More...
 
void init_ray (dvm3_Vector const &pos, dvm3_Vector const &dir, double energy, long int id, rl_PolCSPOD const &cspol)
 Initialize a ray. More...
 
rl_Polarization const & polarization () const
 Return the polarization state. More...
 
void set_polarization (rl_PolCSPOD const &cspol)
 Set the polarization state. More...
 
void get_PolCSPOD (rl_PolCSPOD &cs) const
 Evaluate rl_PolCSPOD corresponding to this ray's polarization state. More...
 
double intensity () const
 Returns this ray's normalized intensity (i.e., "weight") More...
 
void attenuate (double by_how_much)
 Attenuate this ray by by_how_much. More...
 
void reflect (dvm3_Vector const &normal, rl_ReflectionCoefPOD const &rflcoef)
 Reflect this ray's direction vector and polarization state. More...
 
void translate_rotate (dvm3_Vector const &trans, dvm3_RotMat const &rotmat)
 Translate to BCS origin and rotate from STD to BCS coordinates. More...
 
void derotate_detranslate (dvm3_Vector const &trans, dvm3_RotMat const &rotmat)
 Derotate back to std coordinates; detranslate back to std origin. More...
 
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. More...
 

Detailed Description

An rl_BasicRay with added polarization information.

Definition at line 45 of file rl_Ray.h.

Constructor & Destructor Documentation

◆ rl_Ray() [1/3]

rl_Ray::rl_Ray ( )
inline

Default constructor.

Constructs a ray in an INVALID state; use init_ray to initialize the fields.

Definition at line 193 of file rl_Ray.h.

◆ rl_Ray() [2/3]

rl_Ray::rl_Ray ( rl_BasicRay const &  ray,
rl_PolCSPOD const &  cspol 
)
inline

Constructor.

Construct a ray given an rl_BasicRay and a polarization state.

Definition at line 198 of file rl_Ray.h.

◆ rl_Ray() [3/3]

rl_Ray::rl_Ray ( dvm3_Vector const &  pos,
dvm3_Vector const &  dir,
double  energy,
long int  id,
rl_PolCSPOD const &  cspol 
)
inline

Constructor.

Construct a ray.

Parameters
posray position vector.
dirray direction unit vector.
energyray energy (keV).
ida numeric ray identifier.
cspolan OSAC-style complex polarization amplitude vector.

Definition at line 203 of file rl_Ray.h.

Member Function Documentation

◆ attenuate()

void rl_Ray::attenuate ( double  by_how_much)
inline

Attenuate this ray by by_how_much.

Parameters
by_how_muchhow much to attenuate this ray.

Definition at line 247 of file rl_Ray.h.

◆ derotate_detranslate()

void rl_Ray::derotate_detranslate ( dvm3_Vector const &  trans,
dvm3_RotMat const &  rotmat 
)

Derotate back to std coordinates; detranslate back to std origin.

Parameters
transtranslation vector.
rotmatrotation matrix to be applied. rotmat specifies a rotation from std to bcs; the inverse of rotmat is applied to the ray.

Definition at line 75 of file rl_Ray.cc.

◆ get_PolCSPOD()

void rl_Ray::get_PolCSPOD ( rl_PolCSPOD cs) const
inline

Evaluate rl_PolCSPOD corresponding to this ray's polarization state.

Parameters
csreturn an OSAC-style complex polarization amplitude vector.

Definition at line 229 of file rl_Ray.h.

◆ init_ray()

void rl_Ray::init_ray ( dvm3_Vector const &  pos,
dvm3_Vector const &  dir,
double  energy,
long int  id,
rl_PolCSPOD const &  cspol 
)
inline

Initialize a ray.

Parameters
posray position vector.
dirray direction unit vector.
energyray energy (keV).
ida numeric ray identifier.
cspolan OSAC-style complex polarization amplitude vector.

Definition at line 211 of file rl_Ray.h.

◆ intensity()

double rl_Ray::intensity ( ) const
inline

Returns this ray's normalized intensity (i.e., "weight")

Returns
this ray's normalized intensity (i.e., "weight")

Definition at line 234 of file rl_Ray.h.

◆ polarization()

rl_Polarization const & rl_Ray::polarization ( ) const
inline

Return the polarization state.

Returns
polarization state

Definition at line 224 of file rl_Ray.h.

◆ print_on()

std::ostream & rl_Ray::print_on ( std::ostream &  os,
char const  pre[] = "",
char const  pst[] = "" 
) const

Write the ray contents with optional pre and post comment strings.

Parameters
osoutput stream.
preoptional prefix c-string.
pstoptional postfix c-string.

Definition at line 86 of file rl_Ray.cc.

◆ reflect()

void rl_Ray::reflect ( dvm3_Vector const &  normal,
rl_ReflectionCoefPOD const &  rflcoef 
)

Reflect this ray's direction vector and polarization state.

Parameters
normalsurface normal unit vector.
rflcoefcomplex reflectances for the surface.

Definition at line 51 of file rl_Ray.cc.

◆ set_polarization()

void rl_Ray::set_polarization ( rl_PolCSPOD const &  cspol)
inline

Set the polarization state.

Parameters
cspolan OSAC-style complex polarization amplitude vector.

Definition at line 242 of file rl_Ray.h.

◆ translate_rotate()

void rl_Ray::translate_rotate ( dvm3_Vector const &  trans,
dvm3_RotMat const &  rotmat 
)

Translate to BCS origin and rotate from STD to BCS coordinates.

Parameters
transtranslation vector
rotmatrotation matrix to be applied. rotmat specifies a rotation from std to bcs.

Definition at line 63 of file rl_Ray.cc.


The documentation for this class was generated from the following files: