Struct fyrox::scene::SceneRenderingOptions
source · pub struct SceneRenderingOptions {
pub render_target: Option<Resource<Texture>>,
pub clear_color: Option<Color>,
pub polygon_rasterization_mode: PolygonFillMode,
pub ambient_lighting_color: Color,
}
Expand description
Rendering options of a scene. It allows you to specify a render target to render the scene to, change its clear color, etc.
Fields§
§render_target: Option<Resource<Texture>>
A texture to draw the scene to. If empty, then the scene will be drawn on screen directly. It is useful to “embed” some scene into other by drawing a quad with this texture. This can be used to make in-game video conference - you can make separate scene with your characters and draw scene into a texture, then in the main scene you can attach this texture to some quad which will be used as a monitor. Other usage could be a previewer of models, like a pictogram of character in real-time strategies, in other words there are plenty of possible uses.
clear_color: Option<Color>
Default color of the render target. Default is None
, which forces the renderer to use clear color of the back buffer.
Could be set to transparent to make background transparent.
polygon_rasterization_mode: PolygonFillMode
Defines how polygons of the scene will be rasterized. By default it set to PolygonFillMode::Fill
,
PolygonFillMode::Line
could be used to render the scene in wireframe mode.
ambient_lighting_color: Color
Color of the ambient lighting.
Implementations§
source§impl SceneRenderingOptions
impl SceneRenderingOptions
pub const RENDER_TARGET: &'static str = "render_target"
pub const CLEAR_COLOR: &'static str = "clear_color"
pub const POLYGON_RASTERIZATION_MODE: &'static str = "polygon_rasterization_mode"
pub const AMBIENT_LIGHTING_COLOR: &'static str = "ambient_lighting_color"
Trait Implementations§
source§impl Clone for SceneRenderingOptions
impl Clone for SceneRenderingOptions
source§fn clone(&self) -> SceneRenderingOptions
fn clone(&self) -> SceneRenderingOptions
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for SceneRenderingOptions
impl Debug for SceneRenderingOptions
source§impl Default for SceneRenderingOptions
impl Default for SceneRenderingOptions
source§fn default() -> SceneRenderingOptions
fn default() -> SceneRenderingOptions
source§impl PartialEq for SceneRenderingOptions
impl PartialEq for SceneRenderingOptions
source§fn eq(&self, other: &SceneRenderingOptions) -> bool
fn eq(&self, other: &SceneRenderingOptions) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Reflect for SceneRenderingOptions
impl Reflect for SceneRenderingOptions
fn source_path() -> &'static str
fn type_name(&self) -> &'static str
fn doc(&self) -> &'static str
source§fn assembly_name(&self) -> &'static str
fn assembly_name(&self) -> &'static str
#[derive(Reflect)]
) to ensure that this method will return correct assembly
name. In other words - there’s no guarantee, that any implementation other than proc-macro
will return a correct name of the assembly. Alternatively, you can use env!("CARGO_PKG_NAME")
as an implementation.source§fn type_assembly_name() -> &'static str
fn type_assembly_name() -> &'static str
#[derive(Reflect)]
) to ensure that this method will return correct assembly
name. In other words - there’s no guarantee, that any implementation other than proc-macro
will return a correct name of the assembly. Alternatively, you can use env!("CARGO_PKG_NAME")
as an implementation.fn fields_info(&self, func: &mut dyn FnMut(&[FieldInfo<'_, '_>]))
fn into_any(self: Box<SceneRenderingOptions>) -> Box<dyn Any>
fn set( &mut self, value: Box<dyn Reflect> ) -> Result<Box<dyn Reflect>, Box<dyn Reflect>>
fn as_any(&self, func: &mut dyn FnMut(&(dyn Any + 'static)))
fn as_any_mut(&mut self, func: &mut dyn FnMut(&mut (dyn Any + 'static)))
fn as_reflect(&self, func: &mut dyn FnMut(&(dyn Reflect + 'static)))
fn as_reflect_mut(&mut self, func: &mut dyn FnMut(&mut (dyn Reflect + 'static)))
fn fields(&self, func: &mut dyn FnMut(&[&(dyn Reflect + 'static)]))
fn fields_mut( &mut self, func: &mut dyn FnMut(&mut [&mut (dyn Reflect + 'static)]) )
fn field( &self, name: &str, func: &mut dyn FnMut(Option<&(dyn Reflect + 'static)>) )
fn field_mut( &mut self, name: &str, func: &mut dyn FnMut(Option<&mut (dyn Reflect + 'static)>) )
source§fn set_field(
&mut self,
field: &str,
value: Box<dyn Reflect>,
func: &mut dyn FnMut(Result<Box<dyn Reflect>, Box<dyn Reflect>>)
)
fn set_field( &mut self, field: &str, value: Box<dyn Reflect>, func: &mut dyn FnMut(Result<Box<dyn Reflect>, Box<dyn Reflect>>) )
#[reflect(setter = ..)]
or falls back to
Reflect::field_mut
fn as_array(&self, func: &mut dyn FnMut(Option<&(dyn ReflectArray + 'static)>))
fn as_array_mut( &mut self, func: &mut dyn FnMut(Option<&mut (dyn ReflectArray + 'static)>) )
fn as_list(&self, func: &mut dyn FnMut(Option<&(dyn ReflectList + 'static)>))
fn as_list_mut( &mut self, func: &mut dyn FnMut(Option<&mut (dyn ReflectList + 'static)>) )
fn as_inheritable_variable( &self, func: &mut dyn FnMut(Option<&(dyn ReflectInheritableVariable + 'static)>) )
fn as_inheritable_variable_mut( &mut self, func: &mut dyn FnMut(Option<&mut (dyn ReflectInheritableVariable + 'static)>) )
fn as_hash_map( &self, func: &mut dyn FnMut(Option<&(dyn ReflectHashMap + 'static)>) )
fn as_hash_map_mut( &mut self, func: &mut dyn FnMut(Option<&mut (dyn ReflectHashMap + 'static)>) )
source§impl Visit for SceneRenderingOptions
impl Visit for SceneRenderingOptions
source§fn visit(&mut self, name: &str, visitor: &mut Visitor) -> Result<(), VisitError>
fn visit(&mut self, name: &str, visitor: &mut Visitor) -> Result<(), VisitError>
impl StructuralPartialEq for SceneRenderingOptions
Auto Trait Implementations§
impl Freeze for SceneRenderingOptions
impl !RefUnwindSafe for SceneRenderingOptions
impl Send for SceneRenderingOptions
impl Sync for SceneRenderingOptions
impl Unpin for SceneRenderingOptions
impl !UnwindSafe for SceneRenderingOptions
Blanket Implementations§
source§impl<T> AsyncTaskResult for T
impl<T> AsyncTaskResult for T
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
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
source§impl<T> FieldValue for Twhere
T: 'static,
impl<T> FieldValue for Twhere
T: 'static,
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> MessageData for T
impl<T> MessageData for T
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> ReflectBase for Twhere
T: Reflect,
impl<T> ReflectBase for Twhere
T: Reflect,
fn as_any_raw(&self) -> &(dyn Any + 'static)
fn as_any_raw_mut(&mut self) -> &mut (dyn Any + 'static)
source§impl<T> ResolvePath for Twhere
T: Reflect,
impl<T> ResolvePath for Twhere
T: Reflect,
fn resolve_path<'p>( &self, path: &'p str, func: &mut dyn FnMut(Result<&(dyn Reflect + 'static), ReflectPathError<'p>>) )
fn resolve_path_mut<'p>( &mut self, path: &'p str, func: &mut dyn FnMut(Result<&mut (dyn Reflect + 'static), ReflectPathError<'p>>) )
fn get_resolve_path<'p, T>(
&self,
path: &'p str,
func: &mut dyn FnMut(Result<&T, ReflectPathError<'p>>)
)where
T: Reflect,
fn get_resolve_path_mut<'p, T>(
&mut self,
path: &'p str,
func: &mut dyn FnMut(Result<&mut T, ReflectPathError<'p>>)
)where
T: Reflect,
source§impl<T> ScriptMessagePayload for T
impl<T> ScriptMessagePayload for T
source§fn as_any_ref(&self) -> &(dyn Any + 'static)
fn as_any_ref(&self) -> &(dyn Any + 'static)
self
as &dyn Any
source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
self
as &dyn Any
source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.