From c92b9332547f2413f0dc44a670460908b2d5dd08 Mon Sep 17 00:00:00 2001 From: Matt Williams Date: Fri, 10 Jan 2014 19:13:21 +0000 Subject: [PATCH] A few consistency tweaks --- .../include/PolyVoxCore/DualContouringSurfaceExtractor.inl | 4 ++-- library/PolyVoxCore/include/PolyVoxCore/Impl/QEF.inl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/library/PolyVoxCore/include/PolyVoxCore/DualContouringSurfaceExtractor.inl b/library/PolyVoxCore/include/PolyVoxCore/DualContouringSurfaceExtractor.inl index 74b21cb1..4799ef66 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/DualContouringSurfaceExtractor.inl +++ b/library/PolyVoxCore/include/PolyVoxCore/DualContouringSurfaceExtractor.inl @@ -127,7 +127,7 @@ namespace PolyVox matrix[rows][1] = normal.getY(); matrix[rows][2] = normal.getZ(); - Vector3DFloat p = vertices[i] - massPoint; + const Vector3DFloat p = vertices[i] - massPoint; const Vector3DFloat product = normal * p; vector[rows] = product.getX() + product.getY() + product.getZ(); @@ -137,7 +137,7 @@ namespace PolyVox ++rows; } - const auto vertexPosition = evaluateQEF(matrix, vector, rows) + massPoint; + const auto& vertexPosition = evaluateQEF(matrix, vector, rows) + massPoint; if(cellVertexNormal.lengthSquared() > 0.000001f) { diff --git a/library/PolyVoxCore/include/PolyVoxCore/Impl/QEF.inl b/library/PolyVoxCore/include/PolyVoxCore/Impl/QEF.inl index ad4baed3..e5d9cba7 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/Impl/QEF.inl +++ b/library/PolyVoxCore/include/PolyVoxCore/Impl/QEF.inl @@ -35,7 +35,7 @@ Vector3DFloat evaluateQEF( double x[3]; solveSVD(u, v, d, vec, x, rows); - return Vector3DFloat((float)x[0], (float)x[1], (float)x[2]); + return {(float)x[0], (float)x[1], (float)x[2]}; } //----------------------------------------------------------------------------