src/gl/compiler.cpp

changeset 33
4c41bfe2ec6e
parent 30
1536f23cfab7
child 34
1de2b8d64e9f
--- a/src/gl/compiler.cpp	Sun Jan 26 01:06:27 2020 +0200
+++ b/src/gl/compiler.cpp	Sun Jan 26 14:29:30 2020 +0200
@@ -166,9 +166,9 @@
 	reserveMore(normalsBuffer, polygon.numPolygonVertices() * 3_z);
 	for (unsigned int i = 0; i < polygon.numPolygonVertices(); i += 1)
 	{
-		const Point3D& v1 = vertexRing[i - 1];
-		const Point3D& v2 = vertexRing[i];
-		const Point3D& v3 = vertexRing[i + 1];
+		const glm::vec3& v1 = vertexRing[i - 1];
+		const glm::vec3& v2 = vertexRing[i];
+		const glm::vec3& v3 = vertexRing[i + 1];
 		const QVector3D normal = QVector3D::crossProduct(v3 - v2, v1 - v2).normalized();
 		for (const GLfloat coord : {normal.x(), normal.y(), normal.z()})
 			normalsBuffer.push_back(coord);
@@ -179,7 +179,7 @@
 	// Transform vertices so that they're suitable for GL rendering
 	for (unsigned int i = 0; i < polygon.numPolygonVertices(); i += 1)
 	{
-		Point3D& point = polygon.vertices[i];
+		glm::vec3& point = polygon.vertices[i];
 		this->boundingBox.consider(polygon.vertices[i]);
 		vertexBuffer.push_back(static_cast<GLfloat>(point.x));
 		vertexBuffer.push_back(static_cast<GLfloat>(point.y));
@@ -212,7 +212,7 @@
 	return color;
 }
 
-Point3D gl::Compiler::modelCenter() const
+glm::vec3 gl::Compiler::modelCenter() const
 {
 	return boxCenter(this->boundingBox);
 }

mercurial