Struct de_conf::CameraConf 
source · pub struct CameraConf {
    move_margin: LogicalPixel,
    min_distance: Metre,
    max_distance: Metre,
    wheel_zoom_sensitivity: f32,
    touchpad_zoom_sensitivity: f32,
    rotation_sensitivity: f32,
    scroll_inverted: bool,
}Fields§
§move_margin: LogicalPixel§min_distance: Metre§max_distance: Metre§wheel_zoom_sensitivity: f32§touchpad_zoom_sensitivity: f32§rotation_sensitivity: f32§scroll_inverted: boolImplementations§
source§impl CameraConf
 
impl CameraConf
sourcepub fn move_margin(&self) -> LogicalPixel
 
pub fn move_margin(&self) -> LogicalPixel
Horizontal camera movement is initiated if mouse cursor is within this distance to window edge.
sourcepub fn min_distance(&self) -> Metre
 
pub fn min_distance(&self) -> Metre
Minimum camera distance from terrain achievable with zooming along.
sourcepub fn max_distance(&self) -> Metre
 
pub fn max_distance(&self) -> Metre
Maximum camera distance from terrain achievable with zooming alone.
sourcepub fn wheel_zoom_sensitivity(&self) -> f32
 
pub fn wheel_zoom_sensitivity(&self) -> f32
Scale factor (i.e distance * factor) applied after single mouse wheel
tick.
sourcepub fn touchpad_zoom_sensitivity(&self) -> f32
 
pub fn touchpad_zoom_sensitivity(&self) -> f32
Scale factor (i.e. distance * drag_size * factor) applied after
sliding on touch pad.
sourcepub fn rotation_sensitivity(&self) -> f32
 
pub fn rotation_sensitivity(&self) -> f32
Mouse drag by d logical pixels will lead to rotation by d * rotation_sensitivity radians.
sourcepub fn scroll_inverted(&self) -> bool
 
pub fn scroll_inverted(&self) -> bool
Whether scrolling should be inverted.
Trait Implementations§
source§impl Clone for CameraConf
 
impl Clone for CameraConf
source§fn clone(&self) -> CameraConf
 
fn clone(&self) -> CameraConf
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from 
source. Read moresource§impl Debug for CameraConf
 
impl Debug for CameraConf
Auto Trait Implementations§
impl Freeze for CameraConf
impl RefUnwindSafe for CameraConf
impl Send for CameraConf
impl Sync for CameraConf
impl Unpin for CameraConf
impl UnwindSafe for CameraConf
Blanket Implementations§
§impl<T, U> AsBindGroupShaderType<U> for T
 
impl<T, U> AsBindGroupShaderType<U> for T
§fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
 
fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
Return the 
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
Mutably borrows from an owned value. Read more
§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>
Convert 
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>
Convert 
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)
Convert 
&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)
Convert 
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
 
impl<T> DowncastSync for T
§impl<S> FromSample<S> for S
 
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> Instrument for T
 
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
 
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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§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>
The inverse inclusion map: attempts to construct 
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
 
fn is_in_subset(&self) -> bool
Checks if 
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
Use with care! Same as 
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
 
fn from_subset(element: &SS) -> SP
The inclusion map: converts 
self to the equivalent element of its superset.