Struct ggez::graphics::Mesh
[−]
[src]
pub struct Mesh { /* fields omitted */ }
2D polygon mesh
Methods
impl Mesh
[src]
fn new_line(ctx: &mut Context, points: &[Point], width: f32) -> GameResult<Mesh>
Create a new mesh for a line of one or more connected segments.
fn new_circle(
ctx: &mut Context,
mode: DrawMode,
point: Point,
radius: f32,
segments: u32
) -> GameResult<Mesh>
ctx: &mut Context,
mode: DrawMode,
point: Point,
radius: f32,
segments: u32
) -> GameResult<Mesh>
Create a new mesh for a circle. Stroked circles are still WIP, sorry.
fn new_ellipse(
ctx: &mut Context,
mode: DrawMode,
point: Point,
radius1: f32,
radius2: f32,
segments: u32
) -> GameResult<Mesh>
ctx: &mut Context,
mode: DrawMode,
point: Point,
radius1: f32,
radius2: f32,
segments: u32
) -> GameResult<Mesh>
Create a new mesh for an ellipse. Stroked ellipses are still WIP, sorry.
fn new_polygon(
ctx: &mut Context,
mode: DrawMode,
points: &[Point],
width: f32
) -> GameResult<Mesh>
ctx: &mut Context,
mode: DrawMode,
points: &[Point],
width: f32
) -> GameResult<Mesh>
Create a new mesh for a closed polygon.
fn from_triangles(ctx: &mut Context, triangles: &[Point]) -> GameResult<Mesh>
Create a new Mesh
from a raw list of triangles.
Currently does not support UV's or indices.