libcvd-members
[Top][All Lists]
Advanced

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

[libcvd-members] libcvd/cvd gl_helpers.h se2.h so2.h


From: Georg Klein
Subject: [libcvd-members] libcvd/cvd gl_helpers.h se2.h so2.h
Date: Wed, 22 Aug 2007 14:20:03 +0000

CVSROOT:        /cvsroot/libcvd
Module name:    libcvd
Changes by:     Georg Klein <georgklein>        07/08/22 14:20:03

Modified files:
        cvd            : gl_helpers.h 
Added files:
        cvd            : se2.h so2.h 

Log message:
        Added support for TooN::SO2 and SE2

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/libcvd/cvd/gl_helpers.h?cvsroot=libcvd&r1=1.30&r2=1.31
http://cvs.savannah.gnu.org/viewcvs/libcvd/cvd/se2.h?cvsroot=libcvd&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/libcvd/cvd/so2.h?cvsroot=libcvd&rev=1.1

Patches:
Index: gl_helpers.h
===================================================================
RCS file: /cvsroot/libcvd/libcvd/cvd/gl_helpers.h,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -b -r1.30 -r1.31
--- gl_helpers.h        8 May 2007 17:01:13 -0000       1.30
+++ gl_helpers.h        22 Aug 2007 14:20:02 -0000      1.31
@@ -40,6 +40,8 @@
 #include <TooN/TooN.h>
 #include <cvd/se3.h>
 #include <cvd/so3.h>
+#include <cvd/se2.h>
+#include <cvd/so2.h>
 #endif
 
 namespace CVD
@@ -249,6 +251,23 @@
                glMultMatrix( se3.get_rotation());
        }
 
+       /// multiplies a SO2 onto the current matrix stack
+       /// @param so2 the SO2
+       /// @ingroup gGL
+       inline void glMultMatrix( const CVD::SO2 & so2 )
+       {
+               glMultMatrix( so2.get_matrix());
+       }
+
+       /// multiplies a SE2 onto the current matrix stack. This multiplies
+       /// the SO2 and the translation in order.
+       /// @param se3 the SE2
+       /// @ingroup gGL
+       inline void glMultMatrix( const CVD::SE2 & se2 )
+       {
+               glTranslate( se2.get_translation());
+               glMultMatrix( se2.get_rotation());
+       }
 
        /// Sets up an ortho projection suitable for drawing onto individual 
pixels of a
        /// gl window (or video image.) glVertex2f(0.0,0.0) will be the top 
left pixel and

Index: se2.h
===================================================================
RCS file: se2.h
diff -N se2.h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ se2.h       22 Aug 2007 14:20:03 -0000      1.1
@@ -0,0 +1,41 @@
+/*                       
+       This file is part of the CVD Library.
+
+       Copyright (C) 2007 The Authors
+
+       This library is free software; you can redistribute it and/or
+       modify it under the terms of the GNU Lesser General Public
+       License as published by the Free Software Foundation; either
+       version 2.1 of the License, or (at your option) any later version.
+
+       This library is distributed in the hope that it will be useful,
+       but WITHOUT ANY WARRANTY; without even the implied warranty of
+       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+       Lesser General Public License for more details.
+
+       You should have received a copy of the GNU Lesser General Public
+       License along with this library; if not, write to the Free Software
+       Foundation, Inc., 
+    51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+*/
+//-*- c++ -*-
+#ifndef CVD_INC_SE2_H
+#define CVD_INC_SE2_H
+
+#include <TooN/se2.h>
+
+namespace CVD {
+
+/// Class to represent a tho-dimensional Euclidean transformation (a rotation 
and a translation). 
+/// This can be represented by a member of the Special Euclidean Lie group 
SE2. These can be parameterised
+/// by three numbers (in the space of the Lie Algebra). In this class, the 
first two parameters are a
+/// translation vector while the third number is a rotation angle.
+///
+/// See the TooN documentation
+/// @ingroup gLinAlg
+       
+       using TooN::SE2;
+
+}
+
+#endif

Index: so2.h
===================================================================
RCS file: so2.h
diff -N so2.h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ so2.h       22 Aug 2007 14:20:03 -0000      1.1
@@ -0,0 +1,41 @@
+/*                       
+       This file is part of the CVD Library.
+
+       Copyright (C) 2007 The Authors
+
+       This library is free software; you can redistribute it and/or
+       modify it under the terms of the GNU Lesser General Public
+       License as published by the Free Software Foundation; either
+       version 2.1 of the License, or (at your option) any later version.
+
+       This library is distributed in the hope that it will be useful,
+       but WITHOUT ANY WARRANTY; without even the implied warranty of
+       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+       Lesser General Public License for more details.
+
+       You should have received a copy of the GNU Lesser General Public
+       License along with this library; if not, write to the Free Software
+       Foundation, Inc., 
+    51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+*/
+//-*- c++ -*-
+#ifndef CVD_INC_SO2_H
+#define CVD_INC_SO2_H
+
+#include <TooN/so2.h>
+
+namespace CVD {
+
+/// Class to represent a two-dimensional rotation matrix. Two-dimensional 
rotation
+/// matrices are members of the Special Orthogonal Lie group SO2. This group 
can be parameterised
+/// by one numbers (a rotation). Exponentiating this angle gives the matrix,
+/// and the logarithm of the matrix gives this angle.
+
+/// See the TooN documentation
+/// @ingroup gLinAlg 
+       
+       using TooN::SO2;
+
+}
+
+#endif




reply via email to

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