Skip to main content

FbxGeometryLayers

Struct FbxGeometryLayers 

Source
pub struct FbxGeometryLayers<'a> {
    pub control_points: &'a [[f32; 3]],
    pub polygon_vertex_indices: &'a [i32],
    pub uv_sets: &'a [FbxUvSet],
    pub normal_sets: &'a [FbxNormalSet],
    pub color_sets: &'a [FbxColorSet],
    pub tangent_sets: &'a [FbxTangentSet],
    pub binormal_sets: &'a [FbxBinormalSet],
    pub smoothing_layers: &'a [FbxSmoothingLayer],
    pub crease_layers: &'a [FbxCreaseLayer],
}
Available on crate features fbx-reader or fbx-writer only.
Expand description

Borrowed FBX geometry, as expand_to_render_mesh and the writer consume it.

The borrowed counterpart of FbxMeshLayers plus the positions and indices those layers index into. Flat slices rather than a borrow of the owning struct so the reader can assemble one from decode locals before an FbxMeshInstance exists, and so it stays Copy.

A struct rather than a positional argument list because the list grows with every layer family the crate learns to read, and nine adjacent slices of nearly interchangeable types are easy to transpose silently.

Fields§

§control_points: &'a [[f32; 3]]

FBX control-point positions.

§polygon_vertex_indices: &'a [i32]

Polygon-corner indices; a negative value terminates a polygon.

§uv_sets: &'a [FbxUvSet]

UV layer elements.

§normal_sets: &'a [FbxNormalSet]

Normal layer elements.

§color_sets: &'a [FbxColorSet]

Colour layer elements.

§tangent_sets: &'a [FbxTangentSet]

Tangent layer elements.

§binormal_sets: &'a [FbxBinormalSet]

Binormal layer elements.

§smoothing_layers: &'a [FbxSmoothingLayer]

Smoothing layers.

Scalars on a non-corner domain, so unlike the families above these do not reach FbxRenderMesh; they are carried for the writer.

§crease_layers: &'a [FbxCreaseLayer]

Edge and vertex crease layers, carried for the writer as above.

Implementations§

Source§

impl<'a> FbxGeometryLayers<'a>

Source

pub fn from_instance(instance: &'a FbxMeshInstance) -> Self

Borrows every layer family from a decoded mesh instance.

Source

pub fn new( control_points: &'a [[f32; 3]], polygon_vertex_indices: &'a [i32], layers: &'a FbxMeshLayers, ) -> Self

Borrows layers that are not (yet) attached to an instance.

Trait Implementations§

Source§

impl<'a> Clone for FbxGeometryLayers<'a>

Source§

fn clone(&self) -> FbxGeometryLayers<'a>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Copy for FbxGeometryLayers<'a>

Source§

impl<'a> Debug for FbxGeometryLayers<'a>

Source§

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

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

impl<'a> Default for FbxGeometryLayers<'a>

Source§

fn default() -> FbxGeometryLayers<'a>

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

Auto Trait Implementations§

§

impl<'a> Freeze for FbxGeometryLayers<'a>

§

impl<'a> RefUnwindSafe for FbxGeometryLayers<'a>

§

impl<'a> Send for FbxGeometryLayers<'a>

§

impl<'a> Sync for FbxGeometryLayers<'a>

§

impl<'a> Unpin for FbxGeometryLayers<'a>

§

impl<'a> UnsafeUnpin for FbxGeometryLayers<'a>

§

impl<'a> UnwindSafe for FbxGeometryLayers<'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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.