00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef INTERESTPOINTRENDERER_H_
00024 #define INTERESTPOINTRENDERER_H_
00025
00026 #include <gui/AbstractRenderer.h>
00027
00028 #include <geometry/point.h>
00029 #include <vector>
00030 #include <GL/gl.h>
00031 #include <GL/glu.h>
00032
00033 #include <iostream>
00034
00035 class InterestPointRenderer: public AbstractRenderer {
00036 public:
00037 InterestPointRenderer(const std::vector<const OrientedPoint2D *> *_points,
00038 const std::vector<double> * _scales);
00039
00040 InterestPointRenderer(const InterestPointRenderer& _renderer);
00041
00042 InterestPointRenderer& operator=(const InterestPointRenderer& _renderer);
00043
00044 virtual ~InterestPointRenderer();
00045
00046 inline void setDepth(float depth)
00047 {m_depth = depth;}
00048
00049 inline void setColors(const std::vector<Color>& _colors)
00050 {m_colors = _colors;}
00051 inline void setColor(unsigned int _index, float _red, float _green, float _blue, float _alpha = 1.0f)
00052 {if(_index < m_colors.size()) m_colors[_index] = Color(_red, _green, _blue, _alpha);}
00053 inline void setScaleFactor(float _size)
00054 {m_scaleFactor = _size;}
00055 inline void setSubdivision(int _around, int _along)
00056 {m_subdivision[0] = _around, m_subdivision[1] = _along;}
00057
00058 inline const std::vector<Color>& getColors() const
00059 {return m_colors;}
00060 inline float getScaleFactor() const
00061 {return m_scaleFactor;}
00062 inline void getSubdivision(int& _around, int& _along) const
00063 {_around = m_subdivision[0]; _along = m_subdivision[1];}
00064
00065 void setInterestPoints(const std::vector<const OrientedPoint2D *> *_points,
00066 const std::vector<double> * _scales);
00067
00068 inline const std::vector<const OrientedPoint2D *> * getInterestPoints() const
00069 {return m_interestPoints;}
00070 inline const std::vector<double> * getScales() const
00071 {return m_scales;}
00072
00073 virtual void render();
00074
00075 protected:
00076 const std::vector<const OrientedPoint2D *> *m_interestPoints;
00077 const std::vector<double> * m_scales;
00078 std::vector<GLUquadricObj*> m_GLUPoints;
00079 std::vector<Color> m_colors;
00080 float m_depth;
00081 float m_scaleFactor;
00082 int m_subdivision[2];
00083 };
00084
00085 #endif