pub struct ParticleField2d { /* private fields */ }Expand description
Renderer-owned instanced particles for high-volume simulation visuals.
The field retains its validated CPU instances so it can be recreated after device loss. Its GPU instance buffer grows only when a replacement exceeds the current capacity.
Implementations§
Source§impl ParticleField2d
impl ParticleField2d
Sourcepub fn instance_count(&self) -> usize
pub fn instance_count(&self) -> usize
Returns the number of particle instances currently stored.
Sourcepub fn instance_capacity(&self) -> usize
pub fn instance_capacity(&self) -> usize
Returns the number of instances that fit without reallocating GPU memory.
Sourcepub fn statistics(&self) -> ParticleStatistics
pub fn statistics(&self) -> ParticleStatistics
Returns the most recent update or draw counts.
Sourcepub fn budget(&self) -> ParticleRenderBudget
pub fn budget(&self) -> ParticleRenderBudget
Returns the hard visualization budget applied by rendering.
Sourcepub fn recovery_memory_bytes(&self) -> usize
pub fn recovery_memory_bytes(&self) -> usize
Returns retained CPU memory used for recovery and validation.
Sourcepub fn cpu_allocation_bytes(&self) -> usize
pub fn cpu_allocation_bytes(&self) -> usize
Returns currently reserved CPU bytes for retained and culled instance lists.
Sourcepub fn gpu_allocation_bytes(&self) -> usize
pub fn gpu_allocation_bytes(&self) -> usize
Returns allocated GPU instance-buffer bytes.
Auto Trait Implementations§
impl !RefUnwindSafe for ParticleField2d
impl !UnwindSafe for ParticleField2d
impl Freeze for ParticleField2d
impl Send for ParticleField2d
impl Sync for ParticleField2d
impl Unpin for ParticleField2d
impl UnsafeUnpin for ParticleField2d
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