#include <rl_BasicRay.h>
Public Member Functions | |
virtual | ~rl_BasicRay () |
A virtual do-nothing destructor. | |
rl_BasicRay () | |
rl_BasicRay (dvm3_Vector const &pos, dvm3_Vector const &dir, double energy, long int id) | |
rl_BasicRay (rl_BasicRay const &other) | |
void | set_id (long int id) |
long int | id () const |
double & | energy () |
double | energy () const |
double & | position (int i) |
double | position (int i) const |
dvm3_Vector & | position () |
dvm3_Vector const & | position () const |
double & | direction (int i) |
double | direction (int i) const |
dvm3_Vector & | direction () |
dvm3_Vector const & | direction () const |
double | reflect_direction_vector (dvm3_Vector const &normal) |
void | project (double s) |
virtual void | translate_rotate (dvm3_Vector const &trans, dvm3_RotMat const &rotmat) |
virtual void | derotate_detranslate (dvm3_Vector const &trans, dvm3_RotMat const &rotmat) |
std::ostream & | print_on (std::ostream &os, char const prefix[]="", char const postfix[]="") const |
Protected Member Functions | |
void | init (dvm3_Vector const &pos, dvm3_Vector const &dir, double energy, long int id) |
Protected Attributes | |
dvm3_Vector | pos_ |
ray position | |
dvm3_Vector | dir_ |
ray direction vector (direction cosines) | |
double | energy_ |
ray energy | |
long int | id_ |
ray id number | |
Friends | |
std::ostream & | operator<< (std::ostream &os, rl_BasicRay const &) |
Definition at line 47 of file rl_BasicRay.h.
rl_BasicRay::~rl_BasicRay | ( | ) | [virtual] |
rl_BasicRay::rl_BasicRay | ( | ) | [inline] |
Default constructor; constructs a ray in an INVALID state. Use init to initialize the fields.
Definition at line 274 of file rl_BasicRay.h.
rl_BasicRay::rl_BasicRay | ( | dvm3_Vector const & | pos, | |
dvm3_Vector const & | dir, | |||
double | energy, | |||
long int | id | |||
) | [inline] |
Constructor. Construct an rl_BasicRay from ray initial position and direction vector, energy, and id number.
pos | ray initial position. | |
dir | ray initial direction unit vector. | |
energy | ray energy, in keV. | |
id | ray id. |
Definition at line 279 of file rl_BasicRay.h.
rl_BasicRay::rl_BasicRay | ( | rl_BasicRay const & | other | ) | [inline] |
void rl_BasicRay::init | ( | dvm3_Vector const & | pos, | |
dvm3_Vector const & | dir, | |||
double | energy, | |||
long int | id | |||
) | [inline, protected] |
Initialize rl_BasicRay with ray initial position and direction vector, energy, and id number
pos | ray position vector | |
dir | ray direction vector | |
energy | ray energy | |
id | ray id number |
Definition at line 292 of file rl_BasicRay.h.
void rl_BasicRay::set_id | ( | long int | id | ) | [inline] |
Reset ray id
id | new id value. |
Definition at line 310 of file rl_BasicRay.h.
References id_.
long int rl_BasicRay::id | ( | ) | const [inline] |
Read-only access to current ray id
Definition at line 306 of file rl_BasicRay.h.
References id_.
double & rl_BasicRay::energy | ( | ) | [inline] |
Read/write access to current ray energy
Definition at line 315 of file rl_BasicRay.h.
References energy_.
double rl_BasicRay::energy | ( | ) | const [inline] |
Read-only access to current ray position
Definition at line 320 of file rl_BasicRay.h.
References energy_.
double & rl_BasicRay::position | ( | int | i | ) | [inline] |
Read/write access to component i of current ray position
i | index. |
Definition at line 325 of file rl_BasicRay.h.
References pos_.
double rl_BasicRay::position | ( | int | i | ) | const [inline] |
Read-only access to component i of current ray position
i | index. |
Definition at line 330 of file rl_BasicRay.h.
References pos_.
dvm3_Vector & rl_BasicRay::position | ( | ) | [inline] |
Read/write access to current ray position
Definition at line 335 of file rl_BasicRay.h.
References pos_.
dvm3_Vector const & rl_BasicRay::position | ( | ) | const [inline] |
Read-only access to current ray position
Definition at line 340 of file rl_BasicRay.h.
References pos_.
double & rl_BasicRay::direction | ( | int | i | ) | [inline] |
Read/write access to component i of current ray direction
i | index. |
Definition at line 345 of file rl_BasicRay.h.
References dir_.
double rl_BasicRay::direction | ( | int | i | ) | const [inline] |
Read-only access to component i of current ray direction
i | index. |
Definition at line 350 of file rl_BasicRay.h.
References dir_.
dvm3_Vector & rl_BasicRay::direction | ( | ) | [inline] |
Read/write access to current ray direction vector
Definition at line 355 of file rl_BasicRay.h.
References dir_.
dvm3_Vector const & rl_BasicRay::direction | ( | ) | const [inline] |
Read-only access to current ray direction vector
Definition at line 360 of file rl_BasicRay.h.
References dir_.
double rl_BasicRay::reflect_direction_vector | ( | dvm3_Vector const & | normal | ) |
Reflect this ray's direction vector about a (surface) normal
normal | - surface normal unit vector to be used in reflecting this rl_BasicRay. |
Definition at line 52 of file rl_BasicRay.cc.
References dir_.
void rl_BasicRay::project | ( | double | s | ) | [inline] |
Project a distance s along this ray
s | distance to project the ray. |
Definition at line 369 of file rl_BasicRay.h.
void rl_BasicRay::translate_rotate | ( | dvm3_Vector const & | trans, | |
dvm3_RotMat const & | rotmat | |||
) | [inline, virtual] |
VIRTUAL: Translate to the BCS origin; rotate from STD to BCS coordinates
trans | translation vector. | |
rotmat | rotation matrix to be applied. rotmat specifies a rotation from std to bcs. |
Definition at line 379 of file rl_BasicRay.h.
References dir_, pos_, rl_RayMath::rotate(), and rl_RayMath::translate_rotate().
void rl_BasicRay::derotate_detranslate | ( | dvm3_Vector const & | trans, | |
dvm3_RotMat const & | rotmat | |||
) | [inline, virtual] |
VIRTUAL: Derotate back to STD coordinates; detranslate back to STD origin
trans | translation vector. | |
rotmat | rotation matrix to be applied. rotmat specifies a rotation from std to bcs; the inverse of rotmat is applied to the ray. |
Definition at line 391 of file rl_BasicRay.h.
References rl_RayMath::derotate(), rl_RayMath::derotate_detranslate(), dir_, and pos_.
std::ostream& rl_BasicRay::print_on | ( | std::ostream & | os, | |
char const | prefix[] = "" , |
|||
char const | postfix[] = "" | |||
) | const |
Print the ray properties to an output stream.
os | output stream. | |
prefix | an optional prefix string. | |
postfix | an optional postfix string. |
std::ostream& operator<< | ( | std::ostream & | os, | |
rl_BasicRay const & | ||||
) | [friend] |
Print the ray properties to an output stream.
os | output stream. |
dvm3_Vector rl_BasicRay::pos_ [protected] |
ray position
Definition at line 52 of file rl_BasicRay.h.
Referenced by derotate_detranslate(), init(), position(), project(), and translate_rotate().
dvm3_Vector rl_BasicRay::dir_ [protected] |
ray direction vector (direction cosines)
Definition at line 54 of file rl_BasicRay.h.
Referenced by derotate_detranslate(), direction(), init(), project(), reflect_direction_vector(), and translate_rotate().
double rl_BasicRay::energy_ [protected] |
long int rl_BasicRay::id_ [protected] |