pub struct EyePose {
pub doorways: Arc<[usize]>,
pub position: Vec3,
pub forward: Vec3,
pub down: Vec3,
}Expand description
Where an eye stands and which way it looks.
Fields§
§doorways: Arc<[usize]>The scene nodes of the doorways the eye walked through from the window’s scene, outermost first: it stands in the space of the last, or in the window scene’s own when there is none.
position: Vec3Where it stands, in the space it stands in.
forward: Vec3The direction it looks, of length one.
down: Vec3The direction that shows as down, square to forward, of length
one.
Implementations§
Source§impl EyePose
impl EyePose
Sourcepub fn standing(position: Vec3, yaw: f32, pitch: f32) -> EyePose
pub fn standing(position: Vec3, yaw: f32, pitch: f32) -> EyePose
An eye in the window scene’s own space at position, turned yaw
radians to the right of the space’s z and pitch up from level.
Sourcepub fn camera(&self, focal_length: f32) -> Camera
pub fn camera(&self, focal_length: f32) -> Camera
The camera the eye sees through, with focal_length, in the space it
stands in.
Sourcepub fn turn(&mut self, yaw: f32, pitch: f32)
pub fn turn(&mut self, yaw: f32, pitch: f32)
Turns the eye yaw radians to the right about its space’s down, then
pitch up, no further than PITCH_LIMIT from level.
Sourcepub fn walking_axes(&self) -> (Vec3, Vec3)
pub fn walking_axes(&self) -> (Vec3, Vec3)
The level directions the eye walks along: ahead, as it looks but level with its space’s floor, and to its right.
Trait Implementations§
impl StructuralPartialEq for EyePose
Auto Trait Implementations§
impl Freeze for EyePose
impl RefUnwindSafe for EyePose
impl Send for EyePose
impl Sync for EyePose
impl Unpin for EyePose
impl UnsafeUnpin for EyePose
impl UnwindSafe for EyePose
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
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> ⓘ
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> ⓘ
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