changeset 1025:7912de3a15e0

AffineTransform2D::Combine with 5 args
author Alain Mazy <alain@mazy.be>
date Fri, 04 Oct 2019 17:47:31 +0200
parents 9889c819db01
children 0f100d0b9caf 692291406f6a
files Framework/Toolbox/AffineTransform2D.cpp Framework/Toolbox/AffineTransform2D.h
diffstat 2 files changed, 18 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Framework/Toolbox/AffineTransform2D.cpp	Fri Oct 04 17:47:13 2019 +0200
+++ b/Framework/Toolbox/AffineTransform2D.cpp	Fri Oct 04 17:47:31 2019 +0200
@@ -197,6 +197,18 @@
                                                     d.GetHomogeneousMatrix()));
   }
   
+  AffineTransform2D AffineTransform2D::Combine(const AffineTransform2D& a,
+                                               const AffineTransform2D& b,
+                                               const AffineTransform2D& c,
+                                               const AffineTransform2D& d,
+                                               const AffineTransform2D& e)
+  {
+    return AffineTransform2D(LinearAlgebra::Product(a.GetHomogeneousMatrix(),
+                                                    b.GetHomogeneousMatrix(),
+                                                    c.GetHomogeneousMatrix(),
+                                                    d.GetHomogeneousMatrix(),
+                                                    e.GetHomogeneousMatrix()));
+  }
 
   AffineTransform2D AffineTransform2D::CreateOffset(double dx,
                                                     double dy)
--- a/Framework/Toolbox/AffineTransform2D.h	Fri Oct 04 17:47:13 2019 +0200
+++ b/Framework/Toolbox/AffineTransform2D.h	Fri Oct 04 17:47:31 2019 +0200
@@ -77,6 +77,12 @@
                                      const AffineTransform2D& c,
                                      const AffineTransform2D& d);
 
+    static AffineTransform2D Combine(const AffineTransform2D& a,
+                                     const AffineTransform2D& b,
+                                     const AffineTransform2D& c,
+                                     const AffineTransform2D& d,
+                                     const AffineTransform2D& e);
+
     static AffineTransform2D CreateOffset(double dx,
                                           double dy);