Skip to main content

TileViewerParams

Struct TileViewerParams 

Source
#[repr(C)]
pub struct TileViewerParams { pub a: [f32; 4], pub b: [f32; 4], pub c: [f32; 4], pub sub0: [f32; 4], pub sub1: [f32; 4], pub sub2: [f32; 4], pub width: u32, pub tex_res: u32, pub _pad: [u32; 2], pub terrain: TerrainGpu, pub _pad2: [f32; 2], }
Expand description

std430 params for TileViewer.slang — byte-identical to struct TileViewerParams there (176 bytes). The tile_viewer_params_layout test locks the offsets. Field offsets: a 0, b 16, c 32, sub0 48, sub1 64, sub2 80, width 96, tex_res 100, terrain 112.

Fields§

§a: [f32; 4]

Face corner A (xyz world) + sphere radius (w).

§b: [f32; 4]

Face corner B (xyz), w unused.

§c: [f32; 4]

Face corner C (xyz), w unused.

§sub0: [f32; 4]

Viewed sub-triangle corner 0 in face barycentric (wb, wc in xy) → UV (0,0).

§sub1: [f32; 4]

Sub-triangle corner 1 (wb, wc) → UV (1,0).

§sub2: [f32; 4]

Sub-triangle corner 2 (wb, wc) → UV (0,1).

§width: u32

Output texture edge (texels).

§tex_res: u32

Texture-resolution quantisation grid.

§_pad: [u32; 2]

Padding to 16-align the trailing terrain block.

§terrain: TerrainGpu

Embedded 56-byte terrain block (shared with the chunk path).

§_pad2: [f32; 2]

Tail padding keeping the struct a 16-byte multiple (std430 stride rule).

Trait Implementations§

Source§

impl Clone for TileViewerParams

Source§

fn clone(&self) -> TileViewerParams

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 Debug for TileViewerParams

Source§

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

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

impl PartialEq for TileViewerParams

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Zeroable for TileViewerParams

§

fn zeroed() -> Self

Source§

impl Copy for TileViewerParams

Source§

impl Pod for TileViewerParams

Source§

impl StructuralPartialEq for TileViewerParams

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
§

impl<T> CheckedBitPattern for T
where T: AnyBitPattern,

§

type Bits = T

Self must have the same layout as the specified Bits except for the possible invalid bit patterns being checked during is_valid_bit_pattern.
§

fn is_valid_bit_pattern(_bits: &T) -> bool

If this function returns true, then it must be valid to reinterpret bits as &Self.
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, 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 = 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.
§

impl<T> AnyBitPattern for T
where T: Pod,

§

impl<T> NoUninit for T
where T: Pod,