MCPcopy Create free account
hub / github.com/donkeyteethUX/iced_plot / CameraUniform

Class CameraUniform

src/camera.rs:7–13  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5#[repr(C)]
6#[derive(Copy, Clone, Debug, bytemuck::Pod, bytemuck::Zeroable)]
7pub(crate) struct CameraUniform {
8 pub view_proj: [[f32; 4]; 4],
9 // (2/width, 2/height, reserved0, reserved1) - for screen-space sizing (markers)
10 pub pixel_to_clip: [f32; 4],
11 // (world_units_per_pixel_x, world_units_per_pixel_y, reserved0, reserved1) - for world-space patterns (lines)
12 pub pixel_to_world: [f32; 4],
13}
14
15impl CameraUniform {
16 pub(crate) fn update(&mut self, camera: &Camera, viewport_width: u32, viewport_height: u32) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected