Skip to main content

Object

Struct Object 

Source
pub struct Object<'a> { /* private fields */ }
Expand description

One FBX object id: metadata from LazyObject, template from definitions, subtree from arena.

Implementations§

Source§

impl<'a> Object<'a>

Source

pub fn name(&self) -> &str

Source

pub fn type_name(&self) -> &str

Source

pub fn class_name(&self) -> &str

Source

pub fn object_index(&self) -> u64

Source

pub fn element(&self) -> Option<&'a Element>

Source

pub fn connected_object_ids(&self) -> &[u64]

Indices of objects connected from this one via OO rows (C: "OO", self, dest).

Source

pub fn object_property_targets(&self) -> &[ObjectPropertyConnection]

OP connections from this object: each entry is a destination object id and the destination-side property name (C: "OP", self, dest, property).

Source

pub fn pp_source_property_names(&self) -> &[String]

Property names on this object that appear as the source side of PP connections.

Source

pub fn pp_targets( &self, key: (u64, &str), ) -> Option<&[ObjectPropertyConnection]>

PP targets for a source (object_id, property_name) key (C: "PP", …).

The document’s PP map keys reuse ObjectPropertyConnection: for PP rows, ObjectPropertyConnection::dest holds the source object id and property the source property name.

Source§

impl<'a> Object<'a>

Source

pub fn new( document: &'a Document, template: &'a Template, object: &'a LazyObject, index: u64, ) -> Self

Source

pub fn template(&self) -> &'a Template

Source

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

Source

pub fn attributes(&self) -> HashMap<String, ElementAttribute>

Trait Implementations§

Source§

impl<'a> Debug for Object<'a>

Source§

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

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

impl<'a> From<Object<'a>> for OwnedObject

Source§

fn from(object: Object<'a>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<'a> Freeze for Object<'a>

§

impl<'a> RefUnwindSafe for Object<'a>

§

impl<'a> Send for Object<'a>

§

impl<'a> Sync for Object<'a>

§

impl<'a> Unpin for Object<'a>

§

impl<'a> UnsafeUnpin for Object<'a>

§

impl<'a> UnwindSafe for Object<'a>

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.