bevy::gizmos::primitives::dim2

Trait GizmoPrimitive2d

Source
pub trait GizmoPrimitive2d<P>
where P: Primitive2d,
{ type Output<'a> where Self: 'a; // Required method fn primitive_2d( &mut self, primitive: &P, isometry: impl Into<Isometry2d>, 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, isometry: impl Into<Isometry2d>, color: impl Into<Color>, ) -> Self::Output<'_>

Renders a 2D primitive with its associated details.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

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

Source§

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

Source§

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

Source§

type Output<'a> = () where Gizmos<'w, 's, Config, Clear>: 'a

Source§

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

Source§

type Output<'a> = () where Gizmos<'w, 's, Config, Clear>: 'a

Source§

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

Source§

type Output<'a> = () where Gizmos<'w, 's, Config, Clear>: 'a

Source§

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

Source§

type Output<'a> = () where Gizmos<'w, 's, Config, Clear>: 'a

Source§

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

Source§

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

Source§

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

Source§

type Output<'a> = () where Gizmos<'w, 's, Config, Clear>: 'a

Source§

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

Source§

type Output<'a> = () where Gizmos<'w, 's, Config, Clear>: 'a

Source§

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

Source§

type Output<'a> = () where Gizmos<'w, 's, Config, Clear>: 'a

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

type Output<'a> = () where Gizmos<'w, 's, Config, Clear>: 'a

Source§

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

Source§

type Output<'a> = () where Gizmos<'w, 's, Config, Clear>: 'a

Source§

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

Source§

type Output<'a> = () where Gizmos<'w, 's, Config, Clear>: 'a

Source§

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

Source§

type Output<'a> = () where Gizmos<'w, 's, Config, Clear>: 'a

Source§

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

Source§

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

Source§

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

Source§

type Output<'a> = () where Gizmos<'w, 's, Config, Clear>: '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,

Source§

type Output<'a> = () where Gizmos<'w, 's, Config, Clear>: '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,

Source§

type Output<'a> = () where Gizmos<'w, 's, Config, Clear>: 'a