pub type RunningState = State<InnerGraphicalState>;
Expand description
Holds the application state. Starting point to add visualization datas.
Aliased Type§
pub struct RunningState(/* private fields */);
Implementations§
Source§impl RunningState
impl RunningState
Sourcepub fn resize_scene(&mut self)
pub fn resize_scene(&mut self)
Fit camera and ground to match the visible shapes
Sourcepub fn screenshot(&mut self)
pub fn screenshot(&mut self)
Take a screenshot of the scene. The screenshot is then
saved on disk under the name screenshot_[nnn].png
, with
nnn
incrementing each time.
Sourcepub fn screenshot_to_buffer(&mut self) -> Result<Vec<u8>, ()>
pub fn screenshot_to_buffer(&mut self) -> Result<Vec<u8>, ()>
Take a screenshot of the scene. The screenshot is then
returned as a vector oy bytes, each storing r
g
b
a
(in order) values of each pixel.
Should not fail, unless internal buffer storage is messed up.
Sourcepub fn get_picked(&self) -> &Option<(String, Picked)>
pub fn get_picked(&self) -> &Option<(String, Picked)>
Get current selected object: first the name, then index i
and type of the selected element