![]() |
siderust-cpp 0.8.0
Header-only C++ wrapper for siderust
|
A 3D Cartesian displacement (free vector), compile-time frame-tagged. More...
#include <siderust/coordinates/cartesian.hpp>
Public Member Functions | |
| Displacement () | |
| Displacement (U x_, U y_, U z_) | |
| Displacement (double x_, double y_, double z_) | |
| U | x () const |
| U | y () const |
| U | z () const |
| U | magnitude () const |
| Magnitude of the displacement vector. | |
| Displacement | operator+ (const Displacement &other) const |
| Add two displacements. | |
| Displacement | operator- (const Displacement &other) const |
| Subtract two displacements. | |
| Displacement | operator- () const |
| Negate a displacement. | |
| Displacement | operator* (double scalar) const |
| Scale a displacement by a scalar. | |
| template<typename Target > | |
| std::enable_if_t< frames::has_frame_transform_v< F, Target >, Displacement< Target, U > > | to_frame (const Time< TT, JD > &jd) const |
| Transform this displacement to a different reference frame. | |
| template<typename Target > | |
| std::enable_if_t< frames::has_frame_transform_v< F, Target >, Displacement< Target, U > > | to_frame_with (const Time< TT, JD > &jd, const AstroContext &ctx) const |
| Transform this displacement with an explicit astronomical context. | |
Static Public Member Functions | |
| static constexpr siderust_frame_t | frame_id () |
Public Attributes | |
| U | comp_x |
| X component. | |
| U | comp_y |
| Y component. | |
| U | comp_z |
| Z component. | |
A 3D Cartesian displacement (free vector), compile-time frame-tagged.
Mirrors Rust's affn::cartesian::Displacement<F, U>.
Displacements are center-independent free vectors that represent the difference between two positions. Valid operations:
| F | Reference frame tag (e.g. frames::ICRS). |
| U | Length unit (default: qtty::Meter). |
Definition at line 160 of file cartesian.hpp.
|
inline |
Definition at line 167 of file cartesian.hpp.
Definition at line 169 of file cartesian.hpp.
Definition at line 171 of file cartesian.hpp.
|
inlinestaticconstexpr |
Definition at line 188 of file cartesian.hpp.
|
inline |
Magnitude of the displacement vector.
Definition at line 180 of file cartesian.hpp.
|
inline |
Scale a displacement by a scalar.
Definition at line 212 of file cartesian.hpp.
|
inline |
Add two displacements.
Definition at line 193 of file cartesian.hpp.
References siderust::cartesian::Displacement< F, U >::comp_x, siderust::cartesian::Displacement< F, U >::comp_y, and siderust::cartesian::Displacement< F, U >::comp_z.
|
inline |
Negate a displacement.
Definition at line 207 of file cartesian.hpp.
|
inline |
Subtract two displacements.
Definition at line 200 of file cartesian.hpp.
References siderust::cartesian::Displacement< F, U >::comp_x, siderust::cartesian::Displacement< F, U >::comp_y, and siderust::cartesian::Displacement< F, U >::comp_z.
|
inline |
Transform this displacement to a different reference frame.
| Target | Destination frame tag. |
| jd | Julian Date (TT) for time-dependent rotations. |
Definition at line 224 of file cartesian.hpp.
References siderust::check_status().
|
inline |
Transform this displacement with an explicit astronomical context.
Definition at line 243 of file cartesian.hpp.
References siderust::check_status(), and siderust::detail::OwnedFfiContext::get().
Definition at line 173 of file cartesian.hpp.
Referenced by siderust::cartesian::operator<<().
Definition at line 174 of file cartesian.hpp.
Referenced by siderust::cartesian::operator<<().
Definition at line 175 of file cartesian.hpp.
Referenced by siderust::cartesian::operator<<().
X component.
Definition at line 163 of file cartesian.hpp.
Referenced by siderust::cartesian::Displacement< F, U >::operator+(), and siderust::cartesian::Displacement< F, U >::operator-().
Y component.
Definition at line 164 of file cartesian.hpp.
Referenced by siderust::cartesian::Displacement< F, U >::operator+(), and siderust::cartesian::Displacement< F, U >::operator-().
Z component.
Definition at line 165 of file cartesian.hpp.
Referenced by siderust::cartesian::Displacement< F, U >::operator+(), and siderust::cartesian::Displacement< F, U >::operator-().