pub struct FbxMeshInstance {
pub name: Option<String>,
pub mesh: Mesh,
pub control_points: Vec<[f32; 3]>,
pub polygon_vertex_indices: Vec<i32>,
pub layers: FbxMeshLayers,
pub edges: Vec<i32>,
pub material_indices: Vec<i32>,
pub skin: Option<FbxSkin>,
pub morph_targets: Vec<FbxMorphTarget>,
pub geometric_transform: Option<FbxGeometricTransform>,
}fbx-reader or fbx-writer only.Expand description
Geometry attached to one FbxSceneNode.
This is materialized Draco geometry, not a lossless FBX geometry object.
Fields§
§name: Option<String>Name supplied by the FBX geometry node, when available.
mesh: MeshDecoded mesh geometry.
control_points: Vec<[f32; 3]>Original FBX control-point positions, retained independently from the resolved render mesh used by Draco/WebGL.
polygon_vertex_indices: Vec<i32>Original FBX polygon-corner indices. Negative values terminate a face.
layers: FbxMeshLayersLayer elements preserved from the source geometry node.
edges: Vec<i32>Original FBX Edges array, verbatim.
Each entry indexes Self::polygon_vertex_indices, naming the polygon
corner an edge starts at. FBX does not require this to list every
topological edge – importers reconstruct the missing ones from faces –
so it is kept raw rather than normalized. It is also the domain
ByEdge layer elements address.
material_indices: Vec<i32>Per-polygon material index from LayerElementMaterial, when present.
Each entry corresponds to one triangle in fan-triangulation order
produced by crate::FbxReader. Entries are absolute indices into
FbxScene::materials. The list is empty when the geometry does not
carry a material layer (callers fall back to the first material).
skin: Option<FbxSkin>Skin binding for this geometry, when it is armature-deformed.
morph_targets: Vec<FbxMorphTarget>Blend-shape targets defined for this geometry.
geometric_transform: Option<FbxGeometricTransform>The attaching Model’s Geometric* offset, when it sets one.
It sits here rather than on the node because FBX does not pass it to
child nodes: a consumer places this geometry with
node_transform * geometric_transform and places the children with the
node transform alone.
Implementations§
Source§impl FbxMeshInstance
impl FbxMeshInstance
Sourcepub fn to_render_mesh(&self) -> FbxRenderMesh
pub fn to_render_mesh(&self) -> FbxRenderMesh
Expands this instance onto the polygon-corner domain.
Sourcepub fn to_draco_mesh(&self) -> Mesh
pub fn to_draco_mesh(&self) -> Mesh
Corner-domain Draco mesh for this instance, welded by attribute tuple.
Falls back to the stored mesh when the instance carries no raw FBX geometry to expand.
Sourcepub fn to_draco_mesh_with_corner_map(&self) -> DracoMeshWithCornerMap
pub fn to_draco_mesh_with_corner_map(&self) -> DracoMeshWithCornerMap
Self::to_draco_mesh, additionally returning the corner/point
correspondence the weld produced – what a caller needs to carry a
per-control-point skin weight or morph delta onto the welded points
that now stand in for the corners it used to be duplicated across.
The stored-mesh fallback has no corners to map from, so both maps are the identity over its own points – matching the WASM binding’s own prior assumption that a point is its control point when there is no raw geometry to re-derive one from.
Trait Implementations§
Source§impl Clone for FbxMeshInstance
impl Clone for FbxMeshInstance
Source§fn clone(&self) -> FbxMeshInstance
fn clone(&self) -> FbxMeshInstance
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more