pub struct DebugCamera {
pub up: Vec3,
pub fwd: Vec3,
pub position: Vec3,
pub speed_translate: f32,
pub speed_rotate: f32,
}
Expand description
Any entity with this component will be controllable using the default bindings for this plugin. For more information on controls, refer to the crate root.
Fields§
§up: Vec3
Up vector for the camera. Will be kept as a unit vector and perpendicular to fwd automatically by our systems. Should not be initialised to be co-linear with fwd.
fwd: Vec3
Forward vector for the camera. Will be kept as a unit vector and perpendicular to up automatically by out systems. Should not be initialised to be co-linear with up.
position: Vec3
The position in global space of the camera. Should be initialised by the user. We will update this automatically.
speed_translate: f32
This is a configurable setting for this camera. It is the speed (in units/second) at which the camera should translate when going at full speed.
speed_rotate: f32
This is a configurable setting for this camera. It is the speed (in radians/second) at which the camera should rotate when going at full speed.
Trait Implementations§
Source§impl Component for DebugCamera
impl Component for DebugCamera
Source§type Storage = TableStorage
type Storage = TableStorage
TableStorage
or SparseStorage
.Source§impl Debug for DebugCamera
impl Debug for DebugCamera
Source§impl Default for DebugCamera
impl Default for DebugCamera
Source§fn default() -> DebugCamera
fn default() -> DebugCamera
Auto Trait Implementations§
impl Freeze for DebugCamera
impl RefUnwindSafe for DebugCamera
impl Send for DebugCamera
impl Sync for DebugCamera
impl Unpin for DebugCamera
impl UnwindSafe for DebugCamera
Blanket Implementations§
Source§impl<T, U> AsBindGroupShaderType<U> for T
impl<T, U> AsBindGroupShaderType<U> for T
Source§fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
T
ShaderType
for self
. When used in AsBindGroup
derives, it is safe to assume that all images in self
exist.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<C> Bundle for Cwhere
C: Component,
impl<C> Bundle for Cwhere
C: Component,
fn component_ids( components: &mut Components, storages: &mut Storages, ids: &mut impl FnMut(ComponentId), )
unsafe fn from_components<T, F>(ctx: &mut T, func: &mut F) -> C
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<C> DynamicBundle for Cwhere
C: Component,
impl<C> DynamicBundle for Cwhere
C: Component,
fn get_components(self, func: &mut impl FnMut(StorageType, OwningPtr<'_>))
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
Source§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Self
using data from the given World