[][src]Trait box2d_rs::b2_draw::B2drawTrait

pub trait B2drawTrait {
    pub fn get_base(&self) -> &B2draw;
pub fn get_base_mut(&mut self) -> &mut B2draw;
pub fn draw_polygon(&mut self, vertices: &[B2vec2], color: B2color);
pub fn draw_solid_polygon(&mut self, vertices: &[B2vec2], color: B2color);
pub fn draw_circle(&mut self, center: B2vec2, radius: f32, color: B2color);
pub fn draw_solid_circle(
        &mut self,
        center: B2vec2,
        radius: f32,
        axis: B2vec2,
        color: B2color
    );
pub fn draw_segment(&mut self, p1: B2vec2, p2: B2vec2, color: B2color);
pub fn draw_transform(&mut self, xf: B2Transform);
pub fn draw_point(&mut self, p: B2vec2, size: f32, color: B2color); }

Required methods

pub fn get_base(&self) -> &B2draw

pub fn get_base_mut(&mut self) -> &mut B2draw

pub fn draw_polygon(&mut self, vertices: &[B2vec2], color: B2color)

draw a closed polygon provided in CCW order.

pub fn draw_solid_polygon(&mut self, vertices: &[B2vec2], color: B2color)

draw a solid closed polygon provided in CCW order.

pub fn draw_circle(&mut self, center: B2vec2, radius: f32, color: B2color)

draw a circle.

pub fn draw_solid_circle(
    &mut self,
    center: B2vec2,
    radius: f32,
    axis: B2vec2,
    color: B2color
)

draw a solid circle.

pub fn draw_segment(&mut self, p1: B2vec2, p2: B2vec2, color: B2color)

draw a line segment.

pub fn draw_transform(&mut self, xf: B2Transform)

draw a transform. Choose your own length scale.

  • xf - a transform.

pub fn draw_point(&mut self, p: B2vec2, size: f32, color: B2color)

draw a point.

Loading content...

Implementors

Loading content...