#ifndef Q_CAMERA_WIDGET_H_ #define Q_CAMERA_WIDGET_H_ #include "BasicGlCamera.h" #include #include using namespace std; class QCameraWidget : public BasicGlCamera { Q_OBJECT typedef pair Position; typedef vector Positions; //FIXME this variable seems to be deprecated Positions fGeom; vector fBold; vector fEnable; vector highlightedPatches; vector highlightedPixels; int lastFace; public: void highlightPixel(int idx, bool highlight=true); void highlightPatch(int idx, bool highlight=true); void clearHighlightedPatches(); void clearHighlightedPixels(); QCameraWidget(QWidget *pparent = 0); void paintGL(); void mousePressEvent(QMouseEvent *cEvent); void mouseMoveEvent(QMouseEvent *event); void mouseDoubleClickEvent(QMouseEvent *event); void Reset(); void drawCamera(bool alsoWire); void DrawCameraText(); void drawPatches(); void SetEnable(int idx, bool b); double GetData(int idx); const char *GetName(); int GetIdx(float px, float py); char *GetObjectInfo(int px, int py); void SetData(const valarray &ddata); void SetData(const valarray &ddata); private: void CalculatePixelsColor(); void CalculatePatchColor(); }; typedef QCameraWidget Camera; #endif