pub struct Window { /* private fields */ }
Implementations
sourceimpl Window
impl Window
pub fn new(tile: &str) -> Self
pub fn update(&mut self) -> bool
pub fn run(&mut self, state: Rc<dyn StateEvent>)
pub fn scene(&self) -> &Scene
pub fn set_scene(&mut self, scene: Scene)
pub fn scene_mut(&mut self) -> &mut Scene
pub fn add_perspective_camera(
&mut self,
width: f32,
height: f32,
film_size: f32,
focal_length: f32
) -> Arc<RefCell<dyn Camera>>
pub fn add_orthographic_camera(
&mut self,
width: f32,
height: f32,
film_size: f32,
focal_length: f32
) -> Arc<RefCell<dyn Camera>>
pub fn add_point_light(&mut self) -> Arc<RefCell<dyn Light>>
pub fn add_spot_light(&mut self) -> Arc<RefCell<dyn Light>>
pub fn add_directional_light(&mut self) -> Arc<RefCell<dyn Light>>
pub fn add_sky_light(&mut self) -> Arc<RefCell<dyn Light>>
pub fn add_cube(&mut self, w: f32, h: f32, depth: f32) -> Arc<RefCell<dyn Shape>>
pub fn add_sphere(
&mut self,
radius: f32,
width_segments: u32,
height_segments: u32
) -> Arc<RefCell<dyn Shape>>
pub fn add_plane(
&mut self,
width: f32,
height: f32,
width_segments: u32,
height_segments: u32
) -> Arc<RefCell<dyn Shape>>
pub fn add_circle(
&mut self,
radius: f32,
segments: u32
) -> Arc<RefCell<dyn Shape>>
pub fn add_cone(
&mut self,
radius: f32,
height: f32,
segments: u32
) -> Arc<RefCell<dyn Shape>>
pub fn add_cylinder(
&mut self,
radius_top: f32,
radius_bottom: f32,
height: f32,
segments: u32
) -> Arc<RefCell<dyn Shape>>
pub fn add_fan(
&mut self,
radius_top: f32,
radius_bottom: f32,
segments: u32
) -> Arc<RefCell<dyn Shape>>
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Window
impl !Send for Window
impl !Sync for Window
impl Unpin for Window
impl !UnwindSafe for Window
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> SetParameter for T
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Resultwhere
T: Parameter<Self>,
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Resultwhere
T: Parameter<Self>,
Sets
value
as a parameter of self
.