Struct gridsim_ui::Renderer
[−]
[src]
pub struct Renderer { /* fields omitted */ }
Stores information to render
Methods
impl Renderer
[src]
pub fn new<D: Facade>(display: &D) -> Renderer
[src]
pub fn render<'a, D: Facade, Su: Surface, S: Sim<'a>, Color: Fn(&S::Cell) -> [f32; 4] + Sync, Filter: Fn(&S::Cell) -> bool + Sync>(
&self,
display: &D,
surface: &mut Su,
grid: &SquareGrid<'a, S>,
draw_params: DrawParameters,
cell_color: Color,
filter: Filter
) -> Result<(), DrawError> where
S::Cell: Sync,
[src]
&self,
display: &D,
surface: &mut Su,
grid: &SquareGrid<'a, S>,
draw_params: DrawParameters,
cell_color: Color,
filter: Filter
) -> Result<(), DrawError> where
S::Cell: Sync,
Takes a glium Facade, a drawing Surface, a Grid, a transform, and a cell to color map.
Renders the cells in a space from <-1, -1> to <1, 1> which is transformed with the transform matrix.