Struct ArchimedesProxy
#[repr(C)]pub struct ArchimedesProxy {
pub spheres: [BuoyancySphere; 4],
pub sphere_count: usize,
pub total_mass_kg: f32,
}Expand description
Multi-sphere proxy hull for volumetric character buoyancy.
Fields§
§spheres: [BuoyancySphere; 4]§sphere_count: usize§total_mass_kg: f32Total entity mass in kg.
Implementations§
§impl ArchimedesProxy
impl ArchimedesProxy
pub fn humanoid_default() -> ArchimedesProxy
pub fn humanoid_default() -> ArchimedesProxy
Standard humanoid buoyancy hull (75 kg mass, 4 proxy spheres from feet to head).
pub fn compute_buoyancy(
&self,
base_pos: [f32; 3],
spectrum: &SimdGerstnerSpectrum,
time_sec: f32,
) -> BuoyancyResult
pub fn compute_buoyancy( &self, base_pos: [f32; 3], spectrum: &SimdGerstnerSpectrum, time_sec: f32, ) -> BuoyancyResult
Evaluates buoyant force, submerged ratio, and fluid drag on the entity.
Trait Implementations§
§impl Clone for ArchimedesProxy
impl Clone for ArchimedesProxy
§fn clone(&self) -> ArchimedesProxy
fn clone(&self) -> ArchimedesProxy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ArchimedesProxy
§impl Debug for ArchimedesProxy
impl Debug for ArchimedesProxy
§impl PartialEq for ArchimedesProxy
impl PartialEq for ArchimedesProxy
impl StructuralPartialEq for ArchimedesProxy
Auto Trait Implementations§
impl Freeze for ArchimedesProxy
impl RefUnwindSafe for ArchimedesProxy
impl Send for ArchimedesProxy
impl Sync for ArchimedesProxy
impl Unpin for ArchimedesProxy
impl UnsafeUnpin for ArchimedesProxy
impl UnwindSafe for ArchimedesProxy
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