pub struct EditorCamera {
pub position: Vec3,
pub yaw: f32,
pub pitch: f32,
}Expand description
Frei fliegende Editor-Kamera: Position + Gier/Nickwinkel. Bewegung und Blick sind reine Vektorrechnung, kein Zustand außerhalb — deterministisch und headless testbar.
Fields§
§position: Vec3§yaw: f32§pitch: f32Implementations§
Source§impl EditorCamera
impl EditorCamera
pub fn new(position: Vec3) -> Self
pub fn right(&self) -> Vec3
pub fn up(&self) -> Vec3
Sourcepub fn look(&mut self, dyaw: f32, dpitch: f32)
pub fn look(&mut self, dyaw: f32, dpitch: f32)
Blick drehen (Radian). Nick wird auf ±89° begrenzt.
Sourcepub fn camera(&self, width: u32, height: u32) -> Camera
pub fn camera(&self, width: u32, height: u32) -> Camera
Render-Kamera mit gegebenem Seitenverhältnis.
Sourcepub fn view_matrix(&self) -> Mat4
pub fn view_matrix(&self) -> Mat4
Sichtmatrix (für Ray-Casting / Gizmos später).
Trait Implementations§
Source§impl Clone for EditorCamera
impl Clone for EditorCamera
Source§fn clone(&self) -> EditorCamera
fn clone(&self) -> EditorCamera
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for EditorCamera
impl RefUnwindSafe for EditorCamera
impl Send for EditorCamera
impl Sync for EditorCamera
impl Unpin for EditorCamera
impl UnsafeUnpin for EditorCamera
impl UnwindSafe for EditorCamera
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