Skip to main content

ExtractedScene

Struct ExtractedScene 

Source
pub struct ExtractedScene {
    pub render_items: Vec<ExtractedRenderItem>,
    pub scene_id: u32,
    pub scene_variants: SceneFeatures,
    pub scene_defines: ShaderDefines,
    pub background: BackgroundMode,
    pub envvironment: Environment,
    pub has_transmission: bool,
    pub lights: Vec<ExtractedLight>,
    /* private fields */
}
Expand description

Extracted scene data

This is a lightweight structure containing only the minimal dataset needed for current frame rendering. Populated during Extract phase, after which the Scene borrow can be safely released.

§“Single Source of Truth” Design

render_items is the single, unified list of all active renderables. No frustum culling is performed during extraction — that is deferred to the Cull phase where each RenderView (main camera, shadow cascades, etc.) performs its own culling against this shared list.

Fields§

§render_items: Vec<ExtractedRenderItem>

All active render items (NOT frustum-culled). Each RenderView in the Cull phase filters and culls from this list.

§scene_id: u32

Scene’s shader macro definitions

§scene_variants: SceneFeatures§scene_defines: ShaderDefines§background: BackgroundMode§envvironment: Environment§has_transmission: bool§lights: Vec<ExtractedLight>

Implementations§

Source§

impl ExtractedScene

Source

pub fn new() -> Self

Creates an empty extracted scene

Source

pub fn with_capacity(item_capacity: usize) -> Self

Pre-allocates capacity

Source

pub fn clear(&mut self)

Clear data for reuse

Source

pub fn extract_into( &mut self, scene: &mut Scene, camera: &RenderCamera, assets: &AssetServer, resource_manager: &mut ResourceManager, )

Reuse current instance memory, extract data from Scene.

Extracts ALL active meshes into render_items without frustum culling. Frustum culling is deferred to the Cull phase where each RenderView independently culls from this unified list.

Source

pub fn has_shadow_casters(&self) -> bool

Source

pub fn render_item_count(&self) -> usize

Get render item count

Source

pub fn is_empty(&self) -> bool

Check if empty

Trait Implementations§

Source§

impl Default for ExtractedScene

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

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> Downcast<T> for T

Source§

fn downcast(&self) -> &T

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<R, P> ReadPrimitive<R> for P
where R: Read + ReadEndian<P>, P: Default,

Source§

fn read_from_little_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_little_endian().
Source§

fn read_from_big_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian().
Source§

fn read_from_native_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian().
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,