From e0fc90f3aaf533e1c2fd309c22f5b62012883f53 Mon Sep 17 00:00:00 2001 From: Martin Date: Mon, 8 Jul 2024 16:54:45 +0200 Subject: [PATCH] Fix naming of Mat.TransposedTransformProj methods --- src/Aardvark.Base/Math/Trafos/Matrix_auto.cs | 112 ++++++++++++++---- .../Math/Trafos/Matrix_template.cs | 14 ++- 2 files changed, 99 insertions(+), 27 deletions(-) diff --git a/src/Aardvark.Base/Math/Trafos/Matrix_auto.cs b/src/Aardvark.Base/Math/Trafos/Matrix_auto.cs index 44448f54..e6bb3fd9 100644 --- a/src/Aardvark.Base/Math/Trafos/Matrix_auto.cs +++ b/src/Aardvark.Base/Math/Trafos/Matrix_auto.cs @@ -24332,17 +24332,21 @@ public static V2i TransposedTransformPos(this M33i m, V2i p) /// Transforms point p (v.Z is presumed 1.0) by transposed version of matrix m. /// Projective transform is performed. Perspective Division is performed. /// - public static V2i TransposedTransformProj(this M33i m, V2i p) + public static V2i TransposedTransformPosProj(this M33i m, V2i p) { var s = m.M02 * p.X + m.M12 * p.Y + m.M22; return TransposedTransformPos(m, p) * (1 / s); } + [Obsolete("Use TransposedTransformPosProj instead.")] + public static V2i TransposedTransformProj(this M33i m, V2i p) + => m.TransposedTransformPosProj(p); + /// /// Transforms point p (v.Z is presumed 1.0) by transposed version of matrix m. - /// Projective transform is performed. Perspective Division is performed. + /// Projective transform is performed. /// - public static V3i TransposedTransformProjFull(this M33i m, V2i p) + public static V3i TransposedTransformPosProjFull(this M33i m, V2i p) { return new V3i( m.M00 * p.X + m.M10 * p.Y + m.M20, @@ -24351,6 +24355,10 @@ public static V3i TransposedTransformProjFull(this M33i m, V2i p) ); } + [Obsolete("Use TransposedTransformPosProjFull instead.")] + public static V3i TransposedTransformProjFull(this M33i m, V2i p) + => m.TransposedTransformPosProjFull(p); + #endregion #region Operations @@ -27645,17 +27653,21 @@ public static V2l TransposedTransformPos(this M33l m, V2l p) /// Transforms point p (v.Z is presumed 1.0) by transposed version of matrix m. /// Projective transform is performed. Perspective Division is performed. /// - public static V2l TransposedTransformProj(this M33l m, V2l p) + public static V2l TransposedTransformPosProj(this M33l m, V2l p) { var s = m.M02 * p.X + m.M12 * p.Y + m.M22; return TransposedTransformPos(m, p) * (1 / s); } + [Obsolete("Use TransposedTransformPosProj instead.")] + public static V2l TransposedTransformProj(this M33l m, V2l p) + => m.TransposedTransformPosProj(p); + /// /// Transforms point p (v.Z is presumed 1.0) by transposed version of matrix m. - /// Projective transform is performed. Perspective Division is performed. + /// Projective transform is performed. /// - public static V3l TransposedTransformProjFull(this M33l m, V2l p) + public static V3l TransposedTransformPosProjFull(this M33l m, V2l p) { return new V3l( m.M00 * p.X + m.M10 * p.Y + m.M20, @@ -27664,6 +27676,10 @@ public static V3l TransposedTransformProjFull(this M33l m, V2l p) ); } + [Obsolete("Use TransposedTransformPosProjFull instead.")] + public static V3l TransposedTransformProjFull(this M33l m, V2l p) + => m.TransposedTransformPosProjFull(p); + #endregion #region Operations @@ -31171,17 +31187,21 @@ public static V2f TransposedTransformPos(this M33f m, V2f p) /// Transforms point p (v.Z is presumed 1.0) by transposed version of matrix m. /// Projective transform is performed. Perspective Division is performed. /// - public static V2f TransposedTransformProj(this M33f m, V2f p) + public static V2f TransposedTransformPosProj(this M33f m, V2f p) { var s = m.M02 * p.X + m.M12 * p.Y + m.M22; return TransposedTransformPos(m, p) * (1 / s); } + [Obsolete("Use TransposedTransformPosProj instead.")] + public static V2f TransposedTransformProj(this M33f m, V2f p) + => m.TransposedTransformPosProj(p); + /// /// Transforms point p (v.Z is presumed 1.0) by transposed version of matrix m. - /// Projective transform is performed. Perspective Division is performed. + /// Projective transform is performed. /// - public static V3f TransposedTransformProjFull(this M33f m, V2f p) + public static V3f TransposedTransformPosProjFull(this M33f m, V2f p) { return new V3f( m.M00 * p.X + m.M10 * p.Y + m.M20, @@ -31190,6 +31210,10 @@ public static V3f TransposedTransformProjFull(this M33f m, V2f p) ); } + [Obsolete("Use TransposedTransformPosProjFull instead.")] + public static V3f TransposedTransformProjFull(this M33f m, V2f p) + => m.TransposedTransformPosProjFull(p); + #endregion #region Operations @@ -34802,17 +34826,21 @@ public static V2d TransposedTransformPos(this M33d m, V2d p) /// Transforms point p (v.Z is presumed 1.0) by transposed version of matrix m. /// Projective transform is performed. Perspective Division is performed. /// - public static V2d TransposedTransformProj(this M33d m, V2d p) + public static V2d TransposedTransformPosProj(this M33d m, V2d p) { var s = m.M02 * p.X + m.M12 * p.Y + m.M22; return TransposedTransformPos(m, p) * (1 / s); } + [Obsolete("Use TransposedTransformPosProj instead.")] + public static V2d TransposedTransformProj(this M33d m, V2d p) + => m.TransposedTransformPosProj(p); + /// /// Transforms point p (v.Z is presumed 1.0) by transposed version of matrix m. - /// Projective transform is performed. Perspective Division is performed. + /// Projective transform is performed. /// - public static V3d TransposedTransformProjFull(this M33d m, V2d p) + public static V3d TransposedTransformPosProjFull(this M33d m, V2d p) { return new V3d( m.M00 * p.X + m.M10 * p.Y + m.M20, @@ -34821,6 +34849,10 @@ public static V3d TransposedTransformProjFull(this M33d m, V2d p) ); } + [Obsolete("Use TransposedTransformPosProjFull instead.")] + public static V3d TransposedTransformProjFull(this M33d m, V2d p) + => m.TransposedTransformPosProjFull(p); + #endregion #region Operations @@ -52309,17 +52341,21 @@ public static V3i TransposedTransformPos(this M44i m, V3i p) /// Transforms point p (v.W is presumed 1.0) by transposed version of matrix m. /// Projective transform is performed. Perspective Division is performed. /// - public static V3i TransposedTransformProj(this M44i m, V3i p) + public static V3i TransposedTransformPosProj(this M44i m, V3i p) { var s = m.M03 * p.X + m.M13 * p.Y + m.M23 * p.Z + m.M33; return TransposedTransformPos(m, p) * (1 / s); } + [Obsolete("Use TransposedTransformPosProj instead.")] + public static V3i TransposedTransformProj(this M44i m, V3i p) + => m.TransposedTransformPosProj(p); + /// /// Transforms point p (v.W is presumed 1.0) by transposed version of matrix m. - /// Projective transform is performed. Perspective Division is performed. + /// Projective transform is performed. /// - public static V4i TransposedTransformProjFull(this M44i m, V3i p) + public static V4i TransposedTransformPosProjFull(this M44i m, V3i p) { return new V4i( m.M00 * p.X + m.M10 * p.Y + m.M20 * p.Z + m.M30, @@ -52329,6 +52365,10 @@ public static V4i TransposedTransformProjFull(this M44i m, V3i p) ); } + [Obsolete("Use TransposedTransformPosProjFull instead.")] + public static V4i TransposedTransformProjFull(this M44i m, V3i p) + => m.TransposedTransformPosProjFull(p); + #endregion #region Operations @@ -56221,17 +56261,21 @@ public static V3l TransposedTransformPos(this M44l m, V3l p) /// Transforms point p (v.W is presumed 1.0) by transposed version of matrix m. /// Projective transform is performed. Perspective Division is performed. /// - public static V3l TransposedTransformProj(this M44l m, V3l p) + public static V3l TransposedTransformPosProj(this M44l m, V3l p) { var s = m.M03 * p.X + m.M13 * p.Y + m.M23 * p.Z + m.M33; return TransposedTransformPos(m, p) * (1 / s); } + [Obsolete("Use TransposedTransformPosProj instead.")] + public static V3l TransposedTransformProj(this M44l m, V3l p) + => m.TransposedTransformPosProj(p); + /// /// Transforms point p (v.W is presumed 1.0) by transposed version of matrix m. - /// Projective transform is performed. Perspective Division is performed. + /// Projective transform is performed. /// - public static V4l TransposedTransformProjFull(this M44l m, V3l p) + public static V4l TransposedTransformPosProjFull(this M44l m, V3l p) { return new V4l( m.M00 * p.X + m.M10 * p.Y + m.M20 * p.Z + m.M30, @@ -56241,6 +56285,10 @@ public static V4l TransposedTransformProjFull(this M44l m, V3l p) ); } + [Obsolete("Use TransposedTransformPosProjFull instead.")] + public static V4l TransposedTransformProjFull(this M44l m, V3l p) + => m.TransposedTransformPosProjFull(p); + #endregion #region Operations @@ -60322,17 +60370,21 @@ public static V3f TransposedTransformPos(this M44f m, V3f p) /// Transforms point p (v.W is presumed 1.0) by transposed version of matrix m. /// Projective transform is performed. Perspective Division is performed. /// - public static V3f TransposedTransformProj(this M44f m, V3f p) + public static V3f TransposedTransformPosProj(this M44f m, V3f p) { var s = m.M03 * p.X + m.M13 * p.Y + m.M23 * p.Z + m.M33; return TransposedTransformPos(m, p) * (1 / s); } + [Obsolete("Use TransposedTransformPosProj instead.")] + public static V3f TransposedTransformProj(this M44f m, V3f p) + => m.TransposedTransformPosProj(p); + /// /// Transforms point p (v.W is presumed 1.0) by transposed version of matrix m. - /// Projective transform is performed. Perspective Division is performed. + /// Projective transform is performed. /// - public static V4f TransposedTransformProjFull(this M44f m, V3f p) + public static V4f TransposedTransformPosProjFull(this M44f m, V3f p) { return new V4f( m.M00 * p.X + m.M10 * p.Y + m.M20 * p.Z + m.M30, @@ -60342,6 +60394,10 @@ public static V4f TransposedTransformProjFull(this M44f m, V3f p) ); } + [Obsolete("Use TransposedTransformPosProjFull instead.")] + public static V4f TransposedTransformProjFull(this M44f m, V3f p) + => m.TransposedTransformPosProjFull(p); + #endregion #region Operations @@ -64551,17 +64607,21 @@ public static V3d TransposedTransformPos(this M44d m, V3d p) /// Transforms point p (v.W is presumed 1.0) by transposed version of matrix m. /// Projective transform is performed. Perspective Division is performed. /// - public static V3d TransposedTransformProj(this M44d m, V3d p) + public static V3d TransposedTransformPosProj(this M44d m, V3d p) { var s = m.M03 * p.X + m.M13 * p.Y + m.M23 * p.Z + m.M33; return TransposedTransformPos(m, p) * (1 / s); } + [Obsolete("Use TransposedTransformPosProj instead.")] + public static V3d TransposedTransformProj(this M44d m, V3d p) + => m.TransposedTransformPosProj(p); + /// /// Transforms point p (v.W is presumed 1.0) by transposed version of matrix m. - /// Projective transform is performed. Perspective Division is performed. + /// Projective transform is performed. /// - public static V4d TransposedTransformProjFull(this M44d m, V3d p) + public static V4d TransposedTransformPosProjFull(this M44d m, V3d p) { return new V4d( m.M00 * p.X + m.M10 * p.Y + m.M20 * p.Z + m.M30, @@ -64571,6 +64631,10 @@ public static V4d TransposedTransformProjFull(this M44d m, V3d p) ); } + [Obsolete("Use TransposedTransformPosProjFull instead.")] + public static V4d TransposedTransformProjFull(this M44d m, V3d p) + => m.TransposedTransformPosProjFull(p); + #endregion #region Operations diff --git a/src/Aardvark.Base/Math/Trafos/Matrix_template.cs b/src/Aardvark.Base/Math/Trafos/Matrix_template.cs index 1857962a..7b761b08 100644 --- a/src/Aardvark.Base/Math/Trafos/Matrix_template.cs +++ b/src/Aardvark.Base/Math/Trafos/Matrix_template.cs @@ -1825,23 +1825,31 @@ public static __vmsub1type__ TransposedTransformPos(this __nmtype__ m, __vmsub1t /// Transforms point p (v.__fields[m-1]__ is presumed 1.0) by transposed version of matrix m. /// Projective transform is performed. Perspective Division is performed. /// - public static __vmsub1type__ TransposedTransformProj(this __nmtype__ m, __vmsub1type__ p) + public static __vmsub1type__ TransposedTransformPosProj(this __nmtype__ m, __vmsub1type__ p) { var s = /*# mfields.Take(msub1).ForEach((fr, r) => { */m.M__r____msub1__ * p.__fr__/*#}, add);*/ + m.M__msub1____msub1__; return TransposedTransformPos(m, p) * (1 / s); } + [Obsolete("Use TransposedTransformPosProj instead.")] + public static __vmsub1type__ TransposedTransformProj(this __nmtype__ m, __vmsub1type__ p) + => m.TransposedTransformPosProj(p); + /// /// Transforms point p (v.__fields[m-1]__ is presumed 1.0) by transposed version of matrix m. - /// Projective transform is performed. Perspective Division is performed. + /// Projective transform is performed. /// - public static __vmtype__ TransposedTransformProjFull(this __nmtype__ m, __vmsub1type__ p) + public static __vmtype__ TransposedTransformPosProjFull(this __nmtype__ m, __vmsub1type__ p) { return new __vmtype__(/*# m.ForEach(s => { */ /*# mfields.Take(msub1).ForEach((fr, r) => { */m.M__r____s__ * p.__fr__/*#}, add);*/ + m.M__msub1____s__/*#}, comma);*/ ); } + [Obsolete("Use TransposedTransformPosProjFull instead.")] + public static __vmtype__ TransposedTransformProjFull(this __nmtype__ m, __vmsub1type__ p) + => m.TransposedTransformPosProjFull(p); + //# } // n != m //# } // m > 2 //# if (m == n + 1) {