pub struct FluidBubble { /* private fields */ }Expand description
Entrained aerated foam or rising micro-bubble sample captured for optical rendering.
Implementations§
Source§impl FluidBubble
Construction helpers for FluidBubble.
impl FluidBubble
Construction helpers for FluidBubble.
Sourcepub fn spawn(
pos: [f32; 2],
vel: [f32; 2],
radius: f32,
lifetime: f32,
foam_factor: f32,
) -> Self
pub fn spawn( pos: [f32; 2], vel: [f32; 2], radius: f32, lifetime: f32, foam_factor: f32, ) -> Self
Spawns a freshly entrained foam or rising micro-bubble at pos with initial velocity vel.
§Arguments
[f32; 2]- Initial position[x_m, y_m]inside the vessel.[f32; 2]- Initial velocity[vx_mps, vy_mps].f32- Bubble radius in meters.f32- Maximum lifetime in seconds.f32- Initial foam factor in[0.0, 1.0].
§Returns
Self- Newly spawned fluid bubble.
Source§impl FluidBubble
impl FluidBubble
pub fn get_x(&self) -> f32
pub fn get_mut_x(&mut self) -> &mut f32
pub fn set_x(&mut self, val: f32) -> &mut Self
pub fn get_y(&self) -> f32
pub fn get_mut_y(&mut self) -> &mut f32
pub fn set_y(&mut self, val: f32) -> &mut Self
pub fn get_vx(&self) -> f32
pub fn get_mut_vx(&mut self) -> &mut f32
pub fn set_vx(&mut self, val: f32) -> &mut Self
pub fn get_vy(&self) -> f32
pub fn get_mut_vy(&mut self) -> &mut f32
pub fn set_vy(&mut self, val: f32) -> &mut Self
pub fn get_radius(&self) -> f32
pub fn get_mut_radius(&mut self) -> &mut f32
pub fn set_radius(&mut self, val: f32) -> &mut Self
pub fn get_age(&self) -> f32
pub fn get_mut_age(&mut self) -> &mut f32
pub fn set_age(&mut self, val: f32) -> &mut Self
pub fn get_lifetime(&self) -> f32
pub fn get_mut_lifetime(&mut self) -> &mut f32
pub fn set_lifetime(&mut self, val: f32) -> &mut Self
pub fn get_foam_factor(&self) -> f32
pub fn get_mut_foam_factor(&mut self) -> &mut f32
pub fn set_foam_factor(&mut self, val: f32) -> &mut Self
Trait Implementations§
Source§impl Clone for FluidBubble
impl Clone for FluidBubble
impl Copy for FluidBubble
Source§impl Debug for FluidBubble
impl Debug for FluidBubble
Source§impl Default for FluidBubble
impl Default for FluidBubble
Source§impl PartialEq for FluidBubble
impl PartialEq for FluidBubble
impl StructuralPartialEq for FluidBubble
Auto Trait Implementations§
impl Forget for FluidBubble
impl Freeze for FluidBubble
impl Move for FluidBubble
impl RefUnwindSafe for FluidBubble
impl Send for FluidBubble
impl Sync for FluidBubble
impl Unpin for FluidBubble
impl UnsafeUnpin for FluidBubble
impl UnwindSafe for FluidBubble
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