#[non_exhaustive]pub struct ComposedFrameParams<'a> {
pub camera: &'a Camera,
pub settings: &'a OpticastSettings,
pub fog: CpuFog,
pub sky_color: u32,
pub sky: Option<&'a Sky>,
pub materials: Option<&'a MaterialTable>,
pub terrain_materials: &'a [(Rgb, u8)],
pub lights: CpuLights<'a>,
pub sprite_occluder: Option<&'a dyn WorldOccluder>,
pub view_cutout: Option<&'a SceneViewCutout>,
pub fow: Option<(GridId, &'a FogOfWar)>,
}Expand description
The composed render’s bundled per-frame inputs: the positional
wrapper ladder (render_scene_composed → _with_materials →
_with_materials_scratch) had reached 17 arguments with adjacent
same-typed Options a compiler can’t tell apart — a swapped slot
would compile fine. #[non_exhaustive]: construct with
ComposedFrameParams::new and override fields, so future frame
inputs (OC.4 ghost mode, …) are field additions, not new wrappers.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.camera: &'a CameraWorld camera.
settings: &'a OpticastSettingsProjection + scan settings.
fog: CpuFogFog + per-face side shades.
sky_color: u32Solid sky colour for the per-grid temp pre-fill.
sky: Option<&'a Sky>Optional textured sky panorama.
materials: Option<&'a MaterialTable>TV — global voxel-material palette.
terrain_materials: &'a [(Rgb, u8)]TV.4 — terrain colour→material map.
lights: CpuLights<'a>CPU.1 — world-space dynamic lights (transformed per grid).
sprite_occluder: Option<&'a dyn WorldOccluder>XS.2 — sprite-volume occluder (sprites cast onto terrain).
view_cutout: Option<&'a SceneViewCutout>OC — the frame’s view cutout (keyhole).
fow: Option<(GridId, &'a FogOfWar)>FW.2 — fog-of-war styling for ONE grid (the twin): its
GridId plus the mask/config to style it with. Only that grid
gets the per-hit dim / desaturate / hide; every other grid
renders normally. None (the default) = no fog styling,
byte-identical.
Implementations§
Source§impl<'a> ComposedFrameParams<'a>
impl<'a> ComposedFrameParams<'a>
Sourcepub fn new(camera: &'a Camera, settings: &'a OpticastSettings) -> Self
pub fn new(camera: &'a Camera, settings: &'a OpticastSettings) -> Self
Params with every optional input off — override what differs.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for ComposedFrameParams<'a>
impl<'a> !UnwindSafe for ComposedFrameParams<'a>
impl<'a> Freeze for ComposedFrameParams<'a>
impl<'a> Send for ComposedFrameParams<'a>
impl<'a> Sync for ComposedFrameParams<'a>
impl<'a> Unpin for ComposedFrameParams<'a>
impl<'a> UnsafeUnpin for ComposedFrameParams<'a>
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
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>
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>
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