Skip to main content

Camera

Struct Camera 

Source
pub struct Camera { /* private fields */ }
Expand description

CAM_ — Camera (v2–v5, 144–264 bytes)

Bone-attached camera with animated FOV, clip planes, shadow clip distance, depth-of-field parameters, and version-dependent bokeh settings.

Implementations§

Source§

impl Camera

Source

pub fn new() -> Self

§Panics

Panics if the native allocation fails.

Source

pub fn bone_index(&self) -> u32

Index into BONE array

Source

pub fn set_bone_index(&mut self, value: u32)

Source

pub fn name(&self) -> String

Camera name (Ref<CHAR>)

Source

pub fn set_name(&mut self, value: &str)

Source

pub fn field_of_view(&self) -> Ref<'_, AnimRefF32>

Animated FOV in radians (v2+) Borrows the field in place — no copy, no allocation.

Source

pub fn field_of_view_mut(&mut self) -> RefMut<'_, AnimRefF32>

Source

pub fn use_vertical_fov(&self) -> u32

Use vertical FOV (0 or 1, v2+)

Source

pub fn set_use_vertical_fov(&mut self, value: u32)

Source

pub fn dof_type(&self) -> u32

DOF type (v5 only, default 3)

Source

pub fn set_dof_type(&mut self, value: u32)

Source

pub fn far_clip(&self) -> Ref<'_, AnimRefF32>

Animated far clip plane (v3+) Borrows the field in place — no copy, no allocation.

Source

pub fn far_clip_mut(&mut self) -> RefMut<'_, AnimRefF32>

Source

pub fn near_clip(&self) -> Ref<'_, AnimRefF32>

Animated near clip plane (v3+) Borrows the field in place — no copy, no allocation.

Source

pub fn near_clip_mut(&mut self) -> RefMut<'_, AnimRefF32>

Source

pub fn shadow_clip_distance(&self) -> Ref<'_, AnimRefF32>

Animated shadow clip distance (v2+) Borrows the field in place — no copy, no allocation.

Source

pub fn shadow_clip_distance_mut(&mut self) -> RefMut<'_, AnimRefF32>

Source

pub fn focus_distance(&self) -> Ref<'_, AnimRefF32>

Animated DOF focal point distance (v2+) Borrows the field in place — no copy, no allocation.

Source

pub fn focus_distance_mut(&mut self) -> RefMut<'_, AnimRefF32>

Source

pub fn far_focus_range(&self) -> Ref<'_, AnimRefF32>

Animated DOF far focus range (v2+) Borrows the field in place — no copy, no allocation.

Source

pub fn far_focus_range_mut(&mut self) -> RefMut<'_, AnimRefF32>

Source

pub fn near_focus_range(&self) -> Ref<'_, AnimRefF32>

Animated DOF near focus range (v2+) Borrows the field in place — no copy, no allocation.

Source

pub fn near_focus_range_mut(&mut self) -> RefMut<'_, AnimRefF32>

Source

pub fn near_falloff_start(&self) -> Ref<'_, AnimRefF32>

Animated near falloff start (v4+) Borrows the field in place — no copy, no allocation.

Source

pub fn near_falloff_start_mut(&mut self) -> RefMut<'_, AnimRefF32>

Source

pub fn near_falloff_end(&self) -> Ref<'_, AnimRefF32>

Animated near falloff end (v4+) Borrows the field in place — no copy, no allocation.

Source

pub fn near_falloff_end_mut(&mut self) -> RefMut<'_, AnimRefF32>

Source

pub fn dof_amount(&self) -> Ref<'_, AnimRefF32>

Animated DOF strength (v2+) Borrows the field in place — no copy, no allocation.

Source

pub fn dof_amount_mut(&mut self) -> RefMut<'_, AnimRefF32>

Source

pub fn bokeh_f_stop(&self) -> Ref<'_, AnimRefF32>

Animated bokeh f-stop (v5+) Borrows the field in place — no copy, no allocation.

Source

pub fn bokeh_f_stop_mut(&mut self) -> RefMut<'_, AnimRefF32>

Source

pub fn bokeh_max_co_c_diameter(&self) -> Ref<'_, AnimRefF32>

Animated bokeh max CoC diameter (v5+) Borrows the field in place — no copy, no allocation.

Source

pub fn bokeh_max_co_c_diameter_mut(&mut self) -> RefMut<'_, AnimRefF32>

Trait Implementations§

Source§

impl Debug for Camera

Source§

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

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

impl Default for Camera

Source§

fn default() -> Self

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

impl Drop for Camera

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more
Source§

impl Send for Camera

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> 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, 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.