mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 20:23:06 +02:00
code review
This commit is contained in:
parent
c4d909927a
commit
a3f4aeb182
3 changed files with 4 additions and 4 deletions
|
@ -130,7 +130,6 @@ bool OBJTokenizer::getVertex(glm::vec3& vertex, glm::vec3& vertexColor) {
|
||||||
auto y = getFloat(); // And order of arguments is different on Windows/Linux.
|
auto y = getFloat(); // And order of arguments is different on Windows/Linux.
|
||||||
auto z = getFloat();
|
auto z = getFloat();
|
||||||
vertex = glm::vec3(x, y, z);
|
vertex = glm::vec3(x, y, z);
|
||||||
vertexColor = glm::vec3(1.0f); // default, in case there is not color information
|
|
||||||
|
|
||||||
auto r = 1.0f, g = 1.0f, b = 1.0f;
|
auto r = 1.0f, g = 1.0f, b = 1.0f;
|
||||||
bool hasVertexColor = false;
|
bool hasVertexColor = false;
|
||||||
|
@ -415,7 +414,8 @@ bool OBJReader::parseOBJGroup(OBJTokenizer& tokenizer, const QVariantHash& mappi
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
} else if (token == "v") {
|
} else if (token == "v") {
|
||||||
glm::vec3 vertex, vertexColor;
|
glm::vec3 vertex;
|
||||||
|
glm::vec3 vertexColor { glm::vec3(1.0f) };
|
||||||
|
|
||||||
bool hasVertexColor = tokenizer.getVertex(vertex, vertexColor);
|
bool hasVertexColor = tokenizer.getVertex(vertex, vertexColor);
|
||||||
vertices.append(vertex);
|
vertices.append(vertex);
|
||||||
|
|
|
@ -463,7 +463,7 @@ bool Model::convexHullContains(glm::vec3 point) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
MeshProxyList Model::getMeshes() {
|
MeshProxyList Model::getMeshes() const {
|
||||||
MeshProxyList result;
|
MeshProxyList result;
|
||||||
const Geometry::Pointer& renderGeometry = getGeometry();
|
const Geometry::Pointer& renderGeometry = getGeometry();
|
||||||
const Geometry::GeometryMeshes& meshes = renderGeometry->getMeshes();
|
const Geometry::GeometryMeshes& meshes = renderGeometry->getMeshes();
|
||||||
|
|
|
@ -257,7 +257,7 @@ public:
|
||||||
int getResourceDownloadAttempts() { return _renderWatcher.getResourceDownloadAttempts(); }
|
int getResourceDownloadAttempts() { return _renderWatcher.getResourceDownloadAttempts(); }
|
||||||
int getResourceDownloadAttemptsRemaining() { return _renderWatcher.getResourceDownloadAttemptsRemaining(); }
|
int getResourceDownloadAttemptsRemaining() { return _renderWatcher.getResourceDownloadAttemptsRemaining(); }
|
||||||
|
|
||||||
Q_INVOKABLE MeshProxyList getMeshes();
|
Q_INVOKABLE MeshProxyList getMeshes() const;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void loadURLFinished(bool success);
|
void loadURLFinished(bool success);
|
||||||
|
|
Loading…
Reference in a new issue