[][src]Enum screen_13::gpu::draw::Draw

pub enum Draw {
    Line(LineCommand),
    Model(ModelCommand),
    PointLight(PointLightCommand),
    RectLight(RectLightCommand),
    Spotlight(SpotlightCommand),
    Sunlight(SunlightCommand),
}

An expressive type which allows specification of individual drawing operations.

Variants

Draws a line segment.

Draws a model.

PointLight(PointLightCommand)

Draws a point light.

RectLight(RectLightCommand)

Draws a rectangular light.

Spotlight(SpotlightCommand)

Draws a spotlight.

Sunlight(SunlightCommand)

Draws sunlight.

Implementations

impl Command[src]

pub fn line<S: Into<Vec3>, SC: Into<AlphaColor>, E: Into<Vec3>, EC: Into<AlphaColor>>(
    start: S,
    start_color: SC,
    end: E,
    end_color: EC
) -> Self
[src]

Draws a line between the given coordinates using a constant width and two colors. The colors specify a gradient if they differ. Generally intended to support debugging use cases such as drawing bounding boxes.

pub fn model<M: Into<Mesh>>(
    mesh: M,
    material: Material,
    transform: Mat4
) -> Self
[src]

Draws a model using the given material and world transform.

pub fn point_light(center: Vec3, color: Color, lumens: f32, radius: f32) -> Self[src]

Draws a point light using the given values.

pub fn spotlight(
    color: Color,
    lumens: f32,
    position: Vec3,
    normal: Vec3,
    range: Range<f32>,
    cone_angle: f32,
    penumbra_angle: f32
) -> Self
[src]

Draws a spotlight with the given color, position/orientation, and shape.

Note: Spotlights have a hemispherical cap on the bottom, so a given range will be the maximum range and you may not see any light on objects at that distance. Move the light a bit towards the object to enter the penumbra.

Arguments

  • color - Full-bright color of the cone area.
  • power - sRGB power value normalized for gamma, can be greater than 1.0.
  • pos - Position of the pointy end of the spotlight.
  • normal - Orientation of the spotlight from pos towards the spotlight target.
  • range - Define the full-bright section along normal.
  • cone_angle - Interior angle of the full-bright portion of the spotlight, in degrees.
  • penumbra_angle - Additional angle which fades from color to tranparent, in degrees.

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

impl<T> Pointable for T

type Init = T

The type for initializers.

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

type Output = T

Should always be Self

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.