Skip to main content

Group

Struct Group 

Source
pub struct Group {
    pub faces: usize,
    pub tier: usize,
    pub forced: bool,
}
Expand description

One group of the atlas that wants redrawing, and what redrawing it costs.

Fields§

§faces: usize

Tiles the group draws: one for a cascade, and super::tile_span of its light for a light slot.

What r_shadow_faces is spent in, and the reason the budget is a count of faces rather than of groups: a point light’s cube is super::POINT_FACES whole geometry passes and a spot’s cone is one.

§tier: usize

Which rung of the ladder this group sits on — 0 is redrawn every frame, and each rung below doubles the period.

A light’s is the quadtree level super::Assignment::level holds, so super::coverage decides it exactly as it decides the tile’s size. A cascade’s is its own index: the near cascade fills most of the screen and is fitted to the eye every frame, and the far ones cover ground a texel of which is metres across.

§forced: bool

Whether the map the image holds for this group describes a region that has since moved out from under it, rather than merely being out of date.

The reset the plan asks for, per group. A light that jumped further than its own radius, or a cascade whose eye moved further than the cascade’s own sphere reaches, holds texels about somewhere else — which is worse than a shadow that lags, and is what makes this bypass the period. It does not bypass Cadence::faces: a frame that redrew past its budget would have no budget. Forced groups are offered it first, and one that still does not fit holds another frame.

Trait Implementations§

Source§

impl Clone for Group

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Group

Source§

impl Debug for Group

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Group

Source§

impl PartialEq for Group

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Group

Auto Trait Implementations§

§

impl Forget for Group

§

impl Freeze for Group

§

impl Move for Group

§

impl RefUnwindSafe for Group

§

impl Send for Group

§

impl Sync for Group

§

impl Unpin for Group

§

impl UnsafeUnpin for Group

§

impl UnwindSafe for Group

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> HalThreadSafe for T
where T: Send + Sync,

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.