Struct ggez::graphics::MeshBuilder
[−]
[src]
pub struct MeshBuilder { /* fields omitted */ }
A builder for creating Mesh
es.
This allows you to easily make one Mesh
containing
many different complex pieces of geometry. They don't
have to be connected to each other, and will all be
drawn at once.
Methods
impl MeshBuilder
[src]
pub fn new() -> Self
[src]
Create a new MeshBuilder.
ⓘImportant traits for &'a mut Wpub fn line(&mut self, points: &[Point2], width: f32) -> &mut Self
[src]
Create a new mesh for a line of one or more connected segments.
ⓘImportant traits for &'a mut Wpub fn circle(
&mut self,
mode: DrawMode,
point: Point2,
radius: f32,
tolerance: f32
) -> &mut Self
[src]
&mut self,
mode: DrawMode,
point: Point2,
radius: f32,
tolerance: f32
) -> &mut Self
Create a new mesh for a circle.
ⓘImportant traits for &'a mut Wpub fn ellipse(
&mut self,
mode: DrawMode,
point: Point2,
radius1: f32,
radius2: f32,
tolerance: f32
) -> &mut Self
[src]
&mut self,
mode: DrawMode,
point: Point2,
radius1: f32,
radius2: f32,
tolerance: f32
) -> &mut Self
Create a new mesh for an ellipse.
ⓘImportant traits for &'a mut Wpub fn polyline(&mut self, mode: DrawMode, points: &[Point2]) -> &mut Self
[src]
Create a new mesh for a series of connected lines.
ⓘImportant traits for &'a mut Wpub fn polygon(&mut self, mode: DrawMode, points: &[Point2]) -> &mut Self
[src]
Create a new mesh for a closed polygon
ⓘImportant traits for &'a mut Wpub fn triangles(&mut self, triangles: &[Point2]) -> &mut Self
[src]
Create a new Mesh
from a raw list of triangles.
Currently does not support UV's or indices.
pub fn build(&self, ctx: &mut Context) -> GameResult<Mesh>
[src]
Takes the accumulated geometry and load it into GPU memory,
creating a single Mesh
.
Trait Implementations
impl Debug for MeshBuilder
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Clone for MeshBuilder
[src]
fn clone(&self) -> MeshBuilder
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more