mirror of
https://github.com/overte-org/overte.git
synced 2025-04-23 04:13:32 +02:00
ModelCache.cpp to coding standard
This commit is contained in:
parent
25b419a1a1
commit
1da5c221ac
1 changed files with 5 additions and 10 deletions
|
@ -189,28 +189,23 @@ void GeometryReader::run() {
|
|||
if (fbxGeometry->meshes.size() == 0 && fbxGeometry->joints.size() == 0) {
|
||||
throw QString("empty geometry, possibly due to an unsupported FBX version");
|
||||
}
|
||||
}
|
||||
else if (_url.path().toLower().endsWith(".obj")) {
|
||||
} else if (_url.path().toLower().endsWith(".obj")) {
|
||||
fbxGeometry.reset(OBJReader().readOBJ(_data, _mapping, _combineParts, _url));
|
||||
}
|
||||
else if (_url.path().toLower().endsWith(".obj.gz")) {
|
||||
} else if (_url.path().toLower().endsWith(".obj.gz")) {
|
||||
QByteArray uncompressedData;
|
||||
if (gunzip(_data, uncompressedData)) {
|
||||
fbxGeometry.reset(OBJReader().readOBJ(uncompressedData, _mapping, _combineParts, _url));
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
throw QString("failed to decompress .obj.gz");
|
||||
}
|
||||
|
||||
}
|
||||
else if (_url.path().toLower().endsWith(".gltf")) {
|
||||
} else if (_url.path().toLower().endsWith(".gltf")) {
|
||||
std::shared_ptr<GLTFReader> glreader = std::make_shared<GLTFReader>();
|
||||
fbxGeometry.reset(glreader->readGLTF(_data, _mapping, _url));
|
||||
if (fbxGeometry->meshes.size() == 0 && fbxGeometry->joints.size() == 0) {
|
||||
throw QString("empty geometry, possibly due to an unsupported GLTF version");
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
throw QString("unsupported format");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue