pub struct Window {
pub viewport: Viewport,
/* private fields */
}Expand description
Terminal-based “window” that renders frames via SoftwareRenderer.
Renders a 3-D scene to an RGBA framebuffer then presents it either as
coloured ANSI art in the terminal (present_terminal) or drives a full
animation loop (run).
Fields§
§viewport: ViewportImplementations§
Source§impl Window
impl Window
pub fn new(viewport: Viewport) -> Self
pub fn with_terminal_dimensions(self, cols: usize, rows: usize) -> Self
Sourcepub fn render_scene(&mut self, scene: &Scene, camera: &Camera3D) -> FrameBuffer
pub fn render_scene(&mut self, scene: &Scene, camera: &Camera3D) -> FrameBuffer
Render the scene into the internal framebuffer and return a clone.
Sourcepub fn present_terminal(&mut self)
pub fn present_terminal(&mut self)
Present the last rendered frame to the terminal as ANSI art.
Auto Trait Implementations§
impl Freeze for Window
impl RefUnwindSafe for Window
impl Send for Window
impl Sync for Window
impl Unpin for Window
impl UnsafeUnpin for Window
impl UnwindSafe for Window
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