From 9974d23c773fda8239147127c10619a62a8b43ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 27 Nov 2023 19:36:39 +0100 Subject: [PATCH] MeshTools: doc++ --- src/Magnum/MeshTools/Transform.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Magnum/MeshTools/Transform.cpp b/src/Magnum/MeshTools/Transform.cpp index ca95cdf7e..9eee8405d 100644 --- a/src/Magnum/MeshTools/Transform.cpp +++ b/src/Magnum/MeshTools/Transform.cpp @@ -92,6 +92,8 @@ Trade::MeshData transform2D(Trade::MeshData&& mesh, const Matrix3& transformatio assert here again. */ const Containers::Optional positionAttributeId = mesh.findAttributeId(Trade::MeshAttribute::Position, id, morphTargetId); if((mesh.indexDataFlags() & Trade::DataFlag::Owned) && + /* There's currently no way to create a MeshData that's Owned but not + Mutable so this check is enough */ (mesh.vertexDataFlags() & Trade::DataFlag::Owned) && positionAttributeId && mesh.attributeFormat(*positionAttributeId) == VertexFormat::Vector2 ) { @@ -235,6 +237,8 @@ Trade::MeshData transform3D(Trade::MeshData&& mesh, const Matrix4& transformatio const Containers::Optional bitangentAttributeId = mesh.findAttributeId(Trade::MeshAttribute::Bitangent, id, morphTargetId); const Containers::Optional normalAttributeId = mesh.findAttributeId(Trade::MeshAttribute::Normal, id, morphTargetId); if((mesh.indexDataFlags() & Trade::DataFlag::Owned) && + /* There's currently no way to create a MeshData that's Owned but not + Mutable so this check is enough */ (mesh.vertexDataFlags() & Trade::DataFlag::Owned) && positionAttributeId && mesh.attributeFormat(*positionAttributeId) == VertexFormat::Vector3 && (!tangentAttributeId || mesh.attributeFormat(*tangentAttributeId) == VertexFormat::Vector3 || mesh.attributeFormat(*tangentAttributeId) == VertexFormat::Vector4) && @@ -363,6 +367,8 @@ Trade::MeshData transformTextureCoordinates2D(Trade::MeshData&& mesh, const Matr assert here again. */ const Containers::Optional textureCoordinateAttributeId = mesh.findAttributeId(Trade::MeshAttribute::TextureCoordinates, id, morphTargetId); if((mesh.indexDataFlags() & Trade::DataFlag::Owned) && + /* There's currently no way to create a MeshData that's Owned but not + Mutable so this check is enough */ (mesh.vertexDataFlags() & Trade::DataFlag::Owned) && textureCoordinateAttributeId && mesh.attributeFormat(*textureCoordinateAttributeId) == VertexFormat::Vector2 ) {