pub struct NBodyConfig {
pub bodies: Vec<BodyConfig>,
}Expand description
N-body configuration.
Fields§
§bodies: Vec<BodyConfig>Bodies in the system.
Implementations§
Source§impl NBodyConfig
impl NBodyConfig
Sourcepub fn inner_solar_system() -> Self
pub fn inner_solar_system() -> Self
Create inner solar system (Sun + Mercury, Venus, Earth, Mars).
Sourcepub fn build(&self, softening: f64) -> NBodyState
pub fn build(&self, softening: f64) -> NBodyState
Build N-body state from this configuration.
Trait Implementations§
Source§impl Clone for NBodyConfig
impl Clone for NBodyConfig
Source§fn clone(&self) -> NBodyConfig
fn clone(&self) -> NBodyConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NBodyConfig
impl Debug for NBodyConfig
Source§impl Default for NBodyConfig
impl Default for NBodyConfig
Source§impl<'de> Deserialize<'de> for NBodyConfig
impl<'de> Deserialize<'de> for NBodyConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for NBodyConfig
impl RefUnwindSafe for NBodyConfig
impl Send for NBodyConfig
impl Sync for NBodyConfig
impl Unpin for NBodyConfig
impl UnsafeUnpin for NBodyConfig
impl UnwindSafe for NBodyConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more