|
RobinTrace
|
#include <cmath>#include <iostream>#include <Eigen/Dense>Go to the source code of this file.
Typedefs | |
| typedef Eigen::Vector3d | Vec3 |
Functions | |
| Vec3 | Vec3_lm (double l, double m, bool nsign) |
| Constructor of a unit Vec3 from direction cosines (l, m) and the sign of n. More... | |
| std::ostream & | operator<< (std::ostream &out, const Vec3 &v) |
| Vec3 printer. | |
| typedef Eigen::Vector3d Vec3 |
A 3D vector.
| Vec3 Vec3_lm | ( | double | l, |
| double | m, | ||
| bool | nsign | ||
| ) |
Constructor of a unit Vec3 from direction cosines (l, m) and the sign of n.
| l | Direction cosine in the x direction. |
| m | Direction cosine in the y direction. |
| nsign | Sign of the direction cosine in the z direction. True for positive, False for negative. |
The component n is built automatically from (l, m) and the specified sign so as to obtain a unit vector.
When nsign is True,
\[ n = \sqrt{1 - l^2 - m^2} \]
When nsign is False,
\[ n = - \sqrt{1 - l^2 - m^2} \]