diff --git a/happly.h b/happly.h index 77d92d1..5052e4f 100644 --- a/happly.h +++ b/happly.h @@ -1439,13 +1439,14 @@ class PLYData { * * @return A vector of vertex positions. */ - std::vector> getVertexPositions(const std::string& vertexElementName = "vertex") { + template + std::vector> getVertexPositions(const std::string& vertexElementName = "vertex") { - std::vector xPos = getElement(vertexElementName).getProperty("x"); - std::vector yPos = getElement(vertexElementName).getProperty("y"); - std::vector zPos = getElement(vertexElementName).getProperty("z"); + std::vector xPos = getElement(vertexElementName).getProperty("x"); + std::vector yPos = getElement(vertexElementName).getProperty("y"); + std::vector zPos = getElement(vertexElementName).getProperty("z"); - std::vector> result(xPos.size()); + std::vector> result(xPos.size()); for (size_t i = 0; i < result.size(); i++) { result[i][0] = xPos[i]; result[i][1] = yPos[i];