![]() |
siderust-cpp 0.8.0
Header-only C++ wrapper for siderust
|
Unified, lightweight handle representing any celestial subject. More...
#include <siderust/subject.hpp>
Public Member Functions | |
| SubjectKind | kind () const |
| const siderust_subject_t & | c_inner () const |
Static Public Member Functions | |
| static Subject | body (Body b) |
| Create a subject for a solar-system body. | |
| static Subject | star (const siderust::Star &star) |
Create a subject borrowing a Star handle. | |
| static Subject | icrs (const spherical::Direction< frames::ICRS > &dir) |
| Create a subject for an inline ICRS direction. | |
| template<typename C > | |
| static Subject | target (const DirectionTarget< C > &tgt) |
Create a subject borrowing an opaque SiderustTarget handle. | |
Unified, lightweight handle representing any celestial subject.
Subject is a small copyable value type that stores a discriminant and either an inline body enum, an inline ICRS direction, or a borrowed pointer to a Star or DirectionTarget handle.
Use the static factory methods to construct instances.
Definition at line 82 of file subject.hpp.
Create a subject for a solar-system body.
Definition at line 87 of file subject.hpp.
References kind().
|
inline |
Definition at line 134 of file subject.hpp.
Referenced by siderust::altitude_at(), and siderust::azimuth_at().
|
inlinestatic |
Create a subject for an inline ICRS direction.
The direction is stored by value inside the Subject; no external handle is borrowed.
Definition at line 111 of file subject.hpp.
References kind(), and siderust::spherical::Direction< F >::to_c().
|
inline |
|
inlinestatic |
|
inlinestatic |
Create a subject borrowing an opaque SiderustTarget handle.
Works with any DirectionTarget<C> via its c_handle() accessor.
Subject. Definition at line 124 of file subject.hpp.
References siderust::DirectionTarget< C >::c_handle(), and kind().