[][src]Trait nyx_space::io::gravity::GravityPotentialStor

pub trait GravityPotentialStor where
    Self: Sized
{ fn max_degree(&self) -> u16;
fn max_order(&self) -> u16;
fn cs_nm(&self, degree: u16, order: u16) -> (f64, f64); }

All gravity potential storage backends must implement this trait in order to be used in the provided dynamics. Currently, only a HashMap based storage is provided. However, the use of this trait enables any application from storing the gravity potential in another way, such as a remote database.

Required methods

fn max_degree(&self) -> u16

Returns the maximum degree of this gravity potential storage (Jn=J2,J3...)

fn max_order(&self) -> u16

Returns the maximum order of this gravity potential storage (Jnm=Jn2,Jn3...)

fn cs_nm(&self, degree: u16, order: u16) -> (f64, f64)

Returns the C_nm and S_nm for the provided order and degree.

WARNING: It's up to the caller to ensure that no degree or order greater than stored in this GravityPotentialStor is requested. Depending on the implementor, this call might panic!.

Loading content...

Implementors

impl GravityPotentialStor for MemoryBackend[src]

Loading content...