[−][src]Struct easy_gltf::Camera
Contains camera properties.
Fields
transform: Matrix4<f32>
Transform matrix (also called world to camera matrix)
fov: Rad<f32>
Angle in degree of field of view
zfar: f32
The distance to the far clipping plane.
znear: f32
The distance to the near clipping plane.
Implementations
impl Camera
[src]
pub fn position(&self) -> Vector3<f32>
[src]
Position of the camera.
pub fn right(&self) -> Vector3<f32>
[src]
Right vector of the camera.
pub fn up(&self) -> Vector3<f32>
[src]
Up vector of the camera.
pub fn forward(&self) -> Vector3<f32>
[src]
Forward vector of the camera (backside direction).
pub fn apply_transform_vector(&self, pos: &Vector3<f32>) -> Vector3<f32>
[src]
Apply the transformation matrix on a vector.
Example
let ray_dir = Vector3::new(1., 0., 0.); let ray_dir = cam.apply_transform_vector(&ray_dir);
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Camera
impl Send for Camera
impl Sync for Camera
impl Unpin for Camera
impl UnwindSafe for Camera
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,