From bb5288bcc02a9218ef7a7895010819b6e264a20c Mon Sep 17 00:00:00 2001 From: nicopietroni Date: Mon, 14 Sep 2015 12:03:47 +0000 Subject: [PATCH] templated SimpleVoxelWithNormal class to ScalarType --- vcg/complex/algorithms/create/mc_trivial_walker.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/vcg/complex/algorithms/create/mc_trivial_walker.h b/vcg/complex/algorithms/create/mc_trivial_walker.h index 496aefd9..28dcf591 100644 --- a/vcg/complex/algorithms/create/mc_trivial_walker.h +++ b/vcg/complex/algorithms/create/mc_trivial_walker.h @@ -124,16 +124,18 @@ public: vcg::Point3 &N() { static Point3 _p(0,0,0); return _p;} }; +template class SimpleVoxelWithNormal { private: - float _v; - vcg::Point3f _n; + _ScalarType _v; + vcg::Point3<_ScalarType> _n; public: - float &V() {return _v;} - float V() const {return _v;} - vcg::Point3f &N() {return _n;} - vcg::Point3f N() const {return _n;} + typedef _ScalarType ScalarType; + ScalarType &V() {return _v;} + ScalarType V() const {return _v;} + vcg::Point3 &N() {return _n;} + vcg::Point3 N() const {return _n;} static bool HasNormal() {return true;} };