pub struct PointView<'a> {
pub pos_x: &'a [f32],
pub pos_y: &'a [f32],
pub world_w: f32,
pub world_h: f32,
pub color: Option<&'a [u8]>,
pub palette: &'static [[u8; 4]],
}Expand description
An agent population for rendering.
Both layers are stretched to the same rect, so a composite model wants
world_w = width as f32. Nothing checks this across the crate boundary.
Fields§
§pos_x: &'a [f32]Position of each agent along x.
pos_y: &'a [f32]Position of each agent along y.
world_w: f32Width of the world the positions lie in.
world_h: f32Height of the world the positions lie in.
color: Option<&'a [u8]>One palette index per agent. None colours the whole population palette[0].
palette: &'static [[u8; 4]]RGBA colours that the agents index.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for PointView<'a>
impl<'a> RefUnwindSafe for PointView<'a>
impl<'a> Send for PointView<'a>
impl<'a> Sync for PointView<'a>
impl<'a> Unpin for PointView<'a>
impl<'a> UnsafeUnpin for PointView<'a>
impl<'a> UnwindSafe for PointView<'a>
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