pub struct DynamicMesh2d { /* private fields */ }Expand description
Mutable GPU triangle-list geometry for high-frequency simulation visuals.
A mesh retains its CPU vertices for validation and recreates its GPU buffer
only when a replacement exceeds its current capacity. Use
WgpuRenderer::update_dynamic_mesh_range for in-place partial updates.
Its bounded camera-validation cache is cleared by every successful mutation.
Implementations§
Source§impl DynamicMesh2d
impl DynamicMesh2d
Sourcepub fn vertex_count(&self) -> usize
pub fn vertex_count(&self) -> usize
Returns the number of triangle-list vertices currently stored.
Sourcepub fn vertex_capacity(&self) -> usize
pub fn vertex_capacity(&self) -> usize
Returns the number of vertices that fit without reallocating its GPU buffer.
Sourcepub fn recovery_memory_bytes(&self) -> usize
pub fn recovery_memory_bytes(&self) -> usize
Returns retained CPU memory used for validation and future updates.
Sourcepub const fn budget(&self) -> Option<DynamicMeshBudget>
pub const fn budget(&self) -> Option<DynamicMeshBudget>
Returns explicit limits, or None for the compatibility constructor.
Auto Trait Implementations§
impl !Freeze for DynamicMesh2d
impl !RefUnwindSafe for DynamicMesh2d
impl !UnwindSafe for DynamicMesh2d
impl Send for DynamicMesh2d
impl Sync for DynamicMesh2d
impl Unpin for DynamicMesh2d
impl UnsafeUnpin for DynamicMesh2d
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