pub struct Projector { /* private fields */ }Expand description
A Camera with its rotation cached, from Camera::projector (CORE-R50).
Camera::project is implemented through this type, so the two are bit-identical.
Implementations§
Source§impl Projector
impl Projector
Sourcepub fn rotate(&self, p: [f64; 3]) -> [f64; 3]
pub fn rotate(&self, p: [f64; 3]) -> [f64; 3]
p in camera space: turned by yaw about y, then by pitch about x. The result’s
z is the depth that project reports (larger = nearer).
Sourcepub fn magnification(&self, depth: f64) -> f64
pub fn magnification(&self, depth: f64) -> f64
The perspective factor d / (d − depth) that project scales
a point at depth by: how much nearer things look bigger (CORE-R63). Exactly 1
for an orthographic view (distance = ∞), so a scene can size sprites by it
without keeping its own copy of the eye distance.
Trait Implementations§
impl Copy for Projector
impl StructuralPartialEq for Projector
Auto Trait Implementations§
impl Forget for Projector
impl Freeze for Projector
impl Move for Projector
impl RefUnwindSafe for Projector
impl Send for Projector
impl Sync for Projector
impl Unpin for Projector
impl UnsafeUnpin for Projector
impl UnwindSafe for Projector
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