pub struct RenderWorld {
pub meshes: Vec<ExtractedMesh>,
pub lights: Vec<ExtractedLight>,
}Expand description
A collection of all data extracted from the main World needed for rendering a single frame.
This acts as the primary input to the entire rendering system. By decoupling from the main ECS, the render thread can work on this data without contention while the simulation thread advances the next frame.
Fields§
§meshes: Vec<ExtractedMesh>A list of all meshes to be rendered in the current frame.
lights: Vec<ExtractedLight>A list of all active lights affecting the current frame.
Implementations§
Source§impl RenderWorld
impl RenderWorld
Sourcepub fn clear(&mut self)
pub fn clear(&mut self)
Clears all the data in the RenderWorld, preparing it for the next frame’s extraction.
Sourcepub fn directional_light_count(&self) -> usize
pub fn directional_light_count(&self) -> usize
Returns the number of directional lights in the render world.
Sourcepub fn point_light_count(&self) -> usize
pub fn point_light_count(&self) -> usize
Returns the number of point lights in the render world.
Sourcepub fn spot_light_count(&self) -> usize
pub fn spot_light_count(&self) -> usize
Returns the number of spot lights in the render world.
Trait Implementations§
Source§impl Default for RenderWorld
impl Default for RenderWorld
Source§fn default() -> RenderWorld
fn default() -> RenderWorld
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RenderWorld
impl RefUnwindSafe for RenderWorld
impl Send for RenderWorld
impl Sync for RenderWorld
impl Unpin for RenderWorld
impl UnwindSafe for RenderWorld
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
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().