Struct Camera
pub struct Camera {
pub position: Vec3,
pub target: Vec3,
pub up: Vec3,
pub fov: f64,
}Expand description
Camera for world-to-screen projection.
Fields§
§position: Vec3§target: Vec3§up: Vec3§fov: f64Implementations§
§impl Camera
impl Camera
pub const fn new(position: Vec3, target: Vec3, up: Vec3, fov: f64) -> Camera
pub const fn new(position: Vec3, target: Vec3, up: Vec3, fov: f64) -> Camera
Creates a camera with explicit position, target, up vector, and field-of-view (degrees).
pub fn reset(&mut self)
pub fn reset(&mut self)
Resets the camera to its canonical default state.
pub fn project(&self, world: Vec3, viewport: (f64, f64)) -> Option<ScreenPoint>
pub fn project(&self, world: Vec3, viewport: (f64, f64)) -> Option<ScreenPoint>
Project a world-space point to screen space.
pub fn project_point(
&self,
world: Vec3,
viewport: (f64, f64),
) -> Option<ScreenPoint>
pub fn project_point( &self, world: Vec3, viewport: (f64, f64), ) -> Option<ScreenPoint>
Alias for Self::project.
pub fn orbit(&mut self, yaw: f64, pitch: f64)
pub fn orbit(&mut self, yaw: f64, pitch: f64)
Rotate projection viewpoint around target using yaw (horizontal) and pitch (vertical) angles. This adjusts the geometric examination viewpoint of the 10D epistemic manifold. All calculations use stack-allocated f64 values for zero-heap compliance.
Trait Implementations§
impl Copy for Camera
impl StructuralPartialEq for Camera
Auto Trait Implementations§
impl Freeze for Camera
impl RefUnwindSafe for Camera
impl Send for Camera
impl Sync for Camera
impl Unpin for Camera
impl UnsafeUnpin for Camera
impl UnwindSafe for Camera
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.