[−][src]Enum screen_13::gpu::draw::Draw
An expressive type which allows specification of individual drawing operations.
Variants
Line(LineCommand)Draws a line segment.
Model(ModelCommand)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]
start: S,
start_color: SC,
end: E,
end_color: EC
) -> Self
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]
mesh: M,
material: Material,
transform: Mat4
) -> Self
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]
color: Color,
lumens: f32,
position: Vec3,
normal: Vec3,
range: Range<f32>,
cone_angle: f32,
penumbra_angle: f32
) -> Self
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 frompostowards the spotlight target.range- Define the full-bright section alongnormal.cone_angle- Interior angle of the full-bright portion of the spotlight, in degrees.penumbra_angle- Additional angle which fades fromcolorto tranparent, in degrees.
Auto Trait Implementations
impl !RefUnwindSafe for Command[src]
impl !Send for Command[src]
impl !Sync for Command[src]
impl Unpin for Command[src]
impl !UnwindSafe for Command[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,