From b908fbe74da1fccb2ab51a33293877913dbdace1 Mon Sep 17 00:00:00 2001 From: marceline-cramer Date: Wed, 16 Feb 2022 21:36:06 -0700 Subject: [PATCH] Remove old GltfPrimitiveAttributes struct --- src/model.rs | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/src/model.rs b/src/model.rs index 34a1ab4..7b01472 100644 --- a/src/model.rs +++ b/src/model.rs @@ -1,7 +1,6 @@ use crate::handle::*; use crate::mesh::*; use crate::pool::{MaterialData, TextureData}; -use crate::renderer::Renderer; use crate::scene::MeshInstance; pub trait OnLoad { @@ -286,33 +285,3 @@ impl<'a, T: OnLoad> GltfLoader<'a, T> { self.on_load.load_mesh(&MeshData { vertices, indices }) } } - -pub struct GltfPrimitiveAttributes<'a> { - pub positions: Option>, - pub normals: Option>, - pub texcoords: Option>, -} - -impl<'a> GltfPrimitiveAttributes<'a> { - pub fn new(primitive: gltf::Primitive<'a>) -> Self { - let mut positions = None; - let mut normals = None; - let mut texcoords = None; - - for (semantic, accessor) in primitive.attributes() { - use gltf::Semantic::*; - match semantic { - Positions => positions = Some(accessor), - Normals => normals = Some(accessor), - TexCoords(0) => texcoords = Some(accessor), - _ => println!("unused glTF attribute {:?}", semantic), - } - } - - Self { - positions, - normals, - texcoords, - } - } -}