Position2d.hpp

00001 // This file is part of the imaging2 class library.
00002 //
00003 // University of Innsbruck, Infmath Imaging, 2009.
00004 // http://infmath.uibk.ac.at
00005 //
00006 // All rights reserved.
00007 
00008 
00009 #ifndef SHAPE_MREP_POSITION2D_H
00010 #define SHAPE_MREP_POSITION2D_H
00011 
00012 #include <core/imaging2.hpp>
00013 
00014 namespace imaging
00015 {
00021   class Position2d
00022   {
00023     ublas::fixed_vector<float_t, 2> _center;
00024     float_t _rotation;
00025 
00026   public:
00027     static const size_t DIMENSION = 2;
00028 
00029     Position2d();
00030 
00032     Position2d(const ublas::fixed_vector<float_t, 2> & center, float_t rotation);
00033 
00035     void assign(const ublas::fixed_vector<float_t, 2> & center, float_t rotation);
00036 
00038     const ublas::fixed_vector<float_t, 2> & center() const { return _center; }
00039     
00041     float_t rotation() const { return _rotation; }
00042     
00044     void set_center(const ublas::fixed_vector<float_t, 2> & center) { _center = center; }
00045     
00047     void set_rotation(float_t rotation) { _rotation = rotation; }
00048 
00050     void exponential(ublas::vector<float_t>::const_iterator & vector, Position2d & shape) const;
00051 
00053     void logarithm(const Position2d & shape, ublas::vector<float_t>::iterator & vector) const;
00054     
00056     size_t dimension() const { return 3; }
00057   };
00058 
00059 }
00060 
00061 
00062 #endif
00063 
00064 
00065 

Generated on Tue Feb 10 10:01:30 2009 for imaging2 by  doxygen 1.5.5