mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-17 03:30:30 +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 z = getFloat();
|
||||
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;
|
||||
bool hasVertexColor = false;
|
||||
|
@ -415,7 +414,8 @@ bool OBJReader::parseOBJGroup(OBJTokenizer& tokenizer, const QVariantHash& mappi
|
|||
#endif
|
||||
}
|
||||
} else if (token == "v") {
|
||||
glm::vec3 vertex, vertexColor;
|
||||
glm::vec3 vertex;
|
||||
glm::vec3 vertexColor { glm::vec3(1.0f) };
|
||||
|
||||
bool hasVertexColor = tokenizer.getVertex(vertex, vertexColor);
|
||||
vertices.append(vertex);
|
||||
|
|
|
@ -463,7 +463,7 @@ bool Model::convexHullContains(glm::vec3 point) {
|
|||
return false;
|
||||
}
|
||||
|
||||
MeshProxyList Model::getMeshes() {
|
||||
MeshProxyList Model::getMeshes() const {
|
||||
MeshProxyList result;
|
||||
const Geometry::Pointer& renderGeometry = getGeometry();
|
||||
const Geometry::GeometryMeshes& meshes = renderGeometry->getMeshes();
|
||||
|
|
|
@ -257,7 +257,7 @@ public:
|
|||
int getResourceDownloadAttempts() { return _renderWatcher.getResourceDownloadAttempts(); }
|
||||
int getResourceDownloadAttemptsRemaining() { return _renderWatcher.getResourceDownloadAttemptsRemaining(); }
|
||||
|
||||
Q_INVOKABLE MeshProxyList getMeshes();
|
||||
Q_INVOKABLE MeshProxyList getMeshes() const;
|
||||
|
||||
public slots:
|
||||
void loadURLFinished(bool success);
|
||||
|
|
Loading…
Reference in a new issue