pub enum RenderCommand {
Clear {
color: Color,
},
DrawCircle {
x: f64,
y: f64,
radius: f64,
color: Color,
filled: bool,
},
DrawLine {
x1: f64,
y1: f64,
x2: f64,
y2: f64,
color: Color,
},
DrawOrbitPath {
points: Vec<(f64, f64)>,
color: Color,
},
DrawText {
x: f64,
y: f64,
text: String,
color: Color,
},
DrawVelocity {
x: f64,
y: f64,
vx: f64,
vy: f64,
scale: f64,
color: Color,
},
HighlightBody {
x: f64,
y: f64,
radius: f64,
color: Color,
},
SetCamera {
center_x: f64,
center_y: f64,
zoom: f64,
},
}Expand description
Platform-agnostic render command.
Variants§
Clear
Clear the screen.
DrawCircle
Draw a circle (body).
DrawLine
Draw a line.
DrawOrbitPath
Draw orbit path (series of points).
DrawText
Draw text label.
DrawVelocity
Draw velocity vector.
HighlightBody
Highlight a body (Jidoka warning).
SetCamera
Set camera view.
Trait Implementations§
Source§impl Clone for RenderCommand
impl Clone for RenderCommand
Source§fn clone(&self) -> RenderCommand
fn clone(&self) -> RenderCommand
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RenderCommand
impl Debug for RenderCommand
Source§impl<'de> Deserialize<'de> for RenderCommand
impl<'de> Deserialize<'de> for RenderCommand
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for RenderCommand
impl RefUnwindSafe for RenderCommand
impl Send for RenderCommand
impl Sync for RenderCommand
impl Unpin for RenderCommand
impl UnsafeUnpin for RenderCommand
impl UnwindSafe for RenderCommand
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more