Skip to main content

FbxCamera

Struct FbxCamera 

Source
#[non_exhaustive]
pub struct FbxCamera {
Show 17 fields pub position: Option<[f32; 3]>, pub interest_position: Option<[f32; 3]>, pub up_vector: Option<[f32; 3]>, pub projection_type: Option<i32>, pub field_of_view: Option<f32>, pub field_of_view_x: Option<f32>, pub field_of_view_y: Option<f32>, pub focal_length: Option<f32>, pub near_plane: Option<f32>, pub far_plane: Option<f32>, pub aspect_width: Option<f32>, pub aspect_height: Option<f32>, pub film_width: Option<f32>, pub film_height: Option<f32>, pub film_aspect_ratio: Option<f32>, pub aperture_mode: Option<i32>, pub ortho_zoom: Option<f32>,
}
Available on crate features fbx-reader or fbx-writer only.
Expand description

An FBX Camera node attribute.

Every field is optional because FBX omits any property left at its class default. Fields are limited to those that actually occur across the ufbx corpus; angles are in degrees and distances in the document’s own units.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§position: Option<[f32; 3]>

Eye position, in world space rather than relative to the node.

§interest_position: Option<[f32; 3]>

Point the camera looks at, in the same space as Self::position.

§up_vector: Option<[f32; 3]>

Up vector.

§projection_type: Option<i32>

CameraProjectionType: 0 perspective, 1 orthographic.

§field_of_view: Option<f32>

Diagonal field of view, in degrees.

§field_of_view_x: Option<f32>

Horizontal field of view, in degrees.

§field_of_view_y: Option<f32>

Vertical field of view, in degrees.

§focal_length: Option<f32>

Focal length in millimetres.

§near_plane: Option<f32>

Near clip distance.

§far_plane: Option<f32>

Far clip distance.

§aspect_width: Option<f32>

Render aperture width in pixels.

§aspect_height: Option<f32>

Render aperture height in pixels.

§film_width: Option<f32>

Film-back width in inches, not millimetres.

This is the sensor size, and a consumer needs it with Self::focal_length to reach a field of view: Blender computes sensor_width = film_width * 25.4 and falls back to its own 32 mm default when the property is absent, which silently changes the framing of every camera in the document.

§film_height: Option<f32>

Film-back height in inches.

§film_aspect_ratio: Option<f32>

Film-back aspect ratio, film_width / film_height.

§aperture_mode: Option<i32>

ApertureMode: which of the aperture and field-of-view properties the authoring tool treats as authoritative when they disagree.

§ortho_zoom: Option<f32>

Orthographic zoom, meaningful when Self::projection_type is 1.

Trait Implementations§

Source§

impl Clone for FbxCamera

Source§

fn clone(&self) -> FbxCamera

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FbxCamera

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for FbxCamera

Source§

fn default() -> FbxCamera

Returns the “default value” for a type. Read more
Source§

impl PartialEq for FbxCamera

Source§

fn eq(&self, other: &FbxCamera) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for FbxCamera

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.