pub struct StreamingChunk {Show 17 fields
pub coord: ChunkCoord,
pub bounds: ChunkBounds,
pub lod_level: LodLevel,
pub load_state: ChunkLoadState,
pub resident_objects: Vec<u32>,
pub memory_bytes: u64,
pub last_visible_frame: u64,
pub last_loaded_frame: u64,
pub load_priority: f32,
pub distance_to_viewer: f32,
pub screen_space_size: f32,
pub is_visible: bool,
pub dependencies: Vec<ChunkCoord>,
pub hlod_cluster_id: Option<u32>,
pub data_layer_mask: u32,
pub version: u32,
pub flags: ChunkFlags,
}Fields§
§coord: ChunkCoord§bounds: ChunkBounds§lod_level: LodLevel§load_state: ChunkLoadState§resident_objects: Vec<u32>§memory_bytes: u64§last_visible_frame: u64§last_loaded_frame: u64§load_priority: f32§distance_to_viewer: f32§screen_space_size: f32§is_visible: bool§dependencies: Vec<ChunkCoord>§hlod_cluster_id: Option<u32>§data_layer_mask: u32§version: u32§flags: ChunkFlagsImplementations§
Source§impl StreamingChunk
impl StreamingChunk
pub fn new(coord: ChunkCoord, chunk_size: f32) -> Self
pub fn update_distance(&mut self, viewer_pos: Vec3)
pub fn compute_load_priority( &mut self, viewer_pos: Vec3, viewer_forward: Vec3, ) -> f32
pub fn estimate_memory_for_lod(&self, lod: &LodLevel) -> u64
pub fn can_load(&self) -> bool
pub fn can_evict(&self) -> bool
pub fn age_frames(&self, current_frame: u64) -> u64
pub fn needs_lod_upgrade(&self, desired_lod: &LodLevel) -> bool
pub fn needs_lod_downgrade(&self, desired_lod: &LodLevel) -> bool
pub fn mark_visible(&mut self, frame: u64)
pub fn mark_not_visible(&mut self)
pub fn add_object(&mut self, object_id: u32)
pub fn remove_object(&mut self, object_id: u32)
pub fn is_dependency_satisfied( &self, loaded_chunks: &HashSet<ChunkCoord>, ) -> bool
Trait Implementations§
Source§impl Clone for StreamingChunk
impl Clone for StreamingChunk
Auto Trait Implementations§
impl Freeze for StreamingChunk
impl RefUnwindSafe for StreamingChunk
impl Send for StreamingChunk
impl Sync for StreamingChunk
impl Unpin for StreamingChunk
impl UnsafeUnpin for StreamingChunk
impl UnwindSafe for StreamingChunk
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
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.