Skip to main content

VectorAstroExt

Trait VectorAstroExt 

Source
pub trait VectorAstroExt<F: ReferenceFrame, U: Unit> {
    // Required methods
    fn to_frame<F2: ReferenceFrame>(&self, jd: &JulianDate) -> Vector<F2, U>
       where (): FrameRotationProvider<F, F2>;
    fn to_frame_with<F2: ReferenceFrame, Ctx>(
        &self,
        jd: &JulianDate,
        ctx: &Ctx,
    ) -> Vector<F2, U>
       where Ctx: TransformContext,
             (): FrameRotationProvider<F, F2>;
}
Expand description

Extension trait for Vector<F, U> providing frame transformations.

Vectors (displacements, velocities) are free vectors that are translation-invariant. Only frame rotations apply.

Required Methods§

Source

fn to_frame<F2: ReferenceFrame>(&self, jd: &JulianDate) -> Vector<F2, U>
where (): FrameRotationProvider<F, F2>,

Rotates this vector to a new reference frame (IAU defaults).

Source

fn to_frame_with<F2: ReferenceFrame, Ctx>( &self, jd: &JulianDate, ctx: &Ctx, ) -> Vector<F2, U>

Rotates this vector to a new reference frame with custom context.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<F: ReferenceFrame, U: Unit> VectorAstroExt<F, U> for Vector<F, U>