pub struct WorldStreamingEditor {Show 28 fields
pub config: StreamingConfig,
pub chunks: HashMap<ChunkCoord, StreamingChunk>,
pub viewer_position: Vec3,
pub viewer_forward: Vec3,
pub camera: Option<StreamingCamera>,
pub frustum: Option<FrustumCulling>,
pub load_queue: AsyncLoadQueue,
pub unload_queue: AsyncLoadQueue,
pub memory_budget: MemoryBudget,
pub streaming_stats: StreamingStats,
pub profiler: StreamingProfiler,
pub octree: Option<OctreeNode>,
pub bvh: Option<BvhNode>,
pub world_partition: WorldPartition,
pub data_layers: DataLayerSystem,
pub hlod_hierarchy: Vec<Vec<HlodCluster>>,
pub virtual_texture: Option<VirtualTexture>,
pub terrain_patches: HashMap<ChunkCoord, TerrainPatch>,
pub actor_proxies: HashMap<u32, ActorStreamingProxy>,
pub impostors: HashMap<u32, ImpostorBillboard>,
pub chunk_dependencies: ChunkDependency,
pub loaded_chunk_set: HashSet<ChunkCoord>,
pub frame_number: u64,
pub current_time_us: u64,
pub pending_lod_transitions: Vec<(ChunkCoord, LodLevel, LodLevel)>,
pub mesh_lods: HashMap<u32, ChunkMeshLod>,
pub streaming_distance_calculator: StreamingDistanceCalculator,
pub hlod_builder: HlodBuilder,
}Fields§
§config: StreamingConfig§chunks: HashMap<ChunkCoord, StreamingChunk>§viewer_position: Vec3§viewer_forward: Vec3§camera: Option<StreamingCamera>§frustum: Option<FrustumCulling>§load_queue: AsyncLoadQueue§unload_queue: AsyncLoadQueue§memory_budget: MemoryBudget§streaming_stats: StreamingStats§profiler: StreamingProfiler§octree: Option<OctreeNode>§bvh: Option<BvhNode>§world_partition: WorldPartition§data_layers: DataLayerSystem§hlod_hierarchy: Vec<Vec<HlodCluster>>§virtual_texture: Option<VirtualTexture>§terrain_patches: HashMap<ChunkCoord, TerrainPatch>§actor_proxies: HashMap<u32, ActorStreamingProxy>§impostors: HashMap<u32, ImpostorBillboard>§chunk_dependencies: ChunkDependency§loaded_chunk_set: HashSet<ChunkCoord>§frame_number: u64§current_time_us: u64§pending_lod_transitions: Vec<(ChunkCoord, LodLevel, LodLevel)>§mesh_lods: HashMap<u32, ChunkMeshLod>§streaming_distance_calculator: StreamingDistanceCalculator§hlod_builder: HlodBuilderImplementations§
Source§impl WorldStreamingEditor
impl WorldStreamingEditor
pub fn new(config: StreamingConfig) -> Self
pub fn set_viewer(&mut self, position: Vec3, forward: Vec3)
pub fn set_camera(&mut self, camera: StreamingCamera)
pub fn tick(&mut self, delta_time_s: f32, time_us: u64)
pub fn estimate_chunk_memory(&self, coord: &ChunkCoord, lod: &LodLevel) -> u64
pub fn register_actor( &mut self, actor_id: u32, position: Vec3, bounds: ChunkBounds, streaming_dist: f32, )
pub fn unregister_actor(&mut self, actor_id: u32)
pub fn add_terrain_patch( &mut self, coord: ChunkCoord, size: usize, cell_size: f32, )
pub fn build_octree(&mut self)
pub fn build_bvh(&mut self)
pub fn build_hlod(&mut self)
pub fn query_visible_objects(&self) -> Vec<u32>
pub fn query_objects_in_radius(&self, center: Vec3, radius: f32) -> Vec<u32>
pub fn query_objects_in_bounds(&self, bounds: &ChunkBounds) -> Vec<u32>
pub fn get_chunk_lod(&self, coord: &ChunkCoord) -> LodLevel
pub fn get_chunk_state(&self, coord: &ChunkCoord) -> ChunkLoadState
pub fn chunk_count(&self) -> usize
pub fn loaded_chunk_count(&self) -> usize
pub fn memory_usage_mb(&self) -> f32
pub fn stats(&self) -> &StreamingStats
pub fn profiler_summary(&self) -> ProfilerSummary
pub fn set_lod_bias(&mut self, bias: f32)
pub fn force_lod(&mut self, coord: &ChunkCoord, lod: LodLevel)
pub fn get_terrain_height(&self, world_x: f32, world_z: f32) -> f32
pub fn get_terrain_normal(&self, world_x: f32, world_z: f32) -> Vec3
pub fn compute_streaming_bounds(&self) -> ChunkBounds
pub fn debug_draw_chunks(&self) -> Vec<(ChunkBounds, Vec3, LodLevel)>
Trait Implementations§
Source§impl Clone for WorldStreamingEditor
impl Clone for WorldStreamingEditor
Auto Trait Implementations§
impl Freeze for WorldStreamingEditor
impl RefUnwindSafe for WorldStreamingEditor
impl Send for WorldStreamingEditor
impl Sync for WorldStreamingEditor
impl Unpin for WorldStreamingEditor
impl UnsafeUnpin for WorldStreamingEditor
impl UnwindSafe for WorldStreamingEditor
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.