[][src]Struct amethyst_rendy::debug_drawing::DebugLinesComponent

pub struct DebugLinesComponent { /* fields omitted */ }

Component that stores persistent debug lines to be rendered in DebugLinesPass draw pass. The vector can only be cleared manually.

Methods

impl DebugLinesComponent[src]

pub fn new() -> DebugLinesComponent[src]

Creates a new debug lines component with an empty DebugLine vector.

pub fn with_capacity(capacity: usize) -> Self[src]

Builder method to pre-allocate a number of lines.

pub fn add_direction(
    &mut self,
    position: Point3<f32>,
    direction: Vector3<f32>,
    color: Srgba
)
[src]

Adds a line to be rendered by giving a position and a direction.

pub fn add_line(&mut self, start: Point3<f32>, end: Point3<f32>, color: Srgba)[src]

Adds a line to be rendered by giving a start and an end position.

pub fn add_gradient_line(
    &mut self,
    start: Point3<f32>,
    end: Point3<f32>,
    start_color: Srgba,
    end_color: Srgba
)
[src]

Adds a line to be rendered by giving a start and an end position with separate start and end colors.

pub fn add_rectangle_2d(
    &mut self,
    min: Point2<f32>,
    max: Point2<f32>,
    z: f32,
    color: Srgba
)
[src]

Adds multiple lines that form a rectangle to be rendered by giving a Z coordinate, a min and a max position.

This rectangle is aligned to the XY plane.

pub fn add_rotated_rectangle(
    &mut self,
    min: Point2<f32>,
    max: Point2<f32>,
    z: f32,
    rotation: UnitQuaternion<f32>,
    color: Srgba
)
[src]

Adds multiple lines that form a rotated rectangle to be rendered by giving a Z coordinate, a rotation, a min and a max position.

pub fn add_box(&mut self, min: Point3<f32>, max: Point3<f32>, color: Srgba)[src]

Adds multiple lines that form a box to be rendered by giving a min and a max position.

This box is an axis aligned box.

pub fn add_rotated_box(
    &mut self,
    min: Point3<f32>,
    max: Point3<f32>,
    rotation: UnitQuaternion<f32>,
    color: Srgba
)
[src]

Adds multiple lines that form a rotated box to be rendered by giving a rotation, a min and a max position.

pub fn add_circle_2d(
    &mut self,
    center: Point3<f32>,
    radius: f32,
    points: u32,
    color: Srgba
)
[src]

Adds multiple lines that form a circle to be rendered by giving a center, a radius and an amount of points.

This circle is aligned to the XY plane.

pub fn add_rotated_circle(
    &mut self,
    center: Point3<f32>,
    radius: f32,
    points: u32,
    rotation: UnitQuaternion<f32>,
    color: Srgba
)
[src]

Adds multiple lines that form a rotated circle to be rendered by giving a center, a radius, an amount of points and a rotation.

pub fn add_sphere(
    &mut self,
    center: Point3<f32>,
    radius: f32,
    horizontal_points: u32,
    vertical_points: u32,
    color: Srgba
)
[src]

Adds multiple lines that form a sphere to be rendered by giving a center, a radius, an amount of vertical points and an amount of horizontal points.

pub fn add_cylinder(
    &mut self,
    center: Point3<f32>,
    radius: f32,
    height: f32,
    points: u32,
    color: Srgba
)
[src]

Adds multiple lines that form a cylinder to be rendered by giving a center, a radius, a height and an amount of points.

This cylinder is aligned to the y axis.

pub fn add_rotated_cylinder(
    &mut self,
    center: Point3<f32>,
    radius: f32,
    height: f32,
    points: u32,
    rotation: UnitQuaternion<f32>,
    color: Srgba
)
[src]

Adds multiple lines that form a rotated cylinder to be rendered by giving a center, a radius, a height, an amount of points and a rotation.

pub fn clear(&mut self)[src]

Clears lines buffer.

As lines are persistent, it's necessary to use this function for updating or deleting lines.

Trait Implementations

impl Default for DebugLinesComponent[src]

impl Debug for DebugLinesComponent[src]

impl Component for DebugLinesComponent[src]

type Storage = DenseVecStorage<Self>

Associated storage type for this component.

Auto Trait Implementations

impl Unpin for DebugLinesComponent

impl Sync for DebugLinesComponent

impl Send for DebugLinesComponent

impl UnwindSafe for DebugLinesComponent

impl RefUnwindSafe for DebugLinesComponent

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
    D: AdaptFrom<S, Swp, Dwp, T>,
    Dwp: WhitePoint,
    Swp: WhitePoint,
    T: Component + Float
[src]

fn adapt_into(self) -> D[src]

Convert the source color to the destination color using the bradford method by default Read more

impl<T> SetParameter for T[src]

fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
    T: Parameter<Self>, 
[src]

Sets value as a parameter of self.

impl<T> Supports<T> for T[src]

impl<T> Erased for T[src]

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[src]

impl<T> Resource for T where
    T: Any + Send + Sync
[src]

impl<T> Any for T where
    T: Any
[src]

impl<T> TryDefault for T where
    T: Default
[src]

fn unwrap_default() -> Self[src]

Calls try_default and panics on an error case.

impl<T> Event for T where
    T: Send + Sync + 'static, 
[src]