toon-members
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Toon-members] TooN se3.h so3.h


From: Georg Klein
Subject: [Toon-members] TooN se3.h so3.h
Date: Thu, 16 Apr 2009 15:43:47 +0000

CVSROOT:        /sources/toon
Module name:    TooN
Changes by:     Georg Klein <georgklein>        09/04/16 15:43:47

Modified files:
        .              : se3.h so3.h 

Log message:
        Added generator_field backwards-compatibility funcs

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/TooN/se3.h?cvsroot=toon&r1=1.22&r2=1.23
http://cvs.savannah.gnu.org/viewcvs/TooN/so3.h?cvsroot=toon&r1=1.32&r2=1.33

Patches:
Index: se3.h
===================================================================
RCS file: /sources/toon/TooN/se3.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -r1.22 -r1.23
--- se3.h       15 Apr 2009 15:50:33 -0000      1.22
+++ se3.h       16 Apr 2009 15:43:46 -0000      1.23
@@ -114,6 +114,20 @@
                return result;
        }
 
+  /// Returns the i-th generator times pos
+  template<typename Base>
+  inline static Vector<4,Precision> generator_field(int i, const Vector<4, 
Precision, Base>& pos)
+  {
+    Vector<4, Precision> result(Zero);
+    if(i < 3){
+      result[i]=pos[3];
+      return result;
+    }
+    result[(i+1)%3] = - pos[(i+2)%3];
+    result[(i+2)%3] = pos[(i+1)%3];
+    return result;
+  }
+  
        /// Transfer a matrix in the Lie Algebra from one
        /// co-ordinate frame to another. This is the operation such that for a 
matrix 
        /// \f$ B \f$, 

Index: so3.h
===================================================================
RCS file: /sources/toon/TooN/so3.h,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -b -r1.32 -r1.33
--- so3.h       15 Apr 2009 15:50:33 -0000      1.32
+++ so3.h       16 Apr 2009 15:43:46 -0000      1.33
@@ -117,6 +117,17 @@
                return result;
        }
 
+  /// Returns the i-th generator times pos
+  template<typename Base>
+  inline static Vector<3,Precision> generator_field(int i, const Vector<3, 
Precision, Base>& pos)
+  {
+    Vector<3, Precision> result;
+    result[i]=0;
+    result[(i+1)%3] = - pos[(i+2)%3];
+    result[(i+2)%3] = pos[(i+1)%3];
+    return result;
+  }
+
        /// Transfer a vector in the Lie Algebra from one
        /// co-ordinate frame to another such that for a matrix 
        /// \f$ M \f$, the adjoint \f$Adj()\f$ obeys




reply via email to

[Prev in Thread] Current Thread [Next in Thread]