pub struct StreamingLevel {Show 24 fields
pub id: u64,
pub name: String,
pub asset: StreamingLevelAsset,
pub bounds: Aabb,
pub sphere_bounds: Sphere,
pub load_distance: f32,
pub unload_distance: f32,
pub priority: LoadPriority,
pub persistence: LevelPersistence,
pub state: StreamingState,
pub lod_bias: f32,
pub memory_footprint_mb: f32,
pub current_lod: LodLevel,
pub sector_id: Option<u64>,
pub load_timestamp_ms: f64,
pub unload_timestamp_ms: f64,
pub load_count: u32,
pub transform: Mat4,
pub is_visible: bool,
pub is_frustum_culled: bool,
pub is_occlusion_culled: bool,
pub distance_to_camera: f32,
pub screen_size: f32,
pub importance_weight: f32,
}Fields§
§id: u64§name: String§asset: StreamingLevelAsset§bounds: Aabb§sphere_bounds: Sphere§load_distance: f32§unload_distance: f32§priority: LoadPriority§persistence: LevelPersistence§state: StreamingState§lod_bias: f32§memory_footprint_mb: f32§current_lod: LodLevel§sector_id: Option<u64>§load_timestamp_ms: f64§unload_timestamp_ms: f64§load_count: u32§transform: Mat4§is_visible: bool§is_frustum_culled: bool§is_occlusion_culled: bool§distance_to_camera: f32§screen_size: f32§importance_weight: f32Implementations§
Source§impl StreamingLevel
impl StreamingLevel
pub fn new( id: u64, name: String, asset: StreamingLevelAsset, bounds: Aabb, ) -> Self
pub fn compute_lod(&self, distance: f32, lod_bias: f32) -> LodLevel
pub fn compute_screen_size( &self, camera_pos: Vec3, fov_y_rad: f32, viewport_height: f32, ) -> f32
pub fn should_load(&self, camera_pos: Vec3) -> bool
pub fn should_unload(&self, camera_pos: Vec3) -> bool
pub fn memory_estimate_mb(&self) -> f32
Trait Implementations§
Source§impl Clone for StreamingLevel
impl Clone for StreamingLevel
Auto Trait Implementations§
impl Freeze for StreamingLevel
impl RefUnwindSafe for StreamingLevel
impl Send for StreamingLevel
impl Sync for StreamingLevel
impl Unpin for StreamingLevel
impl UnsafeUnpin for StreamingLevel
impl UnwindSafe for StreamingLevel
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.