pub fn new(vertices: Vec<Coordinates>) -> Self {
        let contents = vertices
            .iter()
            .map(|c| TexturedGlVertex::from((c, &Coordinates::new(0., 0.))))
            .collect();
        let indices = (0..vertices.len() as u16).collect();
        Self { vertices, contents, indices, dirty: true }
    }
/// Creates a new polygon using `vertices`.
/// Rendering is done with strip, meaning if you give 3 vertices (a,b,c) then it will create a to b and b to c.
Creates a new polygon using `vertices`.
Rendering is done with strip, meaning if you give 3 vertices (a,b,c) then it will create a to b and b to c.
Creates a new polygon using ` vertices ` . Rendering is done with strip meaning if you give 3 vertices ( a b c ) then it will create a to b and b to c .
pub fn new(vertices: Vec<Coordinates>) -> Self {
        let contents = vertices
            .iter()
            .map(|c| TexturedGlVertex::from((c, &Coordinates::new(0., 0.))))
            .collect();
        let indices = (0..vertices.len() as u16).collect();
        Self { vertices, contents, indices, dirty: true }
    }
pub fn new ( vertices : Vec < Coordinates > ) -> Self { let contents = vertices . iter ( ) . map ( | c | TexturedGlVertex :: from ( ( c , & Coordinates :: new ( 0. , 0. ) ) ) ) . collect ( ) ; let indices = ( 0 .. vertices . len ( ) as u16 ) . collect ( ) ; Self { vertices , contents , indices , dirty : true } }
Creates a new polygon using `vertices`.
Creates a new polygon using ` vertices ` .
vertices
Vec<Coordinates>
vertices
Vec<Coordinates>