From 59ccf586c46a56140ed1562aa65a49511fcd8db1 Mon Sep 17 00:00:00 2001 From: Luigi Malomo Date: Thu, 27 Jul 2017 14:47:49 +0200 Subject: [PATCH] static functions zero() an one() added to points --- vcg/space/deprecated_point2.h | 10 ++++++++++ vcg/space/deprecated_point3.h | 5 +++++ vcg/space/deprecated_point4.h | 10 ++++++++++ 3 files changed, 25 insertions(+) diff --git a/vcg/space/deprecated_point2.h b/vcg/space/deprecated_point2.h index 6ab5c84e..b93b49af 100644 --- a/vcg/space/deprecated_point2.h +++ b/vcg/space/deprecated_point2.h @@ -309,6 +309,16 @@ public: return Point2(b.X(),b.Y()); } + static inline Point2 Zero(void) + { + return Point2(0,0); + } + + static inline Point2 One(void) + { + return Point2(1,1); + } + }; // end class definition diff --git a/vcg/space/deprecated_point3.h b/vcg/space/deprecated_point3.h index bf52253d..0ddb3f39 100644 --- a/vcg/space/deprecated_point3.h +++ b/vcg/space/deprecated_point3.h @@ -208,6 +208,11 @@ public: return Point3(0,0,0); } + static inline Point3 One(void) + { + return Point3(1,1,1); + } + //@} //@{ diff --git a/vcg/space/deprecated_point4.h b/vcg/space/deprecated_point4.h index ec573a87..a27d9263 100644 --- a/vcg/space/deprecated_point4.h +++ b/vcg/space/deprecated_point4.h @@ -128,6 +128,16 @@ public: return Point4(T(b[0]),T(b[1]),T(b[2]),T(b[3])); } + static inline Point4 Zero(void) + { + return Point4(0,0,0,0); + } + + static inline Point4 One(void) + { + return Point4(1,1,1,1); + } + //@} //@{