From 951fbb6575011d3746a39e28d2f185230db6925d Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Mon, 12 Jun 2017 14:41:03 +0200 Subject: [PATCH] ENH: add construct from floatVector for STLpoint (issue #491) --- src/fileFormats/stl/STLpoint.H | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/fileFormats/stl/STLpoint.H b/src/fileFormats/stl/STLpoint.H index 3c432c09ee..f6c1f2ea92 100644 --- a/src/fileFormats/stl/STLpoint.H +++ b/src/fileFormats/stl/STLpoint.H @@ -47,7 +47,7 @@ namespace Foam class STLpoint : - public Vector + public floatVector { public: @@ -58,28 +58,34 @@ public: inline STLpoint() {} + //- Construct from base class + inline STLpoint(const floatVector& v) + : + floatVector(v) + {} + //- Construct from components inline STLpoint(float x, float y, float z) : - Vector(x, y, z) + floatVector(x, y, z) {} //- Construct from components inline STLpoint(double x, double y, double z) : - Vector(float(x), float(y), float(z)) + floatVector(float(x), float(y), float(z)) {} //- Construct from point inline STLpoint(const point& pt) : - Vector(float(pt.x()), float(pt.y()), float(pt.z())) + floatVector(float(pt.x()), float(pt.y()), float(pt.z())) {} //- Construct from istream inline STLpoint(Istream& is) : - Vector(is) + floatVector(is) {}