diff options
Diffstat (limited to '')
-rw-r--r-- | src/utils/point_3d.hpp | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/src/utils/point_3d.hpp b/src/utils/point_3d.hpp index 0087c08a..1ce2a313 100644 --- a/src/utils/point_3d.hpp +++ b/src/utils/point_3d.hpp @@ -32,15 +32,27 @@ namespace usdx { - class Point3D : public Point + template <class T> + class Point3D : public Point<T> { private: - float z; + T z; + public: - Point3D(float x, float y, float z); - Point3D(const Point3D& point); + Point3D(T x, T y, T z) : + Point<T>(x, y), z(z) + { + } + + Point3D(const Point3D<T>& point) : + Point<T>(point), z(point.z) + { + } - float get_z(void) const; + T get_z(void) const + { + return z; + } }; }; |