Struct amethyst_renderer::Scene
[−]
pub struct Scene { /* fields omitted */ }
Collection of lights and meshes to render.
Methods
impl Scene
[src]
fn add_light<L: Into<Light>>(&mut self, light: L)
Adds a light source to the scene.
Example
let mut scene = Scene::default(); scene.add_light(PointLight::default());
fn add_model(&mut self, model: Model)
Adds a mesh to the scene.
fn add_camera<C: Into<Camera>>(&mut self, camera: C)
Adds a camera to the scene.
fn set_ambient_color(&mut self, color: Rgba)
Set ambient color for the scene
fn ambient_color(&self) -> Rgba
Get the ambient color for the scene
fn lights(&self) -> &[Light]
Get all lights on scene
fn par_iter_lights(&self) -> Iter<'l, Light>
Iterates through all stored lights in parallel.
fn par_chunks_lights(&self, count: usize) -> Chunks<'l, Light>
Iterates through all stored lights in parallel in chunks.
fn par_iter_models(&self) -> Iter<'l, Model>
Iterates through all stored models in parallel.
fn par_chunks_models(&self, count: usize) -> Chunks<'l, Model>
Iterates through all stored models in parallel in chunks.
fn active_camera(&self) -> Option<&Camera>
Returns the active camera in the scene.
TODO: Render to multiple viewports with possibly different cameras.
fn clear(&mut self)
Remove all objects from Scene
Trait Implementations
impl Clone for Scene
[src]
fn clone(&self) -> Scene
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more