pub struct Camera3D {
pub id: String,
pub transform: Transform3D,
pub fov: f32,
pub near_plane: f32,
pub far_plane: f32,
pub aspect_ratio: f32,
pub projection: ProjectionType,
}Expand description
A 3D camera.
Fields§
§id: String§transform: Transform3D§fov: f32§near_plane: f32§far_plane: f32§aspect_ratio: f32§projection: ProjectionTypeImplementations§
Source§impl Camera3D
impl Camera3D
Sourcepub fn set_fov(&mut self, fov: f32)
pub fn set_fov(&mut self, fov: f32)
Set vertical field-of-view (radians or degrees per the scene convention).
Sourcepub fn set_clip_planes(&mut self, near: f32, far: f32)
pub fn set_clip_planes(&mut self, near: f32, far: f32)
Set near/far clip distances.
Sourcepub fn unproject_position_look_at(
eye: [f64; 3],
target: [f64; 3],
up: [f64; 3],
fov_v_deg: f64,
world: [f64; 3],
viewport: (f64, f64),
near: f64,
) -> Option<[f64; 2]>
pub fn unproject_position_look_at( eye: [f64; 3], target: [f64; 3], up: [f64; 3], fov_v_deg: f64, world: [f64; 3], viewport: (f64, f64), near: f64, ) -> Option<[f64; 2]>
Godot Camera3D.unproject_position with an explicit look-at basis.
World metres → viewport pixels (origin top-left). None if behind near.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Camera3D
impl RefUnwindSafe for Camera3D
impl Send for Camera3D
impl Sync for Camera3D
impl Unpin for Camera3D
impl UnsafeUnpin for Camera3D
impl UnwindSafe for Camera3D
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