pub struct Base { /* private fields */ }
Expand description
Base
represents a concrete entity that can be added to the scene.
One cannot construct Base
directly. Wrapper types such as Camera
,
Mesh
, and Group
are provided instead.
Any type that implements Object
may be converted to its concrete
Base
type with the method Object::upcast
. This is useful for
storing generic objects in containers.
Trait Implementations§
Source§impl AsRef<Base> for Directional
impl AsRef<Base> for Directional
Source§impl AsRef<Base> for DynamicMesh
impl AsRef<Base> for DynamicMesh
Source§impl AsRef<Base> for Hemisphere
impl AsRef<Base> for Hemisphere
Source§impl Object for Base
impl Object for Base
Source§type Data = ObjectType
type Data = ObjectType
The internal data for the object. Read more
Source§fn resolve_data(&self, sync_guard: &SyncGuard<'_>) -> Self::Data
fn resolve_data(&self, sync_guard: &SyncGuard<'_>) -> Self::Data
Retrieves the internal data for the object. Read more
Source§fn set_visible(&self, visible: bool)
fn set_visible(&self, visible: bool)
Invisible objects are not rendered by cameras.
Source§fn set_transform<P, Q>(&self, pos: P, rot: Q, scale: f32)
fn set_transform<P, Q>(&self, pos: P, rot: Q, scale: f32)
Set both position, orientation and scale.
Source§fn set_orientation<Q>(&self, rot: Q)
fn set_orientation<Q>(&self, rot: Q)
Set orientation.
Source§fn set_weights(&self, weights: Vec<f32>)
fn set_weights(&self, weights: Vec<f32>)
Set weights.
impl Eq for Base
Auto Trait Implementations§
impl Freeze for Base
impl !RefUnwindSafe for Base
impl !Send for Base
impl !Sync for Base
impl Unpin for Base
impl !UnwindSafe for Base
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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 more