#[non_exhaustive]pub struct Overrides {
pub mass_kg: Option<f64>,
pub cg_m: Option<f64>,
pub cd: Option<f64>,
pub subcomponents_mass: Option<bool>,
pub subcomponents_cg: Option<bool>,
pub subcomponents_cd: Option<bool>,
}Expand description
What a component says its own mass, center of gravity and drag coefficient are, instead of what its geometry and material would give.
The three values and the three flags are independent, which is Loft lesson L63: Loft read
neither overridecd nor overridesubcomponentscg, so a part set to a drag coefficient of zero
was still charged full drag. A stated 0.0 here is an override to zero, not a
missing one.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.mass_kg: Option<f64>The mass the component is declared to have, in kilograms.
cg_m: Option<f64>Where its center of gravity is declared to be, in meters from its fore end.
cd: Option<f64>The drag coefficient it is declared to have.
subcomponents_mass: Option<bool>Whether the mass override covers the components inside this one too.
subcomponents_cg: Option<bool>Whether the center-of-gravity override covers them.
subcomponents_cd: Option<bool>Whether the drag override covers them.
Trait Implementations§
impl Copy for Overrides
Source§impl<'de> Deserialize<'de> for Overrides
impl<'de> Deserialize<'de> for Overrides
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
impl StructuralPartialEq for Overrides
Auto Trait Implementations§
impl Freeze for Overrides
impl RefUnwindSafe for Overrides
impl Send for Overrides
impl Sync for Overrides
impl Unpin for Overrides
impl UnsafeUnpin for Overrides
impl UnwindSafe for Overrides
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