A basic ray: encapsulates position and direction vectors, energy, and ray id.
More...
#include <rl_BasicRay.h>
|
|
virtual | ~rl_BasicRay () |
| | A virtual do-nothing destructor.
|
| |
| | rl_BasicRay () |
| | Default constructor; constructs a ray in an INVALID state. More...
|
| |
| | rl_BasicRay (dvm3_Vector const &pos, dvm3_Vector const &dir, double energy, long int id) |
| | Constructor. More...
|
| |
| | rl_BasicRay (rl_BasicRay const &other) |
| | Copy constructor. More...
|
| |
| void | set_id (long int id) |
| | Reset ray id. More...
|
| |
| long int | id () const |
| | Read-only access to current ray id. More...
|
| |
| double & | energy () |
| | Read/write access to current ray energy. More...
|
| |
| double | energy () const |
| | Read-only access to current ray position. More...
|
| |
| double & | position (int i) |
| | Read/write access to component i of current ray position. More...
|
| |
| double | position (int i) const |
| | Read-only access to component i of current ray position. More...
|
| |
| dvm3_Vector & | position () |
| | Read/write access to current ray position. More...
|
| |
| dvm3_Vector const & | position () const |
| | Read-only access to current ray position. More...
|
| |
| double & | direction (int i) |
| | Read/write access to component i of current ray direction. More...
|
| |
| double | direction (int i) const |
| | Read-only access to component i of current ray direction. More...
|
| |
| dvm3_Vector & | direction () |
| | Read/write access to current ray direction vector. More...
|
| |
| dvm3_Vector const & | direction () const |
| | Read-only access to current ray direction vector. More...
|
| |
| double | reflect_direction_vector (dvm3_Vector const &normal) |
| | Reflect this ray's direction vector about a (surface) normal. More...
|
| |
| void | project (double s) |
| | Project a distance s along this ray. More...
|
| |
| virtual void | translate_rotate (dvm3_Vector const &trans, dvm3_RotMat const &rotmat) |
| | VIRTUAL: Translate to the BCS origin; rotate from STD to BCS coordinates. More...
|
| |
| virtual void | derotate_detranslate (dvm3_Vector const &trans, dvm3_RotMat const &rotmat) |
| | VIRTUAL: Derotate back to STD coordinates; detranslate back to STD origin. More...
|
| |
| std::ostream & | print_on (std::ostream &os, char const prefix[]="", char const postfix[]="") const |
| | Print the ray properties to an output stream. More...
|
| |
|
| void | init (dvm3_Vector const &pos, dvm3_Vector const &dir, double energy, long int id) |
| | Initialize rl_BasicRay with ray initial position and direction vector, energy, and id number. More...
|
| |
|
|
dvm3_Vector | pos_ |
| | ray position
|
| |
|
dvm3_Vector | dir_ |
| | ray direction vector (direction cosines)
|
| |
|
double | energy_ |
| | ray energy
|
| |
|
long int | id_ |
| | ray id number
|
| |
A basic ray: encapsulates position and direction vectors, energy, and ray id.
Definition at line 47 of file rl_BasicRay.h.
◆ rl_BasicRay() [1/3]
| 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() [2/3]
| 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.
- Parameters
-
| 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() [3/3]
◆ derotate_detranslate()
| void rl_BasicRay::derotate_detranslate |
( |
dvm3_Vector const & |
trans, |
|
|
dvm3_RotMat const & |
rotmat |
|
) |
| |
|
inlinevirtual |
VIRTUAL: Derotate back to STD coordinates; detranslate back to STD origin.
- Parameters
-
| 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.
◆ direction() [1/4]
| double & rl_BasicRay::direction |
( |
int |
i | ) |
|
|
inline |
Read/write access to component i of current ray direction.
- Parameters
-
Definition at line 345 of file rl_BasicRay.h.
◆ direction() [2/4]
| double rl_BasicRay::direction |
( |
int |
i | ) |
const |
|
inline |
Read-only access to component i of current ray direction.
- Parameters
-
- Returns
- component i of the position vector.
Definition at line 350 of file rl_BasicRay.h.
◆ direction() [3/4]
| dvm3_Vector & rl_BasicRay::direction |
( |
| ) |
|
|
inline |
Read/write access to current ray direction vector.
- Returns
- reference to current ray direction vector dvm3_Vector
Definition at line 355 of file rl_BasicRay.h.
◆ direction() [4/4]
| dvm3_Vector const & rl_BasicRay::direction |
( |
| ) |
const |
|
inline |
Read-only access to current ray direction vector.
- Returns
- const reference to current ray direction vector dvm3_Vector
Definition at line 360 of file rl_BasicRay.h.
◆ energy() [1/2]
| double & rl_BasicRay::energy |
( |
| ) |
|
|
inline |
Read/write access to current ray energy.
- Returns
- a reference to the ray energy
Definition at line 315 of file rl_BasicRay.h.
◆ energy() [2/2]
| double rl_BasicRay::energy |
( |
| ) |
const |
|
inline |
Read-only access to current ray position.
- Returns
- the ray energy
Definition at line 320 of file rl_BasicRay.h.
◆ id()
| long int rl_BasicRay::id |
( |
| ) |
const |
|
inline |
Read-only access to current ray id.
- Returns
- ray id number
Definition at line 306 of file rl_BasicRay.h.
◆ init()
| void rl_BasicRay::init |
( |
dvm3_Vector const & |
pos, |
|
|
dvm3_Vector const & |
dir, |
|
|
double |
energy, |
|
|
long int |
id |
|
) |
| |
|
inlineprotected |
Initialize rl_BasicRay with ray initial position and direction vector, energy, and id number.
- Parameters
-
| pos | ray position vector |
| dir | ray direction vector |
| energy | ray energy |
| id | ray id number |
Definition at line 292 of file rl_BasicRay.h.
◆ position() [1/4]
| double & rl_BasicRay::position |
( |
int |
i | ) |
|
|
inline |
Read/write access to component i of current ray position.
- Parameters
-
- Returns
- a reference to the i component of the position vector.
Definition at line 325 of file rl_BasicRay.h.
◆ position() [2/4]
| double rl_BasicRay::position |
( |
int |
i | ) |
const |
|
inline |
Read-only access to component i of current ray position.
- Parameters
-
- Returns
- the i component of the position vector.
Definition at line 330 of file rl_BasicRay.h.
◆ position() [3/4]
| dvm3_Vector & rl_BasicRay::position |
( |
| ) |
|
|
inline |
Read/write access to current ray position.
- Returns
- a reference to the position vector dvm3_Vector.
Definition at line 335 of file rl_BasicRay.h.
◆ position() [4/4]
| dvm3_Vector const & rl_BasicRay::position |
( |
| ) |
const |
|
inline |
Read-only access to current ray position.
- Returns
- a const reference to the position vector dvm3_Vector
Definition at line 340 of file rl_BasicRay.h.
◆ print_on()
| ostream & rl_BasicRay::print_on |
( |
std::ostream & |
os, |
|
|
char const |
prefix[] = "", |
|
|
char const |
postfix[] = "" |
|
) |
| const |
Print the ray properties to an output stream.
- Parameters
-
| os | output stream. |
| prefix | an optional prefix string. |
| postfix | an optional postfix string. |
- Returns
- output stream
Definition at line 70 of file rl_BasicRay.cc.
◆ project()
| void rl_BasicRay::project |
( |
double |
s | ) |
|
|
inline |
Project a distance s along this ray.
- Parameters
-
| s | distance to project the ray. |
Definition at line 369 of file rl_BasicRay.h.
◆ reflect_direction_vector()
| double rl_BasicRay::reflect_direction_vector |
( |
dvm3_Vector const & |
normal | ) |
|
Reflect this ray's direction vector about a (surface) normal.
- Parameters
-
| normal | - surface normal unit vector to be used in reflecting this rl_BasicRay. |
- Returns
- sine of the graze angle between the ray and the surface
Definition at line 52 of file rl_BasicRay.cc.
◆ set_id()
| void rl_BasicRay::set_id |
( |
long int |
id | ) |
|
|
inline |
◆ translate_rotate()
| void rl_BasicRay::translate_rotate |
( |
dvm3_Vector const & |
trans, |
|
|
dvm3_RotMat const & |
rotmat |
|
) |
| |
|
inlinevirtual |
VIRTUAL: Translate to the BCS origin; rotate from STD to BCS coordinates.
- Parameters
-
| 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.
◆ operator<<
| std::ostream& operator<< |
( |
std::ostream & |
os, |
|
|
rl_BasicRay const & |
|
|
) |
| |
|
friend |
Print the ray properties to an output stream.
- Parameters
-
- Returns
- output stream
The documentation for this class was generated from the following files: