L3dFile

Struct L3dFile 

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

Main L3D file interface

Implementations§

Source§

impl L3dFile

Source

pub fn new(data: Vec<u8>) -> Result<Arc<Self>, L3dError>

Parse L3D data from bytes

Source

pub fn from_path(path: String) -> Result<Arc<Self>, L3dError>

Parse L3D data from a file path

Source

pub fn get_structure_xml(&self) -> String

Get the raw structure.xml content

Source

pub fn to_json(&self) -> Result<String, L3dError>

Convert the luminaire data to JSON

Source

pub fn get_parts(&self) -> Vec<L3dPart>

Get all geometry parts with their transformations

Source

pub fn get_light_emitters(&self) -> Vec<L3dLightEmitter>

Get all light emitting objects

Source

pub fn get_assets(&self) -> Vec<L3dAsset>

Get all asset files (OBJ, textures, etc.)

Source

pub fn get_part_count(&self) -> u64

Get the number of geometry parts

Source

pub fn get_asset_count(&self) -> u64

Get the number of asset files

Trait Implementations§

Source§

impl<UT> LiftRef<UT> for L3dFile

Source§

impl<UT> LowerError<UT> for L3dFile

Source§

fn lower_error(obj: Self) -> RustBuffer

Lower this value for scaffolding function return Read more
Source§

impl<UT> LowerReturn<UT> for L3dFile

Source§

type ReturnType = <Arc<L3dFile> as LowerReturn<UniFfiTag>>::ReturnType

The type that should be returned by scaffolding functions for this type. Read more
Source§

fn lower_return(obj: Self) -> Result<Self::ReturnType, RustCallError>

Lower the return value from an scaffolding call Read more
Source§

fn handle_failed_lift( error: LiftArgsError, ) -> Result<Self::ReturnType, RustCallError>

Lower the return value for failed argument lifts Read more
Source§

impl<UT> TypeId<UT> for L3dFile

Auto Trait Implementations§

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, UT> HandleAlloc<UT> for T
where T: Send + Sync,

Source§

fn new_handle(value: Arc<T>) -> Handle

Create a new handle for an Arc value Read more
Source§

unsafe fn clone_handle(handle: Handle) -> Handle

Clone a handle Read more
Source§

unsafe fn consume_handle(handle: Handle) -> Arc<T>

Consume a handle, getting back the initial Arc<> Read more
Source§

unsafe fn get_arc(handle: Handle) -> Arc<Self>

Get a clone of the Arc<> using a “borrowed” handle. Read more
§

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

§

fn into(self) -> U

Calls U::from(self).

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

§

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

§

type Error = Infallible

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

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

Performs the conversion.
§

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

§

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

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

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

Performs the conversion.