Struct let_engine::prelude::Appearance
source · pub struct Appearance { /* private fields */ }
Expand description
Holds everything about the appearance of objects like textures, vetex/index data, color and material.
Implementations§
source§impl Appearance
impl Appearance
sourcepub fn auto_scale(&mut self) -> Result<(), NoTextureError>
pub fn auto_scale(&mut self) -> Result<(), NoTextureError>
Scales the object appearance according to the texture applied. Works best in Expand camera mode for best quality.
sourcepub fn visible(self, visible: bool) -> Self
pub fn visible(self, visible: bool) -> Self
Sets the visibility of this appearance and returns self.
sourcepub fn set_visible(&mut self, visible: bool)
pub fn set_visible(&mut self, visible: bool)
Sets the visibility of this appearance.
sourcepub fn get_visible(&self) -> &bool
pub fn get_visible(&self) -> &bool
Gets the visibility of this appearance.
sourcepub fn get_mut_visible(&mut self) -> &mut bool
pub fn get_mut_visible(&mut self) -> &mut bool
Gets a mutable reference to the visibility of this appearance.
sourcepub fn model(self, model: Option<Model>) -> Self
pub fn model(self, model: Option<Model>) -> Self
Sets the model of this appearance and returns self.
sourcepub fn get_mut_model(&mut self) -> &mut Option<Model>
pub fn get_mut_model(&mut self) -> &mut Option<Model>
Gets a mutable reference to the model of this appearance.
sourcepub fn transform(self, transform: Transform) -> Self
pub fn transform(self, transform: Transform) -> Self
Sets the transform of this appearance and returns self.
sourcepub fn set_transform(&mut self, transform: Transform)
pub fn set_transform(&mut self, transform: Transform)
Sets the transform of this appearance.
sourcepub fn get_transform(&self) -> &Transform
pub fn get_transform(&self) -> &Transform
Gets the transform of this appearance.
sourcepub fn get_mut_transform(&mut self) -> &mut Transform
pub fn get_mut_transform(&mut self) -> &mut Transform
Gets a mutable reference to the transform of this appearance.
sourcepub fn material(self, material: Option<Material>) -> Self
pub fn material(self, material: Option<Material>) -> Self
Sets the material of this appearance and returns self.
sourcepub fn set_material(&mut self, material: Option<Material>)
pub fn set_material(&mut self, material: Option<Material>)
Sets the material of this appearance.
sourcepub fn get_material(&self) -> &Option<Material>
pub fn get_material(&self) -> &Option<Material>
Gets the material of this appearance.
sourcepub fn get_mut_material(&mut self) -> &mut Option<Material>
pub fn get_mut_material(&mut self) -> &mut Option<Material>
Gets a mutable reference to the material of this appearance.
sourcepub fn get_color_array(&self) -> [f32; 4]
pub fn get_color_array(&self) -> [f32; 4]
Returns the color as an array of 4 f32s symbolizing rgba going from 0 to 1.
Trait Implementations§
source§impl Clone for Appearance
impl Clone for Appearance
source§fn clone(&self) -> Appearance
fn clone(&self) -> Appearance
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for Appearance
impl Debug for Appearance
source§impl Default for Appearance
impl Default for Appearance
source§impl PartialEq for Appearance
impl PartialEq for Appearance
source§fn eq(&self, other: &Appearance) -> bool
fn eq(&self, other: &Appearance) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for Appearance
Auto Trait Implementations§
impl !RefUnwindSafe for Appearance
impl Send for Appearance
impl Sync for Appearance
impl Unpin for Appearance
impl !UnwindSafe for Appearance
Blanket Implementations§
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
§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
.§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
.§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.§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.§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for Pwhere
R: Read + ReadEndian<P>,
P: Default,
impl<R, P> ReadPrimitive<R> for Pwhere R: Read + ReadEndian<P>, P: Default,
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian()
.§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§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).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.