mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-06-27 05:30:33 +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) {
|
if (fbxGeometry->meshes.size() == 0 && fbxGeometry->joints.size() == 0) {
|
||||||
throw QString("empty geometry, possibly due to an unsupported FBX version");
|
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));
|
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;
|
QByteArray uncompressedData;
|
||||||
if (gunzip(_data, uncompressedData)) {
|
if (gunzip(_data, uncompressedData)) {
|
||||||
fbxGeometry.reset(OBJReader().readOBJ(uncompressedData, _mapping, _combineParts, _url));
|
fbxGeometry.reset(OBJReader().readOBJ(uncompressedData, _mapping, _combineParts, _url));
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
throw QString("failed to decompress .obj.gz");
|
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>();
|
std::shared_ptr<GLTFReader> glreader = std::make_shared<GLTFReader>();
|
||||||
fbxGeometry.reset(glreader->readGLTF(_data, _mapping, _url));
|
fbxGeometry.reset(glreader->readGLTF(_data, _mapping, _url));
|
||||||
if (fbxGeometry->meshes.size() == 0 && fbxGeometry->joints.size() == 0) {
|
if (fbxGeometry->meshes.size() == 0 && fbxGeometry->joints.size() == 0) {
|
||||||
throw QString("empty geometry, possibly due to an unsupported GLTF version");
|
throw QString("empty geometry, possibly due to an unsupported GLTF version");
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
throw QString("unsupported format");
|
throw QString("unsupported format");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue