Struct gridsim_ui::Renderer
[−]
[src]
pub struct Renderer { /* fields omitted */ }
Stores information to render
Methods
impl Renderer
[src]
fn new<D: Facade>(display: &D) -> Renderer
[src]
fn render<D: Facade, Su: Surface, S: Sim, F: Fn(&S::Cell) -> [f32; 4]>(
&self,
display: &D,
surface: &mut Su,
grid: &Grid<S>,
draw_params: DrawParameters,
cell_color: F
) -> Result<(), DrawError>
[src]
&self,
display: &D,
surface: &mut Su,
grid: &Grid<S>,
draw_params: DrawParameters,
cell_color: F
) -> Result<(), DrawError>
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.