#ifndef Q_CAMERA_WIDGET_H_ #define Q_CAMERA_WIDGET_H_ #include "BasicGlCamera.h" #include #include class QCameraWidget : public BasicGlCamera { Q_OBJECT typedef std::pair Position; typedef std::vector Positions; //FIXME this variable seems to be deprecated Positions fGeom; std::vector fBold; std::vector fEnable; std::vector highlightedPatches; std::vector highlightedPixels; int lastFace; bool fShowPixelMoveOver; bool fShowPatchMoveOver; 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 std::valarray &ddata); void SetData(const std::valarray &ddata); void ShowPixelCursor(bool); void ShowPatchCursor(bool); private: void CalculatePixelsColor(); void CalculatePatchColor(); }; typedef QCameraWidget Camera; #endif