Skip to main content

Model

Struct Model 

Source
pub struct Model {
    pub shading: String,
    pub culling: String,
    /* private fields */
}
Expand description

Typed wrapper for a scene graph model / transform node (Model::* except unsupported effectors).

Fields§

§shading: String§culling: String

Implementations§

Source§

impl Model

Source

pub fn inner(&self) -> &OwnedObject

Source

pub fn into_inner(self) -> OwnedObject

Source

pub fn properties(&self) -> &HashMap<String, Property>

Source

pub fn property(&self, name: &str) -> Option<&Property>

Source

pub fn shading(&self) -> &str

Source

pub fn culling(&self) -> &str

Source

pub fn quaternion_interpolate(&self) -> i32

Source

pub fn rotation_offset(&self) -> [f32; 3]

Source

pub fn rotation_pivot(&self) -> [f32; 3]

Source

pub fn scaling_offset(&self) -> [f32; 3]

Source

pub fn scaling_pivot(&self) -> [f32; 3]

Source

pub fn translation_active(&self) -> bool

Source

pub fn translation_min(&self) -> [f32; 3]

Source

pub fn translation_max(&self) -> [f32; 3]

Source

pub fn translation_min_x(&self) -> bool

Source

pub fn translation_max_x(&self) -> bool

Source

pub fn translation_min_y(&self) -> bool

Source

pub fn translation_max_y(&self) -> bool

Source

pub fn translation_min_z(&self) -> bool

Source

pub fn translation_max_z(&self) -> bool

Source

pub fn rotation_order(&self) -> ModelRotationOrder

Source

pub fn rotation_space_for_limit_only(&self) -> bool

Source

pub fn rotation_stiffness_x(&self) -> f32

Source

pub fn rotation_stiffness_y(&self) -> f32

Source

pub fn rotation_stiffness_z(&self) -> f32

Source

pub fn axis_len(&self) -> f32

Source

pub fn pre_rotation(&self) -> [f32; 3]

Source

pub fn post_rotation(&self) -> [f32; 3]

Source

pub fn rotation_active(&self) -> bool

Source

pub fn rotation_min(&self) -> [f32; 3]

Source

pub fn rotation_max(&self) -> [f32; 3]

Source

pub fn rotation_min_x(&self) -> bool

Source

pub fn rotation_max_x(&self) -> bool

Source

pub fn rotation_min_y(&self) -> bool

Source

pub fn rotation_max_y(&self) -> bool

Source

pub fn rotation_min_z(&self) -> bool

Source

pub fn rotation_max_z(&self) -> bool

Source

pub fn inherit_type(&self) -> ModelTransformInheritance

Source

pub fn scaling_active(&self) -> bool

Source

pub fn scaling_min(&self) -> [f32; 3]

Source

pub fn scaling_max(&self) -> [f32; 3]

Source

pub fn scaling_min_x(&self) -> bool

Source

pub fn scaling_max_x(&self) -> bool

Source

pub fn scaling_min_y(&self) -> bool

Source

pub fn scaling_max_y(&self) -> bool

Source

pub fn scaling_min_z(&self) -> bool

Source

pub fn scaling_max_z(&self) -> bool

Source

pub fn geometric_translation(&self) -> [f32; 3]

Source

pub fn geometric_rotation(&self) -> [f32; 3]

Source

pub fn geometric_scaling(&self) -> [f32; 3]

Source

pub fn min_damp_range_x(&self) -> f32

Source

pub fn min_damp_range_y(&self) -> f32

Source

pub fn min_damp_range_z(&self) -> f32

Source

pub fn max_damp_range_x(&self) -> f32

Source

pub fn max_damp_range_y(&self) -> f32

Source

pub fn max_damp_range_z(&self) -> f32

Source

pub fn min_damp_strength_x(&self) -> f32

Source

pub fn min_damp_strength_y(&self) -> f32

Source

pub fn min_damp_strength_z(&self) -> f32

Source

pub fn max_damp_strength_x(&self) -> f32

Source

pub fn max_damp_strength_y(&self) -> f32

Source

pub fn max_damp_strength_z(&self) -> f32

Source

pub fn preferred_angle_x(&self) -> f32

Source

pub fn preferred_angle_y(&self) -> f32

Source

pub fn preferred_angle_z(&self) -> f32

Source

pub fn show(&self) -> bool

Source

pub fn lod_box(&self) -> bool

Source

pub fn freeze(&self) -> bool

Source

pub fn connected_materials<'a>( &'a self, document: &'a OwnedDocument, ) -> Vec<&'a Material>

Incoming object–object (OO) links from Material sources whose connected_object_ids contain this model’s id — Assimp Model::ResolveLinks material branch (OP links are excluded).

Use Material::get_textures / Material::get_layered_textures on each entry for texture data.

Source

pub fn connected_geometries<'a>( &'a self, document: &'a OwnedDocument, ) -> Vec<ModelGeometryRef<'a>>

Incoming OO links from Geometry sources (mesh, line, shape, or unknown geometry class).

Source

pub fn connected_node_attributes<'a>( &'a self, document: &'a OwnedDocument, ) -> Vec<NodeAttributeRef<'a>>

Incoming OO links from NodeAttribute sources, same discriminant shape as AnimationCurveNode::get_target_node_attribute.

Trait Implementations§

Source§

impl Debug for Model

Source§

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

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

impl PartialEq for Model

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl TryFrom<OwnedObject> for Model

Source§

type Error = FbxTypeMismatch

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

fn try_from(o: OwnedObject) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl StructuralPartialEq for Model

Auto Trait Implementations§

§

impl Freeze for Model

§

impl RefUnwindSafe for Model

§

impl Send for Model

§

impl Sync for Model

§

impl Unpin for Model

§

impl UnsafeUnpin for Model

§

impl UnwindSafe for Model

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.