pub trait GizmoPrimitive2d<P: Primitive2d> {
    type Output<'a>
       where Self: 'a;

    // Required method
    fn primitive_2d(
        &mut self,
        primitive: P,
        position: Vec2,
        angle: f32,
        color: Color
    ) -> Self::Output<'_>;
}
Expand description

A trait for rendering 2D geometric primitives (P) with Gizmos.

Required Associated Types§

source

type Output<'a> where Self: 'a

The output of primitive_2d. This is a builder to set non-default values.

Required Methods§

source

fn primitive_2d( &mut self, primitive: P, position: Vec2, angle: f32, color: Color ) -> Self::Output<'_>

Renders a 2D primitive with its associated details.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<'w, 's, T: GizmoConfigGroup> GizmoPrimitive2d<BoxedPolygon> for Gizmos<'w, 's, T>

§

type Output<'a> = () where Self: 'a

source§

impl<'w, 's, T: GizmoConfigGroup> GizmoPrimitive2d<BoxedPolyline2d> for Gizmos<'w, 's, T>

§

type Output<'a> = () where Self: 'a

source§

impl<'w, 's, T: GizmoConfigGroup> GizmoPrimitive2d<Capsule2d> for Gizmos<'w, 's, T>

§

type Output<'a> = () where Self: 'a

source§

impl<'w, 's, T: GizmoConfigGroup> GizmoPrimitive2d<Circle> for Gizmos<'w, 's, T>

§

type Output<'a> = () where Self: 'a

source§

impl<'w, 's, T: GizmoConfigGroup> GizmoPrimitive2d<Direction2d> for Gizmos<'w, 's, T>

§

type Output<'a> = () where Self: 'a

source§

impl<'w, 's, T: GizmoConfigGroup> GizmoPrimitive2d<Ellipse> for Gizmos<'w, 's, T>

§

type Output<'a> = () where Self: 'a

source§

impl<'w, 's, T: GizmoConfigGroup> GizmoPrimitive2d<Line2d> for Gizmos<'w, 's, T>

§

type Output<'a> = Line2dBuilder<'a, 'w, 's, T> where Self: 'a

source§

impl<'w, 's, T: GizmoConfigGroup> GizmoPrimitive2d<Plane2d> for Gizmos<'w, 's, T>

§

type Output<'a> = () where Self: 'a

source§

impl<'w, 's, T: GizmoConfigGroup> GizmoPrimitive2d<Rectangle> for Gizmos<'w, 's, T>

§

type Output<'a> = () where Self: 'a

source§

impl<'w, 's, T: GizmoConfigGroup> GizmoPrimitive2d<RegularPolygon> for Gizmos<'w, 's, T>

§

type Output<'a> = () where Self: 'a

source§

impl<'w, 's, T: GizmoConfigGroup> GizmoPrimitive2d<Segment2d> for Gizmos<'w, 's, T>

§

type Output<'a> = Segment2dBuilder<'a, 'w, 's, T> where Self: 'a

source§

impl<'w, 's, T: GizmoConfigGroup> GizmoPrimitive2d<Triangle2d> for Gizmos<'w, 's, T>

§

type Output<'a> = () where Self: 'a

source§

impl<'w, 's, const N: usize, T: GizmoConfigGroup> GizmoPrimitive2d<Polygon<N>> for Gizmos<'w, 's, T>

§

type Output<'a> = () where Self: 'a

source§

impl<'w, 's, const N: usize, T: GizmoConfigGroup> GizmoPrimitive2d<Polyline2d<N>> for Gizmos<'w, 's, T>

§

type Output<'a> = () where Self: 'a