Commit d149c935a79af494c4725f5648167129dd2d42d4
1 parent
1ec55e88
Add GSkyDir::GSkyDir(GVector) constructor
Showing
4 changed files
with
24 additions
and
0 deletions
NEWS
| ... | ... | @@ -35,6 +35,7 @@ The following methods have been added: |
| 35 | 35 | - GSkyDir::sun() - Set sky position of Sun |
| 36 | 36 | - GSkyDir::moon() - Set sky position of Moon |
| 37 | 37 | - GSkyDir::rotate() - Rotate sky direction (radians variant) |
| 38 | +- GSkyDir::GSkyDir(GVector&) - Sky direction vector constructor | |
| 38 | 39 | - GSkyMap::extract() - Extract section of sky map |
| 39 | 40 | - GModelSpatial::flux() - Extract flux from sky region |
| 40 | 41 | - GCTAObservation::remove_response_cache(string&) - Remove response cache for model | ... | ... |
include/GSkyDir.hpp
pyext/GSkyDir.i
src/sky/GSkyDir.cpp
| ... | ... | @@ -67,6 +67,27 @@ GSkyDir::GSkyDir(void) |
| 67 | 67 | |
| 68 | 68 | |
| 69 | 69 | /***********************************************************************//** |
| 70 | + * @brief Vector constructor | |
| 71 | + * | |
| 72 | + * @param[in] vector Sky vector. | |
| 73 | + * | |
| 74 | + * Constructs a sky direction from a 3-element celestial vector. See the | |
| 75 | + * celvector() method for more information. | |
| 76 | + ***************************************************************************/ | |
| 77 | +GSkyDir::GSkyDir(const GVector& vector) | |
| 78 | +{ | |
| 79 | + // Initialise members | |
| 80 | + init_members(); | |
| 81 | + | |
| 82 | + // Set sky direction from vector | |
| 83 | + celvector(vector); | |
| 84 | + | |
| 85 | + // Return | |
| 86 | + return; | |
| 87 | +} | |
| 88 | + | |
| 89 | + | |
| 90 | +/***********************************************************************//** | |
| 70 | 91 | * @brief Copy constructor |
| 71 | 92 | * |
| 72 | 93 | * @param[in] dir Sky direction. | ... | ... |