Struct ggez::graphics::Mesh [−][src]
pub struct Mesh { /* fields omitted */ }
2D polygon mesh.
All of its creation methods are just shortcuts for doing the same operation
via a MeshBuilder
.
Methods
impl Mesh
[src]
impl Mesh
pub fn new_line(
ctx: &mut Context,
points: &[Point2],
width: f32
) -> GameResult<Mesh>
[src]
pub fn new_line(
ctx: &mut Context,
points: &[Point2],
width: f32
) -> GameResult<Mesh>
Create a new mesh for a line of one or more connected segments.
pub fn new_circle(
ctx: &mut Context,
mode: DrawMode,
point: Point2,
radius: f32,
tolerance: f32
) -> GameResult<Mesh>
[src]
pub fn new_circle(
ctx: &mut Context,
mode: DrawMode,
point: Point2,
radius: f32,
tolerance: f32
) -> GameResult<Mesh>
Create a new mesh for a circle.
pub fn new_ellipse(
ctx: &mut Context,
mode: DrawMode,
point: Point2,
radius1: f32,
radius2: f32,
tolerance: f32
) -> GameResult<Mesh>
[src]
pub fn new_ellipse(
ctx: &mut Context,
mode: DrawMode,
point: Point2,
radius1: f32,
radius2: f32,
tolerance: f32
) -> GameResult<Mesh>
Create a new mesh for an ellipse.
pub fn new_polyline(
ctx: &mut Context,
mode: DrawMode,
points: &[Point2]
) -> GameResult<Mesh>
[src]
pub fn new_polyline(
ctx: &mut Context,
mode: DrawMode,
points: &[Point2]
) -> GameResult<Mesh>
Create a new mesh for series of connected lines
pub fn new_polygon(
ctx: &mut Context,
mode: DrawMode,
points: &[Point2]
) -> GameResult<Mesh>
[src]
pub fn new_polygon(
ctx: &mut Context,
mode: DrawMode,
points: &[Point2]
) -> GameResult<Mesh>
Create a new mesh for closed polygon
pub fn from_triangles(
ctx: &mut Context,
triangles: &[Point2]
) -> GameResult<Mesh>
[src]
pub fn from_triangles(
ctx: &mut Context,
triangles: &[Point2]
) -> GameResult<Mesh>
Create a new Mesh
from a raw list of triangles.
Trait Implementations
impl Debug for Mesh
[src]
impl Debug for Mesh
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for Mesh
[src]
impl Clone for Mesh
fn clone(&self) -> Mesh
[src]
fn clone(&self) -> Mesh
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl PartialEq for Mesh
[src]
impl PartialEq for Mesh
fn eq(&self, other: &Mesh) -> bool
[src]
fn eq(&self, other: &Mesh) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Mesh) -> bool
[src]
fn ne(&self, other: &Mesh) -> bool
This method tests for !=
.
impl Drawable for Mesh
[src]
impl Drawable for Mesh
fn draw_ex(&self, ctx: &mut Context, param: DrawParam) -> GameResult<()>
[src]
fn draw_ex(&self, ctx: &mut Context, param: DrawParam) -> GameResult<()>
Actually draws the object to the screen. Read more
fn set_blend_mode(&mut self, mode: Option<BlendMode>)
[src]
fn set_blend_mode(&mut self, mode: Option<BlendMode>)
Sets the blend mode to be used when drawing this drawable. This overrides the general graphics::set_blend_mode()
. If None
is set, defers to the blend mode set by graphics::set_blend_mode()
. Read more
fn get_blend_mode(&self) -> Option<BlendMode>
[src]
fn get_blend_mode(&self) -> Option<BlendMode>
Gets the blend mode to be used when drawing this drawable.
fn draw(&self, ctx: &mut Context, dest: Point2, rotation: f32) -> GameResult<()>
[src]
fn draw(&self, ctx: &mut Context, dest: Point2, rotation: f32) -> GameResult<()>
Draws the drawable onto the rendering target. Read more