GCOP  1.0
point3dmanifold.h
Go to the documentation of this file.
00001 #ifndef GCOP_POINT3DMANIFOLD_H
00002 #define GCOP_POINT3DMANIFOLD_H
00003 
00004 #include "manifold.h"
00005 
00006 namespace gcop {
00007   
00008   using namespace std;
00009   using namespace Eigen;
00010   
00011   typedef Matrix<double, 6, 1> Vector6d;
00012   typedef Matrix<double, 6, 6> Matrix6d;
00013   
00014   struct Point3dState {
00015   Point3dState() : 
00016     q(Vector3d::Zero()), 
00017       v(Vector3d::Zero()),       
00018       P(Matrix6d::Identity()) {
00019     }
00020     
00021     Vector3d q;  
00022     Vector3d v;  
00023     Matrix6d P;   
00024   };
00025   
00026   //  typedef pair<Matrix3d, Vector6d> Point3dState;
00027   
00028   class Point3dManifold : public Manifold<Point3dState, 6> {
00029     
00030   public:
00031     static Point3dManifold& Instance();
00032 
00033     void Lift(Vector6d &dx,
00034               const Point3dState &xa,
00035               const Point3dState &xb);      
00036 
00037     void Retract(Point3dState &xb, 
00038                  const Point3dState &xa,
00039                  const Vector6d &dx);
00040 
00041   private:
00042     Point3dManifold();
00043   };  
00044 }
00045 
00046 
00047 #endif