#[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: u32Output texture edge (texels).
tex_res: u32Texture-resolution quantisation grid.
_pad: [u32; 2]Padding to 16-align the trailing terrain block.
terrain: TerrainGpuEmbedded 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
impl Clone for TileViewerParams
Source§fn clone(&self) -> TileViewerParams
fn clone(&self) -> TileViewerParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TileViewerParams
impl Debug for TileViewerParams
Source§impl PartialEq for TileViewerParams
impl PartialEq for TileViewerParams
Source§fn eq(&self, other: &TileViewerParams) -> bool
fn eq(&self, other: &TileViewerParams) -> bool
self and other values to be equal, and is used by ==.impl Copy for TileViewerParams
impl Pod for TileViewerParams
impl StructuralPartialEq for TileViewerParams
Auto Trait Implementations§
impl Freeze for TileViewerParams
impl RefUnwindSafe for TileViewerParams
impl Send for TileViewerParams
impl Sync for TileViewerParams
impl Unpin for TileViewerParams
impl UnsafeUnpin for TileViewerParams
impl UnwindSafe for TileViewerParams
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
§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
§type Bits = T
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
fn is_valid_bit_pattern(_bits: &T) -> bool
bits
as &Self.