Struct SectionQuad
pub struct SectionQuad {
pub positions: [[f32; 3]; 4],
pub uvs: [[f32; 2]; 4],
pub color: u32,
pub light: [u8; 2],
pub translucent: bool,
}Expand description
One quad a SectionGeometry adds. Its corners go counter-clockwise seen from the side it
faces; a solid quad is culled from behind, as a block’s faces are, so a quad seen from both
sides is two quads.
Fields§
§positions: [[f32; 3]; 4]The corners, in blocks from the section’s lowest corner, each 0 to 16: a quad stays inside its section.
uvs: [[f32; 2]; 4]Each corner’s texture coordinate within the sprite, 0 to 1.
color: u32ARGB the sprite’s texels are multiplied by; 0xFFFFFFFF leaves them as they are.
light: [u8; 2]Sky and block light, 0 to 15 each (BlockAndTintGetter::brightness reads the world’s).
translucent: boolDrawn in the translucent pass (sorted, blended) rather than the solid one (alpha cutout).
Trait Implementations§
§impl Clone for SectionQuad
impl Clone for SectionQuad
§fn clone(&self) -> SectionQuad
fn clone(&self) -> SectionQuad
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SectionQuad
§impl Debug for SectionQuad
impl Debug for SectionQuad
§impl PartialEq for SectionQuad
impl PartialEq for SectionQuad
impl StructuralPartialEq for SectionQuad
Auto Trait Implementations§
impl Freeze for SectionQuad
impl RefUnwindSafe for SectionQuad
impl Send for SectionQuad
impl Sync for SectionQuad
impl Unpin for SectionQuad
impl UnsafeUnpin for SectionQuad
impl UnwindSafe for SectionQuad
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