![]() |
siderust-cpp
Header-only C++ wrapper for siderust
|
RAII handle to a Star (opaque Rust object). More...
#include <siderust/bodies.hpp>
Public Member Functions | |
| Star ()=default | |
| ~Star () | |
| Star (Star &&o) noexcept | |
| Star & | operator= (Star &&o) noexcept |
| Star (const Star &)=delete | |
| Star & | operator= (const Star &)=delete |
| operator bool () const | |
| Whether the handle is valid. | |
| const SiderustStar * | c_handle () const |
| Access the raw C handle (for passing to altitude functions). | |
| std::string | name () const |
| double | distance_ly () const |
| double | mass_solar () const |
| double | radius_solar () const |
| double | luminosity_solar () const |
Static Public Member Functions | |
| static Star | catalog (const std::string &name) |
| Look up a star from the built-in catalog. | |
| static Star | create (const std::string &name, double distance_ly, double mass_solar, double radius_solar, double luminosity_solar, double ra_deg, double dec_deg, double epoch_jd, const std::optional< ProperMotion > &pm=std::nullopt) |
| Create a custom star. | |
RAII handle to a Star (opaque Rust object).
Non-copyable; move-only. Released on destruction.
Definition at line 158 of file bodies.hpp.
|
inline |
Definition at line 165 of file bodies.hpp.
|
inlinenoexcept |
Definition at line 171 of file bodies.hpp.
|
delete |
|
inline |
Access the raw C handle (for passing to altitude functions).
Definition at line 188 of file bodies.hpp.
Referenced by siderust::star_altitude::altitude_at().
|
inlinestatic |
Look up a star from the built-in catalog.
Supported: "VEGA", "SIRIUS", "POLARIS", "CANOPUS", "ARCTURUS", "RIGEL", "BETELGEUSE", "PROCYON", "ALDEBARAN", "ALTAIR".
Definition at line 198 of file bodies.hpp.
References siderust::check_status(), name(), and Star().
|
inlinestatic |
Create a custom star.
| name | Star name. |
| distance_ly | Distance in light-years. |
| mass_solar | Mass in solar masses. |
| radius_solar | Radius in solar radii. |
| luminosity_solar | Luminosity in solar luminosities. |
| ra_deg | Right ascension (J2000) in degrees. |
| dec_deg | Declination (J2000) in degrees. |
| epoch_jd | Epoch of coordinates (Julian Date). |
| pm | Optional proper motion. |
Definition at line 218 of file bodies.hpp.
References siderust::check_status(), distance_ly(), luminosity_solar(), mass_solar(), name(), radius_solar(), and Star().
|
inline |
Definition at line 251 of file bodies.hpp.
Referenced by create().
|
inline |
Definition at line 254 of file bodies.hpp.
Referenced by create().
|
inline |
Definition at line 252 of file bodies.hpp.
Referenced by create().
|
inline |
Definition at line 243 of file bodies.hpp.
References siderust::check_status().
|
inlineexplicit |
Whether the handle is valid.
Definition at line 185 of file bodies.hpp.
Definition at line 172 of file bodies.hpp.
|
inline |
Definition at line 253 of file bodies.hpp.
Referenced by create().