Ignore:
Timestamp:
04/11/06 15:33:37 (18 years ago)
Author:
bittner
Message:

visualization of the render cost and pvs sizes for viewcells

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/src/GlRenderer.h

    r713 r746  
    6868  int timerId; 
    6969  bool mUseFalseColors; 
     70  bool mUseForcedColors; 
    7071 
    7172  HaltonSequence halton; 
     
    117118 
    118119 
    119 class GlRendererBuffer : public QGLPixelBuffer, public GlRenderer 
    120 { 
     120class GlRendererBuffer : public QObject, public QGLPixelBuffer,  public GlRenderer 
     121{ 
     122Q_OBJECT 
    121123public: 
    122124        GlRendererBuffer(const int w, 
     
    175177        float mError; 
    176178        int mPvsSize; 
     179        Vector3 mPosition; 
     180        Vector3 mDirection; 
    177181  }; 
    178182   
     
    185189        void SetupProjectionForViewPoint(const Vector3 &viewPoint,  
    186190                                                                         const Beam &beam,  
     191 
    187192                                                                         Intersectable *sourceObject); 
     193 
     194public: 
     195  signals: 
     196        UpdatePvsErrorItem(int i, 
     197                                           GlRendererBuffer::PvsErrorEntry &); 
    188198}; 
    189199 
     
    193203  Q_OBJECT 
    194204public: 
     205 
     206  QListWidget *mPvsErrorWidget; 
     207 
    195208  RendererControlWidget(QWidget * parent = 0, Qt::WFlags f = 0); 
     209 
     210  public slots: 
     211 
     212  void FocusNextPvsErrorFrame(); 
     213  void UpdatePvsErrorItem(int i, 
     214                                                  GlRendererBuffer::PvsErrorEntry &); 
    196215 
    197216  signals: 
     
    202221  SetVisibilityFilterSize(int); 
    203222 
     223  SetRenderFilter(bool); 
     224  SetRenderErrors(bool); 
    204225  SetShowViewCells(bool); 
     226  SetShowRenderCost(bool); 
     227  SetShowPvsSizes(bool); 
    205228  SetTopView(bool); 
    206229  SetCutViewCells(bool); 
    207230  SetCutScene(bool); 
    208231 
    209  
     232   
    210233}; 
    211234 
     
    222245  bool mCutViewCells; 
    223246  bool mCutScene; 
    224    
     247  bool mRenderErrors; 
     248  bool mRenderFilter; 
     249  bool mShowRenderCost; 
     250  bool mShowPvsSizes; 
     251 
    225252  Plane3 mSceneCutPlane; 
    226253  float mTopDistance; 
     254 
     255  // some statistics 
     256  int mPvsSize; 
     257  float mRenderError; 
     258 
     259  RendererControlWidget *mControlWidget; 
    227260   
    228261  GlRendererWidget(SceneGraph *sceneGraph, 
     
    249282 
    250283  void keyPressEvent ( QKeyEvent * e ) ; 
    251    
     284 
     285  void 
     286  RenderPvs(); 
     287 
    252288  float 
    253289  RenderErrors(); 
     
    265301 
    266302 public slots: 
    267  void 
    268  SetViewCellGranularity(int number); 
    269  
     303 
     304 void SetRenderErrors(bool b) { 
     305   mRenderErrors = b; 
     306   updateGL(); 
     307 } 
     308 
     309 void SetRenderFilter(bool b) { 
     310   mRenderFilter = b; 
     311   updateGL(); 
     312 } 
     313 
     314   
     315  void 
     316  SetViewCellGranularity(int number); 
     317   
    270318  void 
    271319  SetVisibilityFilterSize(int number); 
    272  
     320   
    273321  void 
    274322  SetSceneCut(int cut); 
     
    281329        updateGL(); 
    282330  } 
    283    
     331 
     332  void SetShowRenderCost(bool b) { 
     333        mShowRenderCost = b; 
     334        updateGL(); 
     335  } 
     336 
     337  void SetShowPvsSizes(bool b) { 
     338        mShowPvsSizes = b; 
     339        updateGL(); 
     340  } 
     341 
    284342  void SetTopView(bool b) { 
    285343        mTopView = b; 
     
    295353        updateGL(); 
    296354  } 
     355 
    297356 
    298357}; 
Note: See TracChangeset for help on using the changeset viewer.