Struct three::controls::first_person::FirstPerson
source · pub struct FirstPerson { /* private fields */ }
Expand description
Controls for first person camera.
Implementations
sourceimpl FirstPerson
impl FirstPerson
sourcepub fn default<T: Object>(object: &T) -> Self
pub fn default<T: Object>(object: &T) -> Self
Create FirstPerson
controls with default parameters.
sourcepub fn pitch_range(&mut self, range: Option<Range<f32>>) -> &mut Self
pub fn pitch_range(&mut self, range: Option<Range<f32>>) -> &mut Self
Sets the pitch range in radians.
sourcepub fn set_position<P>(&mut self, position: P) -> &mut Selfwhere
P: Into<Point3<f32>>,
pub fn set_position<P>(&mut self, position: P) -> &mut Selfwhere
P: Into<Point3<f32>>,
Sets the object position.
sourcepub fn set_move_speed(&mut self, speed: f32) -> &mut Self
pub fn set_move_speed(&mut self, speed: f32) -> &mut Self
Sets the movement speed in world units per second.
sourcepub fn set_look_speed(&mut self, speed: f32) -> &mut Self
pub fn set_look_speed(&mut self, speed: f32) -> &mut Self
Sets the mouse sensitivity.
sourcepub fn set_vertical_movement(&mut self, value: bool) -> &mut Self
pub fn set_vertical_movement(&mut self, value: bool) -> &mut Self
Specifies whether controlled object should move along y
axis when looking
down or up.
sourcepub fn set_vertical_look(&mut self, value: bool) -> &mut Self
pub fn set_vertical_look(&mut self, value: bool) -> &mut Self
Specifies whether controlled object can adjust pitch using mouse.
sourcepub fn set_axis_forward(&mut self, axis: Option<Key>) -> &mut Self
pub fn set_axis_forward(&mut self, axis: Option<Key>) -> &mut Self
Sets the key axis for moving forward/backward.
sourcepub fn set_axis_strafing(&mut self, axis: Option<Key>) -> &mut Self
pub fn set_axis_strafing(&mut self, axis: Option<Key>) -> &mut Self
Sets the button for “strafing” left/right.
sourcepub fn set_axis_vertical(&mut self, axis: Option<Key>) -> &mut Self
pub fn set_axis_vertical(&mut self, axis: Option<Key>) -> &mut Self
Sets button for moving up/down.
Trait Implementations
sourceimpl Clone for FirstPerson
impl Clone for FirstPerson
sourcefn clone(&self) -> FirstPerson
fn clone(&self) -> FirstPerson
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for FirstPerson
impl Debug for FirstPerson
sourceimpl PartialEq<FirstPerson> for FirstPerson
impl PartialEq<FirstPerson> for FirstPerson
sourcefn eq(&self, other: &FirstPerson) -> bool
fn eq(&self, other: &FirstPerson) -> bool
impl StructuralPartialEq for FirstPerson
Auto Trait Implementations
impl !RefUnwindSafe for FirstPerson
impl !Send for FirstPerson
impl !Sync for FirstPerson
impl Unpin for FirstPerson
impl !UnwindSafe for FirstPerson
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> SetParameter for T
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Resultwhere
T: Parameter<Self>,
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Resultwhere
T: Parameter<Self>,
Sets
value
as a parameter of self
.