From a372397416d4079a9370201a78b565d7231f6242 Mon Sep 17 00:00:00 2001 From: Lars Mueller Date: Tue, 21 May 2024 22:15:11 +0200 Subject: [PATCH] Remove now obsolete getters for accessor indices --- irr/src/CGLTFMeshFileLoader.cpp | 56 --------------------------------- irr/src/CGLTFMeshFileLoader.h | 16 ---------- 2 files changed, 72 deletions(-) diff --git a/irr/src/CGLTFMeshFileLoader.cpp b/irr/src/CGLTFMeshFileLoader.cpp index 2f35f3bf9..8f1523c85 100644 --- a/irr/src/CGLTFMeshFileLoader.cpp +++ b/irr/src/CGLTFMeshFileLoader.cpp @@ -666,62 +666,6 @@ void CGLTFMeshFileLoader::MeshExtractor::copyTCoords( } } -/** - * The index of the accessor that contains the vertex indices. - * When this is undefined, the primitive defines non-indexed geometry. - * When defined, the accessor MUST have SCALAR type and an unsigned integer component type. - * Documentation: https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#_mesh_primitive_indices - * Type: Integer - * Required: NO -*/ -std::optional CGLTFMeshFileLoader::MeshExtractor::getIndicesAccessorIdx( - const std::size_t meshIdx, - const std::size_t primitiveIdx) const -{ - return m_gltf_model.meshes->at(meshIdx).primitives[primitiveIdx].indices; -} - -/** - * The index of the accessor that contains the POSITIONs. - * Documentation: https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#meshes-overview - * Type: VEC3 (Float) -*/ -std::optional CGLTFMeshFileLoader::MeshExtractor::getPositionAccessorIdx( - const std::size_t meshIdx, - const std::size_t primitiveIdx) const -{ - return m_gltf_model.meshes->at(meshIdx).primitives[primitiveIdx].attributes.position; -} - -/** - * The index of the accessor that contains the NORMALs. - * Documentation: https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#meshes-overview - * Type: VEC3 (Float) - * ! Required: NO (Appears to not be, needs another pair of eyes to research.) -*/ -std::optional CGLTFMeshFileLoader::MeshExtractor::getNormalAccessorIdx( - const std::size_t meshIdx, - const std::size_t primitiveIdx) const -{ - return m_gltf_model.meshes->at(meshIdx).primitives[primitiveIdx].attributes.normal; -} - -/** - * The index of the accessor that contains the TEXCOORDs. - * Documentation: https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#meshes-overview - * Type: VEC3 (Float) - * ! Required: YES (Appears so, needs another pair of eyes to research.) -*/ -std::optional CGLTFMeshFileLoader::MeshExtractor::getTCoordAccessorIdx( - const std::size_t meshIdx, - const std::size_t primitiveIdx) const -{ - const auto& texcoords = m_gltf_model.meshes->at(meshIdx).primitives[primitiveIdx].attributes.texcoord; - if (!texcoords.has_value()) - return std::nullopt; - return texcoords->at(0); -} - /** * This is where the actual model's GLTF file is loaded and parsed by tiniergltf. */ diff --git a/irr/src/CGLTFMeshFileLoader.h b/irr/src/CGLTFMeshFileLoader.h index 880cf8196..30252b221 100644 --- a/irr/src/CGLTFMeshFileLoader.h +++ b/irr/src/CGLTFMeshFileLoader.h @@ -135,22 +135,6 @@ class CGLTFMeshFileLoader : public IMeshLoader void copyTCoords(const std::size_t accessorIdx, std::vector& vertices) const; - - std::optional getIndicesAccessorIdx(const std::size_t meshIdx, - const std::size_t primitiveIdx) const; - - std::optional getPositionAccessorIdx(const std::size_t meshIdx, - const std::size_t primitiveIdx) const; - - /* Get the accessor id of the normals of a primitive. - */ - std::optional getNormalAccessorIdx(const std::size_t meshIdx, - const std::size_t primitiveIdx) const; - - /* Get the accessor id for the tcoords of a primitive. - */ - std::optional getTCoordAccessorIdx(const std::size_t meshIdx, - const std::size_t primitiveIdx) const; void loadMesh( std::size_t meshIdx,