pub struct Scene3dBudget { /* private fields */ }Expand description
Bounds scene-owned slots and distinct retained mesh allocations.
Object storage includes dense instances, reusable lookup slots and resource accounting. Mesh CPU/GPU bytes are deduplicated by allocation identity. Host references outside this scene and in-flight driver allocations are excluded.
Implementations§
Source§impl Scene3dBudget
impl Scene3dBudget
Sourcepub fn new(
max_objects: usize,
max_storage_bytes: usize,
max_mesh_cpu_bytes: usize,
max_mesh_gpu_bytes: usize,
) -> Result<Self, Scene3dError>
pub fn new( max_objects: usize, max_storage_bytes: usize, max_mesh_cpu_bytes: usize, max_mesh_gpu_bytes: usize, ) -> Result<Self, Scene3dError>
Creates nonzero object, storage, recovery-topology and GPU-buffer limits.
Sourcepub const fn max_objects(self) -> usize
pub const fn max_objects(self) -> usize
Maximum simultaneous live objects; removed lookup slots can be reused.
Sourcepub const fn max_storage_bytes(self) -> usize
pub const fn max_storage_bytes(self) -> usize
Maximum retained CPU bookkeeping capacity in bytes.
Sourcepub const fn max_mesh_cpu_bytes(self) -> usize
pub const fn max_mesh_cpu_bytes(self) -> usize
Maximum distinct source topology capacity in bytes.
Sourcepub const fn max_mesh_gpu_bytes(self) -> usize
pub const fn max_mesh_gpu_bytes(self) -> usize
Maximum distinct mesh buffer bytes referenced by the scene.
Sourcepub const fn with_texture_limits(
self,
cpu_bytes: usize,
gpu_bytes: usize,
) -> Self
pub const fn with_texture_limits( self, cpu_bytes: usize, gpu_bytes: usize, ) -> Self
Sets deduplicated texture recovery/GPU texel limits; zero prohibits textured resources. Mesh and bookkeeping limits remain independent.
Sourcepub const fn max_texture_cpu_bytes(self) -> usize
pub const fn max_texture_cpu_bytes(self) -> usize
Maximum distinct retained texture-pixel capacity in bytes.
Sourcepub const fn max_texture_gpu_bytes(self) -> usize
pub const fn max_texture_gpu_bytes(self) -> usize
Maximum distinct nominal GPU texture texel bytes.
Trait Implementations§
Source§impl Clone for Scene3dBudget
impl Clone for Scene3dBudget
Source§fn clone(&self) -> Scene3dBudget
fn clone(&self) -> Scene3dBudget
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for Scene3dBudget
Source§impl Debug for Scene3dBudget
impl Debug for Scene3dBudget
Source§impl Default for Scene3dBudget
impl Default for Scene3dBudget
impl Eq for Scene3dBudget
Source§impl PartialEq for Scene3dBudget
impl PartialEq for Scene3dBudget
impl StructuralPartialEq for Scene3dBudget
Auto Trait Implementations§
impl Freeze for Scene3dBudget
impl RefUnwindSafe for Scene3dBudget
impl Send for Scene3dBudget
impl Sync for Scene3dBudget
impl Unpin for Scene3dBudget
impl UnsafeUnpin for Scene3dBudget
impl UnwindSafe for Scene3dBudget
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.