Skip to main content

Projector

Struct Projector 

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

PROJ — Projector / decal (v0–v5, 388 bytes)

Projects a material onto scene geometry with animated offset, orientation, field of view, aspect ratio, clipping planes, alpha lifecycle, and attenuation distance.

Implementations§

Source§

impl Projector

Source

pub fn new() -> Self

§Panics

Panics if the native allocation fails.

Source

pub fn projection_type(&self) -> ProjectionType

Projection type (ortho/perspective)

Source

pub fn set_projection_type(&mut self, value: ProjectionType)

Source

pub fn bone(&self) -> u32

Index into BONE array

Source

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

Source

pub fn material_reference_index(&self) -> u32

Index into MATM material map

Source

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

Source

pub fn offset(&self) -> Ref<'_, AnimRefVector3f>

Animated position offset Borrows the field in place — no copy, no allocation.

Source

pub fn offset_mut(&mut self) -> RefMut<'_, AnimRefVector3f>

Source

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

Animated pitch angle Borrows the field in place — no copy, no allocation.

Source

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

Source

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

Animated yaw angle Borrows the field in place — no copy, no allocation.

Source

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

Source

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

Animated roll angle Borrows the field in place — no copy, no allocation.

Source

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

Source

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

Animated field of view Borrows the field in place — no copy, no allocation.

Source

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

Source

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

Animated aspect ratio Borrows the field in place — no copy, no allocation.

Source

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

Source

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

Animated near clip plane Borrows the field in place — no copy, no allocation.

Source

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

Source

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

Animated far clip plane Borrows the field in place — no copy, no allocation.

Source

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

Source

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

Animated box Z bottom offset Borrows the field in place — no copy, no allocation.

Source

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

Source

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

Animated box Z top offset Borrows the field in place — no copy, no allocation.

Source

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

Source

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

Animated box X left offset Borrows the field in place — no copy, no allocation.

Source

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

Source

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

Animated box X right offset Borrows the field in place — no copy, no allocation.

Source

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

Source

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

Animated box Y front offset Borrows the field in place — no copy, no allocation.

Source

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

Source

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

Animated box Y back offset Borrows the field in place — no copy, no allocation.

Source

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

Source

pub fn falloff(&self) -> f32

Projection falloff distance

Source

pub fn set_falloff(&mut self, value: f32)

Source

pub fn alpha_init(&self) -> f32

Alpha at creation

Source

pub fn set_alpha_init(&mut self, value: f32)

Source

pub fn alpha_mid(&self) -> f32

Alpha at midpoint

Source

pub fn set_alpha_mid(&mut self, value: f32)

Source

pub fn alpha_end(&self) -> f32

Alpha at end

Source

pub fn set_alpha_end(&mut self, value: f32)

Source

pub fn lifetime_attack(&self) -> f32

Attack phase duration

Source

pub fn set_lifetime_attack(&mut self, value: f32)

Source

pub fn lifetime_attack_to(&self) -> f32

Attack target time

Source

pub fn set_lifetime_attack_to(&mut self, value: f32)

Source

pub fn lifetime_hold(&self) -> f32

Hold phase duration

Source

pub fn set_lifetime_hold(&mut self, value: f32)

Source

pub fn lifetime_hold_to(&self) -> f32

Hold target time

Source

pub fn set_lifetime_hold_to(&mut self, value: f32)

Source

pub fn lifetime_decay(&self) -> f32

Decay phase duration

Source

pub fn set_lifetime_decay(&mut self, value: f32)

Source

pub fn lifetime_decay_to(&self) -> f32

Decay target time

Source

pub fn set_lifetime_decay_to(&mut self, value: f32)

Source

pub fn attenuation_distance(&self) -> f32

Distance-based attenuation

Source

pub fn set_attenuation_distance(&mut self, value: f32)

Source

pub fn active(&self) -> Ref<'_, AnimRefU32>

Animated active state Borrows the field in place — no copy, no allocation.

Source

pub fn active_mut(&mut self) -> RefMut<'_, AnimRefU32>

Source

pub fn layer(&self) -> u32

Render layer

Source

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

Source

pub fn lod_reduce(&self) -> u32

LOD reduction level

Source

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

Source

pub fn lod_cut(&self) -> u32

LOD cut-off level

Source

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

Source

pub fn flags(&self) -> ProjectorFlag

Projector flags

Source

pub fn set_flags(&mut self, value: ProjectorFlag)

Trait Implementations§

Source§

impl Debug for Projector

Source§

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

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

impl Default for Projector

Source§

fn default() -> Self

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

impl Drop for Projector

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 Projector

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.