Struct rin_scene::Scene [−][src]
pub struct Scene { /* fields omitted */ }
The scene is the container for everything else in mutiny
Through it you can create other elements like models, lights… or add systems that will update those elements over time
To create a scene you need to first create a renderer and an events dispatcher. The scene will take ownership of them and run them later.
Once you have a scene you can use it to create all the entities in the application and their components.
Implementations
impl Scene
[src]
impl Scene
[src]pub fn window(&self) -> ReadGuardRef<'_, Window>
[src]
pub fn window_mut(&self) -> WriteGuardRef<'_, Window>
[src]
pub fn gl_renderer(&self) -> ReadGuardRef<'_, Renderer<'static>>
[src]
pub fn gl_renderer_mut(&self) -> WriteGuardRef<'_, Renderer<'static>>
[src]
pub fn render_surface(&self) -> Option<ReadGuardRef<'_, ScreenRenderBuffer>>
[src]
pub fn viewport(&self) -> Rect<i32>
[src]
pub fn event_stream(&mut self) -> StreamRc<'static, Event>
[src]
pub fn priority_stream(&mut self, priority: usize) -> StreamRc<'static, Event>
[src]
pub fn set_non_attended(
&mut self,
priority: usize,
stream: StreamRc<'static, Event>
)
[src]
&mut self,
priority: usize,
stream: StreamRc<'static, Event>
)
pub fn send_stream<T: Clone + Debug + 'static>(
&self
) -> (Sender<T>, Stream<'static, T>)
[src]
&self
) -> (Sender<T>, Stream<'static, T>)
pub fn events(&self) -> WriteGuardRef<'_, EventsDispatcher>
[src]
pub fn set_camera<C: CameraExt + Send + 'static>(&mut self, camera: C)
[src]
Add a camera to the scene
Right now there can only be one camera in the scene and adding a new one will replace the old one
pub fn register_vertex_type<T>(&mut self) where
T: 'static + VertexFormat + Send + Clone + Copy + Debug,
[src]
T: 'static + VertexFormat + Send + Clone + Copy + Debug,
Explicitly register a vertex type
Vertex types are usually registered the first time we add a Geometry of that vertex type
to the scene using register_mesh
but in some special cases we might want to add geometries
directly to an entity. In those cases it’s necesary to call this method in order to register
the corresponding components and create the renderer systems that allow to render this type
of geometry
pub fn register_builder<'a, B: Builder<'a>>(&mut self)
[src]
Register a mutiny Builder
It’s only necesary to call this method if a builder type is to be used from a creation system
pub fn add<'a, B: Builder<'a>>(
&'a mut self,
settings: <B as Builder<'a>>::Settings
) -> B
[src]
&'a mut self,
settings: <B as Builder<'a>>::Settings
) -> B
Add an element to the scene through it’s Builder and settings
Some modules implement the Builder
trait and specify a settings struct
that allows to add them to the scene using this method.
For example to add load a blender file you can use:
scene.add::<mutiny::blender::Blender>() .load("file_path.blend") .unwrap();
pub fn add_model(&mut self, name: &str) -> ModelBuilder<'_>
[src]
Add a new model to the scene
This method returns a ModelBuilder that allows to set the geometry, transformation and other components of the model.
To add geometry and materials to the model they have to be registered in the scene first and the handle that we get when registering them is really what use to set that geometry or material to a model, instead of the geometry and material themselves
This allows renderers to optimize drawing by instancing models with the same geometry and to batch geometries with the same properties
pub fn add_child_model(
&mut self,
name: &str,
parent: Entity
) -> ModelBuilder<'_>
[src]
&mut self,
name: &str,
parent: Entity
) -> ModelBuilder<'_>
Add a new model to the scene, as child of an exisiting entity
This method returns a ModelBuilder that allows to set the geometry, transformation and other components of the model.
To add geometry and materials to the model they have to be registered in the scene first and the handle that we get when registering them is really what use to set that geometry or material to a model, instead of the geometry and material themselves
This allows renderers to optimize drawing by instancing models with the same geometry and to batch geometries with the same properties
The transformation of this model will be a child of the entity passed as parameter
pub fn add_empty(&mut self, name: &str) -> EmptyBuilder<'_>
[src]
Add an empty node to the scene
Other objects like models, lights… can be created as children of an empty
pub fn add_child_empty(
&mut self,
name: &str,
parent: Entity
) -> EmptyBuilder<'_>
[src]
&mut self,
name: &str,
parent: Entity
) -> EmptyBuilder<'_>
Add an empty node to the scene parented to another entity with a Transorfmation
Other objects like models, lights… can be created as children of an empty
pub fn register_mesh<T>(&mut self, geom: Mesh<T>) -> GeometryRef where
T: 'static + VertexFormat + Send + Clone + Copy + Debug,
[src]
T: 'static + VertexFormat + Send + Clone + Copy + Debug,
Adds a mesh to the system and returns a handle to the geometry
The returned GeometryRef can be used as geometry for models.
pub fn register_named_mesh<T>(
&mut self,
geom: Mesh<T>,
name: &str
) -> GeometryRef where
T: 'static + VertexFormat + Send + Clone + Copy + Debug,
[src]
&mut self,
geom: Mesh<T>,
name: &str
) -> GeometryRef where
T: 'static + VertexFormat + Send + Clone + Copy + Debug,
Adds a mesh with a name to the system and returns a handle to the geometry
The returned GeometryRef can be used as geometry for models.
Names are mostly useful for debugging and not considered an ID of the model
pub fn add_ambient_light(
&mut self,
diffuse: Rgb<f32, LinearRgb>,
specular: Rgb<f32, LinearRgb>
) -> Entity
[src]
&mut self,
diffuse: Rgb<f32, LinearRgb>,
specular: Rgb<f32, LinearRgb>
) -> Entity
Create an ambient light
pub fn add_directional_light<'a>(
&'a mut self,
name: &'a str
) -> DirectionalLightBuilder<'a, World>
[src]
&'a mut self,
name: &'a str
) -> DirectionalLightBuilder<'a, World>
Create a directional light
This method returns a builder object that allows to set different parameter in the light before creating it.
When done setting all the parameters call build on the builder to finally create the light
pub fn add_spot_light<'a>(
&'a mut self,
name: &'a str
) -> SpotLightBuilder<'a, World>
[src]
&'a mut self,
name: &'a str
) -> SpotLightBuilder<'a, World>
Create a spot light
This method returns a builder object that allows to set different parameter in the light before creating it.
When done setting all the parameters call build on the builder to finally create the light
pub fn add_point_light<'a>(
&'a mut self,
name: &'a str
) -> PointLightBuilder<'a, World>
[src]
&'a mut self,
name: &'a str
) -> PointLightBuilder<'a, World>
Create a point light
This method returns a builder object that allows to set different parameter in the light before creating it.
When done setting all the parameters call build on the builder to finally create the light
pub fn add_area_light<'a>(
&'a mut self,
name: &'a str
) -> AreaLightBuilder<'a, World>
[src]
&'a mut self,
name: &'a str
) -> AreaLightBuilder<'a, World>
Create a area light
This method returns a builder object that allows to set different parameter in the light before creating it.
When done setting all the parameters call build on the builder to finally create the light
pub fn add_image_based_light<'a>(
&'a mut self,
name: &'a str
) -> ImageBasedLightBuilder<'a, World>
[src]
&'a mut self,
name: &'a str
) -> ImageBasedLightBuilder<'a, World>
Create an imaged based light
This method returns a builder object that allows to set different parameter in the light before creating it.
When done setting all the parameters call build on the builder to finally create the light
pub fn update_all_transformations(&mut self)
[src]
Manually update the full hierarchy of objects in the scene
pub fn register_material<M: FullMaterial + 'static>(
&mut self,
name: &str,
material: M
) -> MaterialRef
[src]
&mut self,
name: &str,
material: M
) -> MaterialRef
Register a new material
Takes ownership of the passed material and returns a handle to it that can be used to set it as a model material
pub fn register_shadow_material<M: FullMaterial + 'static>(
&mut self,
name: &str,
material: M
) -> ShadowMaterialRef
[src]
&mut self,
name: &str,
material: M
) -> ShadowMaterialRef
Register a new material
Takes ownership of the passed material and returns a handle to it that can be used to set it as a model material
pub fn find_material(&self, name: &str) -> Option<MaterialRef>
[src]
Find a material by name if it exists
pub fn register_texture(&mut self, texture: Texture) -> TextureRef
[src]
Register a texture to be used when setting up materials
pub fn register_texture_from_data_format<T: 'static>(
&mut self,
format: LoadDataFormat,
creation_flags: TextureCreationFlags,
data: &[T]
) -> Result<TextureRef, Error>
[src]
&mut self,
format: LoadDataFormat,
creation_flags: TextureCreationFlags,
data: &[T]
) -> Result<TextureRef, Error>
Create a texture and register it from the image pixels and a format specification
pub fn register_cubemap(&mut self, cubemap: CubeMap) -> CubemapRef
[src]
pub fn register_named_cubemap(
&mut self,
name: &str,
cubemap: CubeMap
) -> CubemapRef
[src]
&mut self,
name: &str,
cubemap: CubeMap
) -> CubemapRef
pub fn register_image<I: Image + Clone>(
&mut self,
img: &I,
creation_flags: TextureCreationFlags
) -> Result<TextureRef, Error>
[src]
&mut self,
img: &I,
creation_flags: TextureCreationFlags
) -> Result<TextureRef, Error>
Create and register a texture from a loaded image
pub fn register_named_texture_from_data_format<T: 'static>(
&mut self,
name: &str,
creation_flags: TextureCreationFlags,
format: LoadDataFormat,
data: &[T]
) -> Result<TextureRef, Error>
[src]
&mut self,
name: &str,
creation_flags: TextureCreationFlags,
format: LoadDataFormat,
data: &[T]
) -> Result<TextureRef, Error>
Create a texture and register it with a name from the image pixels and a format specification
pub fn register_named_image<I: Image + Clone>(
&mut self,
name: &str,
img: &I,
creation_flags: TextureCreationFlags
) -> Result<TextureRef, Error>
[src]
&mut self,
name: &str,
img: &I,
creation_flags: TextureCreationFlags
) -> Result<TextureRef, Error>
Create and register a texture with a name from a loaded image
pub fn register_sampler(&mut self, sampler: Sampler) -> SamplerRef
[src]
Register a texture sampler (a texture + parameters of how it has to be used)
pub fn register_named_sampler(
&mut self,
name: &str,
sampler: Sampler
) -> SamplerRef
[src]
&mut self,
name: &str,
sampler: Sampler
) -> SamplerRef
Register a texture sampler with a name (a texture + parameters of how it has to be used)
pub fn find_texture(&self, name: &str) -> Option<TextureRef>
[src]
Find a texture by it’s name
pub fn find_cubemap(&self, name: &str) -> Option<CubemapRef>
[src]
Find a texture by it’s name
pub fn find_sampler(&self, name: &str) -> Option<SamplerRef>
[src]
Find a texture by it’s name
pub fn load_image<P>(
&mut self,
path: P,
flags: TextureCreationFlags
) -> Result<TextureRef> where
P: AsRef<Path>,
[src]
&mut self,
path: P,
flags: TextureCreationFlags
) -> Result<TextureRef> where
P: AsRef<Path>,
pub fn load_cubemap<P>(
&mut self,
path: P,
flags: TextureCreationFlags
) -> Result<CubemapRef> where
P: AsRef<Path>,
[src]
&mut self,
path: P,
flags: TextureCreationFlags
) -> Result<CubemapRef> where
P: AsRef<Path>,
pub fn load_equirectangular_cubemap<P>(
&mut self,
path: P,
flags: TextureCreationFlags,
color_format: ColorFormat
) -> Result<CubemapRef> where
P: AsRef<Path>,
[src]
&mut self,
path: P,
flags: TextureCreationFlags,
color_format: ColorFormat
) -> Result<CubemapRef> where
P: AsRef<Path>,
pub fn load_equirectangular_levels_cubemap<P>(
&mut self,
paths: &[P],
flags: TextureCreationFlags,
color_format: ColorFormat
) -> Result<CubemapRef> where
P: AsRef<Path>,
[src]
&mut self,
paths: &[P],
flags: TextureCreationFlags,
color_format: ColorFormat
) -> Result<CubemapRef> where
P: AsRef<Path>,
pub fn reset_clock(&mut self)
[src]
pub fn run_once(&mut self)
[src]
Run all the systems once
pub fn run_single_threaded(&mut self)
[src]
Run all the systems once without using multiple threads
pub fn run_multi_threaded(&mut self)
[src]
Run all the systems once in parallel when possible
pub fn resources(&self) -> Resources<'_>
[src]
Return the world resources
pub fn remove_resource<T: 'static>(&mut self) -> Option<T>
[src]
Remove a resource
pub fn add_resource<T: Send + 'static>(&mut self, resource: T)
[src]
Add a new resource
pub fn add_resource_thread_local<T: 'static>(&mut self, resource: T)
[src]
Add a new resource that can’t be sent across threads
pub fn resource<T: 'static>(&self) -> Option<ReadGuardRef<'_, T>>
[src]
Returs a specific resource if it exists
pub fn resource_mut<T: 'static>(&self) -> Option<WriteGuardRef<'_, T>>
[src]
Returs a specific resource for mutable access if it exists
pub fn resources_thread_local(&self) -> ResourcesThreadLocal<'_>
[src]
Returs a specific resource that can’t be sent across threads if it exists
pub fn entities_creation(&mut self) -> EntitiesCreation<'_>
[src]
pub fn resources_creation(&mut self) -> ResourcesCreation<'_>
[src]
pub fn debug_entities(&mut self) -> EntitiesDebug<'_>
[src]
pub fn add_system<S>(&mut self, system: S) -> &mut Scene where
S: System + 'static,
[src]
S: System + 'static,
Adds a Send
System
that will be run in the order it was added.
Send
systems will run in parallel with other Send
systems and
with thread local systems added in between barriers.
pub fn add_system_once<S>(&mut self, system: S) -> &mut Scene where
S: SystemOnce + 'static,
[src]
S: SystemOnce + 'static,
Adds a SendOnce
System
that will be run only once in the order it was added.
SendOnce
systems will run in parallel with other Send
systems and
with thread local systems added in between barriers.
pub fn add_system_thread_local<S>(&mut self, system: S) -> &mut Scene where
S: SystemThreadLocal + 'static,
[src]
S: SystemThreadLocal + 'static,
Adds a non Send
System
that will be run in the order it was added.
SystemThreadLocal will always run in the main thread but can run in parallel
with Send
systems.
pub fn add_system_once_thread_local<S>(&mut self, system: S) -> &mut Scene where
S: SystemOnceThreadLocal + 'static,
[src]
S: SystemOnceThreadLocal + 'static,
Adds a non Send
System
that will be run in the order it was added.
SystemThreadLocal will always run in the main thread but can run in parallel
with Send
systems.
pub fn add_creation_system<S>(&mut self, system: S) -> &mut Scene where
S: CreationSystem + 'static,
[src]
S: CreationSystem + 'static,
Adds a CreationSystem
that will be run in the order it was added.
CreationSystems run alone with no other system running in parallel.
pub fn add_debug_system<S>(&mut self, system: S) -> &mut Scene where
S: SystemDebug + 'static,
[src]
S: SystemDebug + 'static,
Adds a SystemDebug
that will be run in the order it was added.
SystemDebug run alone with no other system running in parallel.
pub fn add_system_with<S>(&mut self, system: S) -> SystemBuilder<'_, '_, S> where
S: System + 'static,
[src]
S: System + 'static,
Adds a Send
System
with a Builder that allows to set some of the system properties like
the name it’ll show up with in stats, or run conditions.
Send
systems will run in parallel with other Send
systems and
with thread local systems added in between barriers.
pub fn add_system_thread_local_with<S>(
&mut self,
system: S
) -> SystemBuilderThreadLocal<'_, '_, S> where
S: SystemThreadLocal + 'static,
[src]
&mut self,
system: S
) -> SystemBuilderThreadLocal<'_, '_, S> where
S: SystemThreadLocal + 'static,
Adds a SystemThreadLocal
with a Builder that allows to set some of the system properties
like the name it’ll show up with in stats, if it has gpu stats or it’s run conditions.
SystemThreadLocal will always run in the main thread but can run in parallel
with Send
systems.
pub fn add_creation_system_with<S>(
&mut self,
system: S
) -> SystemBuilderCreation<'_, '_, S> where
S: CreationSystem + 'static,
[src]
&mut self,
system: S
) -> SystemBuilderCreation<'_, '_, S> where
S: CreationSystem + 'static,
Adds a CreationSystem
with a Builder that allows to set some of the system properties
like the name it’ll show up with in stats, if it has gpu stats or it’s run conditions.
CreationSystems run alone with no other system running in parallel.
pub fn add_update_system<U>(&mut self, system: U) -> &mut Scene where
U: UpdateSystem + 'static,
[src]
U: UpdateSystem + 'static,
pub fn add_update_system_thread_local<U>(&mut self, system: U) -> &mut Scene where
U: UpdateSystemThreadLocal + 'static,
[src]
U: UpdateSystemThreadLocal + 'static,
pub fn add_events_system<S>(&mut self, system: S) -> &mut Scene where
S: EventsSystem + 'static,
[src]
S: EventsSystem + 'static,
pub fn add_events_system_thread_local<S>(&mut self, system: S) -> &mut Scene where
S: EventsSystemThreadLocal + 'static,
[src]
S: EventsSystemThreadLocal + 'static,
pub fn add_render_system<R>(&mut self, system: R) -> &mut Scene where
R: RenderSystem + 'static,
[src]
R: RenderSystem + 'static,
pub fn add_barrier<B: Barrier + 'static>(&mut self) -> &mut World
[src]
Delimits all the systems that will run in parallel.
Only systems between barriers (or creation and debug systems) will run in parallel with each other.
Barriers allow to create groups of systems that run in parallel
including thread local systems that run one by one in the main
thread but in parallel with Send
systems.
pub fn add_component_to<'a, C: ComponentSend>(
&mut self,
entity: &Entity,
component: C
) where
<C as Component>::Storage: Storage<'s, C>,
<<C as Component>::Storage as Storage<'a, C>>::Get: DebugParameter,
[src]
&mut self,
entity: &Entity,
component: C
) where
<C as Component>::Storage: Storage<'s, C>,
<<C as Component>::Storage as Storage<'a, C>>::Get: DebugParameter,
Adds a Send
Component
to an already existing Entity
.
pub fn add_component_to_thread_local<'a, C: ComponentThreadLocal>(
&mut self,
entity: &Entity,
component: C
) where
<C as Component>::Storage: Storage<'s, C>,
<<C as Component>::Storage as Storage<'a, C>>::Get: DebugParameter,
[src]
&mut self,
entity: &Entity,
component: C
) where
<C as Component>::Storage: Storage<'s, C>,
<<C as Component>::Storage as Storage<'a, C>>::Get: DebugParameter,
Adds a non Send
Component
to an already existing Entity
.
pub fn add_child_component_to<'a, C: ComponentSend>(
&mut self,
parent: &Entity,
entity: &Entity,
component: C
) where
<C as Component>::Storage: HierarchicalStorage<'b, C>,
<<C as Component>::Storage as Storage<'a, C>>::Get: DebugParameter,
[src]
&mut self,
parent: &Entity,
entity: &Entity,
component: C
) where
<C as Component>::Storage: HierarchicalStorage<'b, C>,
<<C as Component>::Storage as Storage<'a, C>>::Get: DebugParameter,
Adds a Send
Component
to an already existing Entity
.
pub fn add_child_component_to_thread_local<'a, C: ComponentThreadLocal>(
&mut self,
parent: &Entity,
entity: &Entity,
component: C
) where
<C as Component>::Storage: HierarchicalStorage<'b, C>,
<<C as Component>::Storage as Storage<'a, C>>::Get: DebugParameter,
[src]
&mut self,
parent: &Entity,
entity: &Entity,
component: C
) where
<C as Component>::Storage: HierarchicalStorage<'b, C>,
<<C as Component>::Storage as Storage<'a, C>>::Get: DebugParameter,
Adds a non Send
Component
to an already existing Entity
.
pub fn add_slice_component_to<'a, C, I>(
&mut self,
entity: &Entity,
component: I
) where
C: OneToNComponentSend,
<C as Component>::Storage: OneToNStorage<'s, C>,
<<C as Component>::Storage as Storage<'a, C>>::Get: DebugParameter,
I: IntoIterator<Item = C>,
[src]
&mut self,
entity: &Entity,
component: I
) where
C: OneToNComponentSend,
<C as Component>::Storage: OneToNStorage<'s, C>,
<<C as Component>::Storage as Storage<'a, C>>::Get: DebugParameter,
I: IntoIterator<Item = C>,
Adds a Send
OneToNComponent
to an already existing Entity
.
This allows to add a slice of components to an entity instead of only one component. This components are stored contiguously in memory for all the entities.
pub fn add_slice_component_to_thread_local<'a, C, I>(
&mut self,
entity: &Entity,
component: I
) where
C: OneToNComponentThreadLocal,
<C as Component>::Storage: OneToNStorage<'s, C>,
<<C as Component>::Storage as Storage<'a, C>>::Get: DebugParameter,
I: IntoIterator<Item = C>,
[src]
&mut self,
entity: &Entity,
component: I
) where
C: OneToNComponentThreadLocal,
<C as Component>::Storage: OneToNStorage<'s, C>,
<<C as Component>::Storage as Storage<'a, C>>::Get: DebugParameter,
I: IntoIterator<Item = C>,
Adds a non Send
OneToNComponent
to an already existing Entity
.
This allows to add a slice of components to an entity instead of only one component. This components are stored contiguously in memory for all the entities.
pub fn remove_component_from<'a, C: Component>(&mut self, entity: &Entity) where
<C as Component>::Storage: Storage<'s, C>,
<<C as Component>::Storage as Storage<'a, C>>::Get: DebugParameter,
[src]
<C as Component>::Storage: Storage<'s, C>,
<<C as Component>::Storage as Storage<'a, C>>::Get: DebugParameter,
Removes a compoenent of the specified type from an entity.
pub fn remove_entity(&mut self, entity: &Entity)
[src]
Removes an Entity
and all it’s compoenents.
pub fn entities(&mut self) -> Entities<'_>
[src]
Returns an Entities
object that allows to iterate over all the Send
components
of entities in this world.
pub fn entities_and_resources(&mut self) -> (Entities<'_>, Resources<'_>)
[src]
Returns an Entities
object that allows to iterate over all the Send
components
of entities in this world.
pub fn entities_thread_local(&mut self) -> EntitiesThreadLocal<'_>
[src]
Returns an EntitiesThreadLocal
object that allows to iterate over all the
Send
and non Send
components of entities in this world.
pub fn entities_and_resources_thread_local(
&mut self
) -> (EntitiesThreadLocal<'_>, ResourcesThreadLocal<'_>)
[src]
&mut self
) -> (EntitiesThreadLocal<'_>, ResourcesThreadLocal<'_>)
Returns an EntitiesThreadLocal
object that allows to iterate over all the
Send
and non Send
components of entities in this world.
pub fn component_for<C: Component>(&self, entity: &Entity) -> Option<Ptr<'_, C>> where
<C as Component>::Storage: Storage<'s, C>,
[src]
<C as Component>::Storage: Storage<'s, C>,
Returns a component for reading for the passed entity
let e1 = world.new_entity() .add(Position{x: 0., y: 0.}) .build(); let entities = world.entities(); let pos = entities.component_for::<Position>(&e1).unwrap();
pub fn component_for_mut<C: Component>(
&self,
entity: &Entity
) -> Option<PtrMut<'_, C>> where
<C as Component>::Storage: Storage<'s, C>,
[src]
&self,
entity: &Entity
) -> Option<PtrMut<'_, C>> where
<C as Component>::Storage: Storage<'s, C>,
Returns a component for writing for the passed entity
let e1 = world.new_entity() .add(Position{x: 0., y: 0.}) .build(); let entities = world.entities(); let mut pos = entities.component_for_mut::<Position>(&e1).unwrap();
pub fn storage_for<'r, S>(&'r self) -> Sto<'r, S> where
S: UnorderedData<'r> + ReadOnlyOp<'r>,
[src]
S: UnorderedData<'r> + ReadOnlyOp<'r>,
pub fn storage_for_mut<'r, S>(&'r mut self) -> Sto<'r, S> where
S: UnorderedData<'r>,
[src]
S: UnorderedData<'r>,
pub fn render_systems_dependency_graph<P: AsRef<Path>>(&mut self, file: P)
[src]
Trait Implementations
impl<'a> CreationContextExt<'a> for Scene
[src]
impl<'a> CreationContextExt<'a> for Scene
[src]fn with_entities_and_resources_creation<'e, F, R>(&'e mut self, f: F) -> R where
F: FnOnce(EntitiesCreation<'e>, ResourcesCreation<'e>) -> R,
[src]
F: FnOnce(EntitiesCreation<'e>, ResourcesCreation<'e>) -> R,
impl<'a> EntitiesCreationExt<'a> for Scene
[src]
impl<'a> EntitiesCreationExt<'a> for Scene
[src]fn new_entity(&mut self) -> EntityBuilder<'_>
[src]
fn creation_storage<C: Component>(&mut self) -> CreationSto<'_, C>
[src]
fn with_entities_creation<'e, F, R>(&'e mut self, f: F) -> R where
F: FnOnce(EntitiesCreation<'e>) -> R,
[src]
F: FnOnce(EntitiesCreation<'e>) -> R,
pub fn add_component_to<'r, C>(&mut self, entity: &Entity, component: C) where
C: ComponentSend,
<C as Component>::Storage: for<'s> Storage<'s, C>,
<<C as Component>::Storage as Storage<'r, C>>::Get: DebugParameter,
[src]
C: ComponentSend,
<C as Component>::Storage: for<'s> Storage<'s, C>,
<<C as Component>::Storage as Storage<'r, C>>::Get: DebugParameter,
pub fn add_component_to_thread_local<'r, C>(
&mut self,
entity: &Entity,
component: C
) where
C: ComponentThreadLocal,
<C as Component>::Storage: for<'s> Storage<'s, C>,
<<C as Component>::Storage as Storage<'r, C>>::Get: DebugParameter,
[src]
&mut self,
entity: &Entity,
component: C
) where
C: ComponentThreadLocal,
<C as Component>::Storage: for<'s> Storage<'s, C>,
<<C as Component>::Storage as Storage<'r, C>>::Get: DebugParameter,
pub fn add_tag_to<C>(&mut self, entity: &Entity) where
C: 'static,
[src]
C: 'static,
pub fn add_child_component_to<'r, C>(
&mut self,
parent: &Entity,
entity: &Entity,
component: C
) where
C: ComponentSend,
<C as Component>::Storage: for<'b> HierarchicalStorage<'b, C>,
<<C as Component>::Storage as Storage<'r, C>>::Get: DebugParameter,
[src]
&mut self,
parent: &Entity,
entity: &Entity,
component: C
) where
C: ComponentSend,
<C as Component>::Storage: for<'b> HierarchicalStorage<'b, C>,
<<C as Component>::Storage as Storage<'r, C>>::Get: DebugParameter,
pub fn add_child_component_to_thread_local<'r, C>(
&mut self,
parent: &Entity,
entity: &Entity,
component: C
) where
C: ComponentThreadLocal,
<C as Component>::Storage: for<'b> HierarchicalStorage<'b, C>,
<<C as Component>::Storage as Storage<'r, C>>::Get: DebugParameter,
[src]
&mut self,
parent: &Entity,
entity: &Entity,
component: C
) where
C: ComponentThreadLocal,
<C as Component>::Storage: for<'b> HierarchicalStorage<'b, C>,
<<C as Component>::Storage as Storage<'r, C>>::Get: DebugParameter,
pub fn add_slice_component_to<'r, C, I>(
&mut self,
entity: &Entity,
component: I
) where
C: OneToNComponentSend,
I: IntoIterator<Item = C>,
<C as Component>::Storage: for<'s> OneToNStorage<'s, C>,
<<C as Component>::Storage as Storage<'r, C>>::Get: DebugParameter,
[src]
&mut self,
entity: &Entity,
component: I
) where
C: OneToNComponentSend,
I: IntoIterator<Item = C>,
<C as Component>::Storage: for<'s> OneToNStorage<'s, C>,
<<C as Component>::Storage as Storage<'r, C>>::Get: DebugParameter,
pub fn add_slice_component_to_thread_local<'r, C, I>(
&mut self,
entity: &Entity,
component: I
) where
C: OneToNComponentThreadLocal,
I: IntoIterator<Item = C>,
<C as Component>::Storage: for<'s> OneToNStorage<'s, C>,
<<C as Component>::Storage as Storage<'r, C>>::Get: DebugParameter,
[src]
&mut self,
entity: &Entity,
component: I
) where
C: OneToNComponentThreadLocal,
I: IntoIterator<Item = C>,
<C as Component>::Storage: for<'s> OneToNStorage<'s, C>,
<<C as Component>::Storage as Storage<'r, C>>::Get: DebugParameter,
pub fn remove_component_from<'r, C>(&mut self, entity: &Entity) where
C: Component,
<C as Component>::Storage: for<'s> Storage<'s, C>,
<<C as Component>::Storage as Storage<'r, C>>::Get: DebugParameter,
[src]
C: Component,
<C as Component>::Storage: for<'s> Storage<'s, C>,
<<C as Component>::Storage as Storage<'r, C>>::Get: DebugParameter,
pub fn remove_entity(&mut self, entity: &Entity)
[src]
impl<'a> EntitiesExt<'a> for Scene
[src]
impl<'a> EntitiesExt<'a> for Scene
[src]fn iter_for<'e, S: UnorderedDataSend<'e> + ReadOnlyOp<'e>>(
&'e self
) -> <S as UnorderedData<'e>>::Iter
[src]
&'e self
) -> <S as UnorderedData<'e>>::Iter
fn iter_for_mut<'e, S: UnorderedDataSend<'e>>(
&'e mut self
) -> <S as UnorderedData<'e>>::IterMut
[src]
&'e mut self
) -> <S as UnorderedData<'e>>::IterMut
fn ordered_iter_for<'e, S: OrderedDataSend<'e> + ReadOnlyOrderedOp<'e>>(
&'e self
) -> <S as OrderedData<'e>>::Iter
[src]
&'e self
) -> <S as OrderedData<'e>>::Iter
fn ordered_iter_for_mut<'e, S: OrderedDataSend<'e>>(
&'e mut self
) -> <S as OrderedData<'e>>::Iter
[src]
&'e mut self
) -> <S as OrderedData<'e>>::Iter
fn iter_for_entities<'e, U, E>(&'e self, entities: E) -> E::IntoEntitiesIter where
E: IntoEntitiesIterator<'e, U::Storage>,
U: UnorderedDataSend<'e>,
U::Storage: ReadOnlyStorage,
[src]
E: IntoEntitiesIterator<'e, U::Storage>,
U: UnorderedDataSend<'e>,
U::Storage: ReadOnlyStorage,
fn iter_for_entities_mut<'e, U, E>(
&'e mut self,
entities: E
) -> E::IntoEntitiesIterMut where
E: IntoEntitiesIterator<'e, U::Storage>,
U: UnorderedDataSend<'e>,
[src]
&'e mut self,
entities: E
) -> E::IntoEntitiesIterMut where
E: IntoEntitiesIterator<'e, U::Storage>,
U: UnorderedDataSend<'e>,
fn iter_for_entities_opt<'e, U, E>(
&'e self,
entities: E
) -> E::IntoEntitiesOptIter where
E: IntoEntitiesIterator<'e, U::Storage>,
U: UnorderedDataSend<'e>,
U::Storage: ReadOnlyStorage,
[src]
&'e self,
entities: E
) -> E::IntoEntitiesOptIter where
E: IntoEntitiesIterator<'e, U::Storage>,
U: UnorderedDataSend<'e>,
U::Storage: ReadOnlyStorage,
fn iter_for_entities_opt_mut<'e, U, E>(
&'e mut self,
entities: E
) -> E::IntoEntitiesOptIterMut where
E: IntoEntitiesIterator<'e, U::Storage>,
U: UnorderedDataSend<'e>,
[src]
&'e mut self,
entities: E
) -> E::IntoEntitiesOptIterMut where
E: IntoEntitiesIterator<'e, U::Storage>,
U: UnorderedDataSend<'e>,
fn entity_components<'r, S>(
&'r self,
entity: &Entity
) -> Option<<S as UnorderedData<'r>>::ComponentsRef> where
S: UnorderedDataSend<'r> + ReadOnlyOp<'r> + 'r,
S::Storage: StorageRef<'r, Component = S::ComponentsRef>,
[src]
&'r self,
entity: &Entity
) -> Option<<S as UnorderedData<'r>>::ComponentsRef> where
S: UnorderedDataSend<'r> + ReadOnlyOp<'r> + 'r,
S::Storage: StorageRef<'r, Component = S::ComponentsRef>,
fn entity_components_mut<'r, S>(
&'r mut self,
entity: &Entity
) -> Option<<S as UnorderedData<'r>>::ComponentsRef> where
S: UnorderedDataSend<'r> + 'r,
S::Storage: StorageRef<'r, Component = S::ComponentsRef>,
[src]
&'r mut self,
entity: &Entity
) -> Option<<S as UnorderedData<'r>>::ComponentsRef> where
S: UnorderedDataSend<'r> + 'r,
S::Storage: StorageRef<'r, Component = S::ComponentsRef>,
fn component_for<C: ComponentSend>(&self, entity: &Entity) -> Option<Ptr<'_, C>> where
<C as Component>::Storage: Storage<'s, C>,
[src]
<C as Component>::Storage: Storage<'s, C>,
fn component_for_mut<C: ComponentSend>(
&self,
entity: &Entity
) -> Option<PtrMut<'_, C>> where
<C as Component>::Storage: Storage<'s, C>,
[src]
&self,
entity: &Entity
) -> Option<PtrMut<'_, C>> where
<C as Component>::Storage: Storage<'s, C>,
fn has_component<C: 'static>(&self, entity: &Entity) -> bool
[src]
fn tree_node_for<C: ComponentSend>(
&self,
entity: &Entity
) -> Option<NodePtr<'_, C>> where
<C as Component>::Storage: HierarchicalStorage<'b, C>,
[src]
&self,
entity: &Entity
) -> Option<NodePtr<'_, C>> where
<C as Component>::Storage: HierarchicalStorage<'b, C>,
fn tree_node_for_mut<C: ComponentSend>(
&self,
entity: &Entity
) -> Option<NodePtrMut<'_, C>> where
<C as Component>::Storage: HierarchicalStorage<'b, C>,
[src]
&self,
entity: &Entity
) -> Option<NodePtrMut<'_, C>> where
<C as Component>::Storage: HierarchicalStorage<'b, C>,
fn changed_iter_for<'r, S>(
&'r self
) -> EntitiesComponentIter<'r, S::ChangedIter, <S as UnorderedData<'r>>::Storage> where
S: ChangedDataSend<'r> + EntitiesData + ReadOnlyOp<'r> + 'r,
<S as UnorderedData<'r>>::Storage: StorageRef<'r>,
[src]
&'r self
) -> EntitiesComponentIter<'r, S::ChangedIter, <S as UnorderedData<'r>>::Storage> where
S: ChangedDataSend<'r> + EntitiesData + ReadOnlyOp<'r> + 'r,
<S as UnorderedData<'r>>::Storage: StorageRef<'r>,
fn changed_iter_for_mut<'r, S>(
&'r mut self
) -> EntitiesComponentIter<'r, S::ChangedIter, <S as UnorderedData<'r>>::Storage> where
S: ChangedDataSend<'r> + EntitiesData + 'r,
<S as UnorderedData<'r>>::Storage: StorageRef<'r>,
[src]
&'r mut self
) -> EntitiesComponentIter<'r, S::ChangedIter, <S as UnorderedData<'r>>::Storage> where
S: ChangedDataSend<'r> + EntitiesData + 'r,
<S as UnorderedData<'r>>::Storage: StorageRef<'r>,
fn storage_for<'e, S: UnorderedDataSend<'e> + ReadOnlyOp<'e>>(
&'e self
) -> Sto<'e, S>
[src]
&'e self
) -> Sto<'e, S>
fn storage_for_mut<'e, S>(&'e mut self) -> Sto<'e, S> where
S: UnorderedDataSend<'e>,
[src]
S: UnorderedDataSend<'e>,
impl ResourcesCreationExt for Scene
[src]
impl ResourcesCreationExt for Scene
[src]fn with_resources_creation<F, R>(&mut self, f: F) -> R where
F: FnOnce(ResourcesCreation<'_>) -> R,
[src]
F: FnOnce(ResourcesCreation<'_>) -> R,
pub fn add_resource<T>(&mut self, resource: T) where
T: 'static + Send,
[src]
T: 'static + Send,
pub fn remove_resource<T>(&mut self) -> Option<T> where
T: 'static,
[src]
T: 'static,
pub fn add_resource_thread_local<T>(&mut self, resource: T) where
T: 'static,
[src]
T: 'static,
pub fn add_resource_as_trait<T, U, F, FMut>(&mut self, resource: (T, F, FMut)) where
T: 'static + Send,
F: Fn(&T) -> &U + 'static,
U: 'static + Send + ?Sized,
FMut: Fn(&mut T) -> &mut U + 'static,
[src]
T: 'static + Send,
F: Fn(&T) -> &U + 'static,
U: 'static + Send + ?Sized,
FMut: Fn(&mut T) -> &mut U + 'static,
pub fn add_resource_as_trait_thread_local<T, U, F, FMut>(
&mut self,
resource: (T, F, FMut)
) where
T: 'static,
F: Fn(&T) -> &U + 'static,
U: 'static + ?Sized,
FMut: Fn(&mut T) -> &mut U + 'static,
[src]
&mut self,
resource: (T, F, FMut)
) where
T: 'static,
F: Fn(&T) -> &U + 'static,
U: 'static + ?Sized,
FMut: Fn(&mut T) -> &mut U + 'static,
impl ResourcesExt for Scene
[src]
impl ResourcesExt for Scene
[src]fn resource<T: 'static + Send>(&self) -> Option<ReadGuardRef<'_, T>>
[src]
fn resource_mut<T: 'static + Send>(&self) -> Option<WriteGuardRef<'_, T>>
[src]
fn resource_as_trait<T: 'static + Send + ?Sized>(
&self
) -> Option<ReadGuardRef<'_, T>>
[src]
&self
) -> Option<ReadGuardRef<'_, T>>
fn resource_as_trait_mut<T: 'static + Send + ?Sized>(
&self
) -> Option<WriteGuardRef<'_, T>>
[src]
&self
) -> Option<WriteGuardRef<'_, T>>
impl ResourcesThreadLocalExt for Scene
[src]
impl ResourcesThreadLocalExt for Scene
[src]fn resource_thread_local<T: 'static>(&self) -> Option<ReadGuardRef<'_, T>>
[src]
fn resource_thread_local_mut<T: 'static>(&self) -> Option<WriteGuardRef<'_, T>>
[src]
fn resource_as_trait_thread_local<T: 'static + ?Sized>(
&self
) -> Option<ReadGuardRef<'_, T>>
[src]
&self
) -> Option<ReadGuardRef<'_, T>>
fn resource_as_trait_thread_local_mut<T: 'static + ?Sized>(
&self
) -> Option<WriteGuardRef<'_, T>>
[src]
&self
) -> Option<WriteGuardRef<'_, T>>
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
impl<'a, C> CreationContext<'a> for C where
C: CreationContextExt<'a> + EntitiesExt<'a> + ResourcesExt + ResourcesThreadLocalExt,
[src]
impl<'a, C> CreationContext<'a> for C where
C: CreationContextExt<'a> + EntitiesExt<'a> + ResourcesExt + ResourcesThreadLocalExt,
[src]pub fn add<'e, B>(&'e mut Self, <B as Builder<'e>>::Settings) -> B where
B: Builder<'e>,
[src]
B: Builder<'e>,
pub fn add_model(&mut Self, &str) -> ModelBuilder<'_>
[src]
pub fn add_child_model(&mut Self, &str, Entity) -> ModelBuilder<'_>
[src]
pub fn add_empty(&mut Self, &str) -> EmptyBuilder<'_>
[src]
pub fn add_child_empty(&mut Self, &str, Entity) -> EmptyBuilder<'_>
[src]
pub fn register_mesh<T>(&mut Self, Mesh<T>) -> GeometryRef where
T: 'static + VertexFormat + Send + Clone + Copy + Debug,
[src]
T: 'static + VertexFormat + Send + Clone + Copy + Debug,
pub fn register_named_mesh<T>(&mut Self, Mesh<T>, &str) -> GeometryRef where
T: 'static + VertexFormat + Send + Clone + Copy + Debug,
[src]
T: 'static + VertexFormat + Send + Clone + Copy + Debug,
pub fn add_ambient_light(
&mut Self,
Rgb<f32, LinearRgb>,
Rgb<f32, LinearRgb>
) -> Entity
[src]
&mut Self,
Rgb<f32, LinearRgb>,
Rgb<f32, LinearRgb>
) -> Entity
pub fn add_directional_light(
&'e mut Self,
&'e str
) -> DirectionalLightBuilder<'e, C>
[src]
&'e mut Self,
&'e str
) -> DirectionalLightBuilder<'e, C>
pub fn add_area_light(&'e mut Self, &'e str) -> AreaLightBuilder<'e, C>
[src]
pub fn add_spot_light(&'e mut Self, &'e str) -> SpotLightBuilder<'e, C>
[src]
pub fn add_point_light(&'e mut Self, &'e str) -> PointLightBuilder<'e, C>
[src]
pub fn update_all_transformations(&mut Self)
[src]
pub fn add_image_based_light(
&'e mut Self,
&'e str
) -> ImageBasedLightBuilder<'e, C>
[src]
&'e mut Self,
&'e str
) -> ImageBasedLightBuilder<'e, C>
pub fn register_material<M>(&mut Self, &str, M) -> MaterialRef where
M: 'static + FullMaterial,
[src]
M: 'static + FullMaterial,
pub fn register_shadow_material<M>(&mut Self, &str, M) -> ShadowMaterialRef where
M: 'static + FullMaterial,
[src]
M: 'static + FullMaterial,
pub fn find_material(&Self, &str) -> Option<MaterialRef>
[src]
pub fn register_texture(&mut Self, Texture) -> TextureRef
[src]
pub fn register_texture_from_data_format<T>(
&mut Self,
LoadDataFormat,
TextureCreationFlags,
&[T]
) -> Result<TextureRef, Error> where
T: 'static,
[src]
&mut Self,
LoadDataFormat,
TextureCreationFlags,
&[T]
) -> Result<TextureRef, Error> where
T: 'static,
pub fn register_image<I>(
&mut Self,
&I,
TextureCreationFlags
) -> Result<TextureRef, Error> where
I: Image + Clone,
[src]
&mut Self,
&I,
TextureCreationFlags
) -> Result<TextureRef, Error> where
I: Image + Clone,
pub fn register_named_texture_from_data_format<T>(
&mut Self,
&str,
LoadDataFormat,
TextureCreationFlags,
&[T]
) -> Result<TextureRef, Error> where
T: 'static,
[src]
&mut Self,
&str,
LoadDataFormat,
TextureCreationFlags,
&[T]
) -> Result<TextureRef, Error> where
T: 'static,
pub fn register_named_image<I>(
&mut Self,
&str,
&I,
TextureCreationFlags
) -> Result<TextureRef, Error> where
I: Image + Clone,
[src]
&mut Self,
&str,
&I,
TextureCreationFlags
) -> Result<TextureRef, Error> where
I: Image + Clone,
pub fn register_sampler(&mut Self, Sampler) -> SamplerRef
[src]
pub fn register_named_sampler(&mut Self, &str, Sampler) -> SamplerRef
[src]
pub fn register_cubemap(&mut Self, CubeMap) -> CubemapRef
[src]
pub fn register_named_cubemap(&mut Self, &str, CubeMap) -> CubemapRef
[src]
pub fn find_named_texture(&Self, &str) -> Option<TextureRef>
[src]
pub fn find_named_cubemap(&Self, &str) -> Option<CubemapRef>
[src]
pub fn find_named_sampler(&Self, &str) -> Option<SamplerRef>
[src]
pub fn load_image<P>(
&mut Self,
P,
TextureCreationFlags
) -> Result<TextureRef, Error> where
P: AsRef<Path>,
[src]
&mut Self,
P,
TextureCreationFlags
) -> Result<TextureRef, Error> where
P: AsRef<Path>,
pub fn load_cubemap<P>(
&mut Self,
P,
TextureCreationFlags
) -> Result<CubemapRef, Error> where
P: AsRef<Path>,
[src]
&mut Self,
P,
TextureCreationFlags
) -> Result<CubemapRef, Error> where
P: AsRef<Path>,
pub fn load_equirectangular_cubemap<P>(
&mut Self,
P,
TextureCreationFlags,
ColorFormat
) -> Result<CubemapRef, Error> where
P: AsRef<Path>,
[src]
&mut Self,
P,
TextureCreationFlags,
ColorFormat
) -> Result<CubemapRef, Error> where
P: AsRef<Path>,
pub fn load_equirectangular_levels_cubemap<P>(
&mut Self,
&[P],
TextureCreationFlags,
ColorFormat
) -> Result<CubemapRef, Error> where
P: AsRef<Path>,
[src]
&mut Self,
&[P],
TextureCreationFlags,
ColorFormat
) -> Result<CubemapRef, Error> where
P: AsRef<Path>,
pub fn register_vertex_type<T>(&mut Self) where
T: 'static + VertexFormat + Send + Clone + Copy + Debug,
[src]
T: 'static + VertexFormat + Send + Clone + Copy + Debug,
impl<'a, C> PathFollowerBuilderExt<C> for C where
C: CreationContext<'a>,
[src]
impl<'a, C> PathFollowerBuilderExt<C> for C where
C: CreationContext<'a>,
[src]pub fn add_path_follower(&mut Self, &Entity) -> PathFollowerBuilder<'_, C>
[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]pub fn to_subset(&self) -> Option<SS>
[src]
pub fn is_in_subset(&self) -> bool
[src]
pub fn to_subset_unchecked(&self) -> SS
[src]
pub fn from_subset(element: &SS) -> SP
[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]