pub struct Scene {
pub cameras: Vec<Arc<RefCell<dyn Camera>>>,
pub shapes: Vec<Arc<RefCell<dyn Shape>>>,
pub lights: Vec<Arc<RefCell<dyn Light>>>,
}
Fields
cameras: Vec<Arc<RefCell<dyn Camera>>>
shapes: Vec<Arc<RefCell<dyn Shape>>>
lights: Vec<Arc<RefCell<dyn Light>>>
Implementations
sourceimpl Scene
impl Scene
pub fn new() -> Self
pub fn add_camera(&mut self, camera: Arc<RefCell<dyn Camera>>)
pub fn add_light(&mut self, light: Arc<RefCell<dyn Light>>)
pub fn add_shape(&mut self, shape: Arc<RefCell<dyn Shape>>)
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_sky_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_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>>
pub fn cameras(&self) -> &[Arc<RefCell<dyn Camera>>]
pub fn lights(&self) -> &[Arc<RefCell<dyn Light>>]
pub fn shapes(&self) -> &[Arc<RefCell<dyn Shape>>]
pub fn num_camera(&self) -> usize
pub fn num_light(&self) -> usize
pub fn num_shape(&self) -> usize
pub fn update(&mut self)
Auto Trait Implementations
impl !RefUnwindSafe for Scene
impl !Send for Scene
impl !Sync for Scene
impl Unpin for Scene
impl !UnwindSafe for Scene
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
.