Trait bevy_gizmos::primitives::dim2::GizmoPrimitive2d

source ·
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: impl Into<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: impl Into<Color> ) -> Self::Output<'_>

Renders a 2D primitive with its associated details.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<'w, 's, Config, Clear> GizmoPrimitive2d<Dir2> for Gizmos<'w, 's, Config, Clear>
where Config: GizmoConfigGroup, Clear: 'static + Send + Sync,

§

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

source§

impl<'w, 's, Config, Clear> GizmoPrimitive2d<Annulus> for Gizmos<'w, 's, Config, Clear>
where Config: GizmoConfigGroup, Clear: 'static + Send + Sync,

§

type Output<'a> = Annulus2dBuilder<'a, 'w, 's, Config, Clear> where Self: 'a

source§

impl<'w, 's, Config, Clear> GizmoPrimitive2d<Arc2d> for Gizmos<'w, 's, Config, Clear>
where Config: GizmoConfigGroup, Clear: 'static + Send + Sync,

§

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

source§

impl<'w, 's, Config, Clear> GizmoPrimitive2d<BoxedPolygon> for Gizmos<'w, 's, Config, Clear>
where Config: GizmoConfigGroup, Clear: 'static + Send + Sync,

§

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

source§

impl<'w, 's, Config, Clear> GizmoPrimitive2d<BoxedPolyline2d> for Gizmos<'w, 's, Config, Clear>
where Config: GizmoConfigGroup, Clear: 'static + Send + Sync,

§

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

source§

impl<'w, 's, Config, Clear> GizmoPrimitive2d<Capsule2d> for Gizmos<'w, 's, Config, Clear>
where Config: GizmoConfigGroup, Clear: 'static + Send + Sync,

§

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

source§

impl<'w, 's, Config, Clear> GizmoPrimitive2d<Circle> for Gizmos<'w, 's, Config, Clear>
where Config: GizmoConfigGroup, Clear: 'static + Send + Sync,

§

type Output<'a> = Ellipse2dBuilder<'a, 'w, 's, Config, Clear> where Self: 'a

source§

impl<'w, 's, Config, Clear> GizmoPrimitive2d<CircularSector> for Gizmos<'w, 's, Config, Clear>
where Config: GizmoConfigGroup, Clear: 'static + Send + Sync,

§

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

source§

impl<'w, 's, Config, Clear> GizmoPrimitive2d<CircularSegment> for Gizmos<'w, 's, Config, Clear>
where Config: GizmoConfigGroup, Clear: 'static + Send + Sync,

§

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

source§

impl<'w, 's, Config, Clear> GizmoPrimitive2d<Ellipse> for Gizmos<'w, 's, Config, Clear>
where Config: GizmoConfigGroup, Clear: 'static + Send + Sync,

§

type Output<'a> = Ellipse2dBuilder<'a, 'w, 's, Config, Clear> where Self: 'a

source§

impl<'w, 's, Config, Clear> GizmoPrimitive2d<Line2d> for Gizmos<'w, 's, Config, Clear>
where Config: GizmoConfigGroup, Clear: 'static + Send + Sync,

§

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

source§

impl<'w, 's, Config, Clear> GizmoPrimitive2d<Plane2d> for Gizmos<'w, 's, Config, Clear>
where Config: GizmoConfigGroup, Clear: 'static + Send + Sync,

§

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

source§

impl<'w, 's, Config, Clear> GizmoPrimitive2d<Rectangle> for Gizmos<'w, 's, Config, Clear>
where Config: GizmoConfigGroup, Clear: 'static + Send + Sync,

§

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

source§

impl<'w, 's, Config, Clear> GizmoPrimitive2d<RegularPolygon> for Gizmos<'w, 's, Config, Clear>
where Config: GizmoConfigGroup, Clear: 'static + Send + Sync,

§

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

source§

impl<'w, 's, Config, Clear> GizmoPrimitive2d<Rhombus> for Gizmos<'w, 's, Config, Clear>
where Config: GizmoConfigGroup, Clear: 'static + Send + Sync,

§

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

source§

impl<'w, 's, Config, Clear> GizmoPrimitive2d<Segment2d> for Gizmos<'w, 's, Config, Clear>
where Config: GizmoConfigGroup, Clear: 'static + Send + Sync,

§

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

source§

impl<'w, 's, Config, Clear> GizmoPrimitive2d<Triangle2d> for Gizmos<'w, 's, Config, Clear>
where Config: GizmoConfigGroup, Clear: 'static + Send + Sync,

§

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

source§

impl<'w, 's, const N: usize, Config, Clear> GizmoPrimitive2d<Polygon<N>> for Gizmos<'w, 's, Config, Clear>
where Config: GizmoConfigGroup, Clear: 'static + Send + Sync,

§

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

source§

impl<'w, 's, const N: usize, Config, Clear> GizmoPrimitive2d<Polyline2d<N>> for Gizmos<'w, 's, Config, Clear>
where Config: GizmoConfigGroup, Clear: 'static + Send + Sync,

§

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