siderust-cpp
Header-only C++ wrapper for siderust
Loading...
Searching...
No Matches
centers.hpp File Reference

Zero-sized reference-center tag types mirroring Rust's centers module. More...

#include "ffi_core.hpp"
Include dependency graph for centers.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  siderust::centers::is_center< C, typename >
 
struct  siderust::centers::is_center< C, std::void_t< decltype(CenterTraits< C >::ffi_id)> >
 
struct  siderust::centers::Barycentric
 Solar-system barycenter (zero-cost, Params = void). More...
 
struct  siderust::centers::Heliocentric
 Heliocenter (zero-cost, Params = void). More...
 
struct  siderust::centers::Geocentric
 Geocenter (zero-cost, Params = void). More...
 
struct  siderust::centers::Topocentric
 Observer on Earth's surface (Params = Geodetic). More...
 
struct  siderust::centers::Bodycentric
 Center of a body (Params = BodycentricParams). More...
 
struct  siderust::centers::NoParams
 Marker for simple (no-parameter) centers. More...
 
struct  siderust::centers::CenterTraits< Barycentric >
 
struct  siderust::centers::CenterTraits< Heliocentric >
 
struct  siderust::centers::CenterTraits< Geocentric >
 
struct  siderust::centers::CenterTraits< Topocentric >
 
struct  siderust::centers::CenterTraits< Bodycentric >
 
struct  siderust::centers::has_center_transform< From, To >
 Marks center pairs for which a CenterShiftProvider exists. More...
 
struct  siderust::centers::has_center_transform< C, C >
 

Namespaces

namespace  siderust
 
namespace  siderust::centers
 

Macros

#define SIDERUST_CENTER_TRANSFORM_PAIR(A, B)
 

Functions

 siderust::centers::SIDERUST_CENTER_TRANSFORM_PAIR (Barycentric, Heliocentric)
 
 siderust::centers::SIDERUST_CENTER_TRANSFORM_PAIR (Barycentric, Geocentric)
 
 siderust::centers::SIDERUST_CENTER_TRANSFORM_PAIR (Heliocentric, Geocentric)
 

Variables

template<typename C >
constexpr bool siderust::centers::is_center_v = is_center<C>::value
 
template<typename From , typename To >
constexpr bool siderust::centers::has_center_transform_v = has_center_transform<From, To>::value
 

Detailed Description

Zero-sized reference-center tag types mirroring Rust's centers module.

Each center is a unique empty struct used as a compile-time tag for position templates. Every tag carries a static ffi_id mapping to the C enum, and optionally a Params type for parameterized centers (Topocentric, Bodycentric).

Definition in file centers.hpp.

Macro Definition Documentation

◆ SIDERUST_CENTER_TRANSFORM_PAIR

#define SIDERUST_CENTER_TRANSFORM_PAIR (   A,
 
)
Value:
template <> \
struct has_center_transform<A, B> : std::true_type {}; \
template <> \
struct has_center_transform<B, A> : std::true_type {}

Definition at line 111 of file centers.hpp.