Skip to main content

SceneData

Struct SceneData 

Source
pub struct SceneData<'a> {
    pub vertices: &'a [Vertex],
    pub indices: &'a [u32],
    pub draw_objects: Vec<DrawObject>,
    pub instanced_clusters: Vec<InstancedCluster>,
    pub n_skinned: usize,
    pub n_chunk_max: usize,
}
Expand description

Static scene geometry and the draw lists built over it.

Fields§

§vertices: &'a [Vertex]

The world’s shared static vertex buffer.

§indices: &'a [u32]

The world’s shared static index buffer.

§draw_objects: Vec<DrawObject>

One draw record per static placement.

§instanced_clusters: Vec<InstancedCluster>

One record per instanced-prop cluster.

§n_skinned: usize

Skinned draw-object count (the world’s SkinnedMesh count). Sizes each backend’s shared GPU-cull buffers for the merged total (static + instances + skinned) at init; the skinned geometry itself is uploaded later via upload_skinned.

§n_chunk_max: usize

Worst-case resident chunk count for a streaming VoxelWorld (0 otherwise). Reserves a chunk record region in the shared GPU-cull buffers at init; resident chunks fold into the indirect path each frame. Honoured by DirectX + Vulkan; Metal’s per-frame rebuild already covers chunks, so it needs no reserve.

Auto Trait Implementations§

§

impl<'a> Freeze for SceneData<'a>

§

impl<'a> RefUnwindSafe for SceneData<'a>

§

impl<'a> Send for SceneData<'a>

§

impl<'a> Sync for SceneData<'a>

§

impl<'a> Unpin for SceneData<'a>

§

impl<'a> UnsafeUnpin for SceneData<'a>

§

impl<'a> UnwindSafe for SceneData<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.