diff --git a/src/utils/datatool/Datatool.cpp b/src/utils/datatool/Datatool.cpp index 342a597d8e..2500ec6caf 100644 --- a/src/utils/datatool/Datatool.cpp +++ b/src/utils/datatool/Datatool.cpp @@ -24,6 +24,7 @@ using esp::assets::SceneLoader; using esp::nav::NavMeshSettings; using esp::nav::PathFinder; using esp::scene::SemanticScene; +using Magnum::Math::Literals::operator""_degf; int createNavMesh(const std::string& meshFile, const std::string& navmeshFile) { SceneLoader loader; @@ -96,8 +97,8 @@ int createGibsonSemanticMesh(const std::string& objFile, f << "end_header" << std::endl; // We need to rotate to match .glb where -Z is gravity - const Mn::Quaternion transform = esp::core::quatRotFromTwoVectors( - Mn::Vector3::yAxis(), Mn::Vector3::zAxis()); + const Mn::Quaternion transform = + Mn::Quaternion::rotation(90.0_degf, Mn::Vector3::xAxis()); for (size_t i = 0; i < numVerts; ++i) { unsigned char gray[] = {0x80, 0x80, 0x80}; float* components = &attrib.vertices[i * 3]; diff --git a/src/utils/datatool/Mp3dInstanceMeshData.cpp b/src/utils/datatool/Mp3dInstanceMeshData.cpp index a1d8cb2ce9..10304ec908 100644 --- a/src/utils/datatool/Mp3dInstanceMeshData.cpp +++ b/src/utils/datatool/Mp3dInstanceMeshData.cpp @@ -144,14 +144,14 @@ bool Mp3dInstanceMeshData::saveSemMeshPLY( for (int iVertex = 0; iVertex < nVertex; ++iVertex) { const Mn::Vector3& xyz = cpu_vbo_[iVertex]; - const Mn::Vector3ui& rgb = cpu_cbo_[iVertex]; + const Mn::Vector3ub& rgb = cpu_cbo_[iVertex]; f.write(reinterpret_cast(xyz.data()), 3 * sizeof(float)); f.write(reinterpret_cast(rgb.data()), 3 * sizeof(uint8_t)); } for (int iFace = 0; iFace < perFaceIdxs_.size(); ++iFace) { const uint8_t nIndices = 3; - const Mn::Vector3i& indices = perFaceIdxs_[iFace]; + const Mn::Vector3ui& indices = perFaceIdxs_[iFace]; // The materialId corresponds to the segmentId from the .house file const int32_t segmentId = materialIds_[iFace]; int32_t objectId = ID_UNDEFINED; diff --git a/src/utils/datatool/Mp3dInstanceMeshData.h b/src/utils/datatool/Mp3dInstanceMeshData.h index 295626a8d1..4b1d7d65e2 100644 --- a/src/utils/datatool/Mp3dInstanceMeshData.h +++ b/src/utils/datatool/Mp3dInstanceMeshData.h @@ -36,8 +36,8 @@ class Mp3dInstanceMeshData { protected: std::vector cpu_vbo_; - std::vector cpu_cbo_; - std::vector perFaceIdxs_; + std::vector cpu_cbo_; + std::vector perFaceIdxs_; std::vector materialIds_; std::vector segmentIds_; std::vector categoryIds_;