Direction set covering (part of) solid angle.
More...
#include <JOmega2D.hh>
Direction set covering (part of) solid angle.
Definition at line 62 of file JOmega2D.hh.
JGEOMETRY2D::JOmega2D::JOmega2D |
( |
| ) |
|
|
inline |
Default constructor.
Definition at line 69 of file JOmega2D.hh.
Base class for direction set.
JGEOMETRY2D::JOmega2D::JOmega2D |
( |
const double |
grid | ) |
|
|
inline |
Constructor.
- Parameters
-
grid | angular step size [rad] |
Definition at line 79 of file JOmega2D.hh.
Data structure for angle in two dimensions.
Base class for direction set.
void configure(const JAngle2D &dir, const double phiMax, const double grid)
Configure direction set.
JGEOMETRY2D::JOmega2D::JOmega2D |
( |
const JAngle2D & |
dir, |
|
|
const double |
phiMax, |
|
|
const double |
grid |
|
) |
| |
|
inline |
Constructor.
- Parameters
-
dir | principal direction |
phiMax | maximal angle [rad] |
grid | angular step size [rad] |
Definition at line 94 of file JOmega2D.hh.
Base class for direction set.
void configure(const JAngle2D &dir, const double phiMax, const double grid)
Configure direction set.
void JGEOMETRY2D::JOmega2D::configure |
( |
const JAngle2D & |
dir, |
|
|
const double |
phiMax, |
|
|
const double |
grid |
|
) |
| |
|
inline |
Configure direction set.
- Parameters
-
dir | principal direction |
phiMax | maximal angle [rad] |
grid | angular step size [rad] |
Definition at line 110 of file JOmega2D.hh.
118 double phi_min = 0.0;
119 double phi_max = phiMax;
121 if (phi_max < 0.0) phi_max = 0.0;
122 if (phi_max >
PI) phi_max =
PI;
124 if (phi_max > phi_min) {
126 const double rad = phi_max - phi_min;
127 const double bin = rad / floor(rad/grid + 0.5);
129 for (
double phi = phi_min; phi < phi_max + 0.5*bin; phi += bin) {
133 }
else if (
PI - phi < 0.5*bin) {
136 push_back(dir + phi);
137 push_back(dir - phi);
int JGEOMETRY2D::JOmega2D_t::find |
( |
const JAngle2D & |
dir | ) |
const |
|
inlineinherited |
Get index of direction closest to given direction.
- Parameters
-
- Returns
- index (-1 if error)
Definition at line 39 of file JOmega2D.hh.
44 for (const_iterator i = this->begin(); i != this->end(); ++i) {
46 const double x = dir.
getDot(*i);
50 index = std::distance(this->begin(), i);
double getDot(const JAngle2D &angle) const
Get dot product.
The documentation for this class was generated from the following file: