Struct VizScene
#[non_exhaustive]pub struct VizScene {
pub viewport: Viewport,
pub camera: Camera,
pub f3d_render_data: Option<F3DRenderData>,
pub elements: Vec<Element>,
}
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.viewport: Viewport
§camera: Camera
§f3d_render_data: Option<F3DRenderData>
§elements: Vec<Element>
Implementations§
§impl VizScene
impl VizScene
pub fn new() -> VizScene
pub fn set_viewport_logical(&mut self, rect: Rect2)
pub fn set_viewport_logical(&mut self, rect: Rect2)
Sets the position and size of the viewport on the window, in logical pixels (physical / scale_factor).
If this is not called, then by default the viewport will take up the entire window.
pub fn set_camera(&mut self, camera: Camera)
pub fn set_camera(&mut self, camera: Camera)
Sets the camera, which determines the projection and view matrices.
If this is not called, then by default the camera is orthographic with
bounds (-1, -1, -1)
to (1, 1, 1)
, looking down the negative z axis.
pub fn set_f3d_render_data(&mut self, f3d_render_data: F3DRenderData)
pub fn add(&mut self, element: impl Into<Element>)
Trait Implementations§
impl StructuralPartialEq for VizScene
Auto Trait Implementations§
impl Freeze for VizScene
impl RefUnwindSafe for VizScene
impl Send for VizScene
impl Sync for VizScene
impl Unpin for VizScene
impl UnwindSafe for VizScene
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