summaryrefslogtreecommitdiff
path: root/assetFactory/faceController.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'assetFactory/faceController.cpp')
-rw-r--r--assetFactory/faceController.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/assetFactory/faceController.cpp b/assetFactory/faceController.cpp
index 1ec1467..2fb0412 100644
--- a/assetFactory/faceController.cpp
+++ b/assetFactory/faceController.cpp
@@ -33,8 +33,7 @@ FaceController::apply(ModelFactoryMesh & mesh, const StyleStack & parents, const
return std::move(out);
});
const auto vertexCount = points.size();
- const auto centre
- = std::accumulate(points.begin(), points.end(), glm::vec3 {}) / static_cast<float>(vertexCount);
+ const auto centre = mesh.calc_face_centroid(cf.second);
if (type == "extrude") {
Shape::CreatedFaces newFaces;
// mutate points