[cig-commits] r11248 - cs/benchmark/cigma/trunk/scratch/cg/src
luis at geodynamics.org
luis at geodynamics.org
Tue Feb 26 04:52:00 PST 2008
Author: luis
Date: 2008-02-26 04:52:00 -0800 (Tue, 26 Feb 2008)
New Revision: 11248
Modified:
cs/benchmark/cigma/trunk/scratch/cg/src/MainWindow.cpp
cs/benchmark/cigma/trunk/scratch/cg/src/MainWindow.h
Log:
In MainWindow, associate a vtkRenderer instance with the qvtkWidget
Modified: cs/benchmark/cigma/trunk/scratch/cg/src/MainWindow.cpp
===================================================================
--- cs/benchmark/cigma/trunk/scratch/cg/src/MainWindow.cpp 2008-02-26 12:51:58 UTC (rev 11247)
+++ cs/benchmark/cigma/trunk/scratch/cg/src/MainWindow.cpp 2008-02-26 12:52:00 UTC (rev 11248)
@@ -1,5 +1,10 @@
#include "MainWindow.h"
+#include "OrientationAxes.h"
+#include "RenderPoints.h"
+#include "vtkRenderer.h"
+
+#include <iostream>
#include <cstdlib>
#include <ctime>
#include <cmath>
@@ -14,6 +19,12 @@
connect(actionExit, SIGNAL(triggered()), this, SLOT(fileExit()));
+ // renderer
+ ren = vtkRenderer::New();
+ ren->SetBackground(25./256, 51./256, 102./256);
+ qvtkWidget->GetRenderWindow()->AddRenderer(ren);
+ AddOrientationAxes(qvtkWidget);
+ RenderPoints(ren);
}
Modified: cs/benchmark/cigma/trunk/scratch/cg/src/MainWindow.h
===================================================================
--- cs/benchmark/cigma/trunk/scratch/cg/src/MainWindow.h 2008-02-26 12:51:58 UTC (rev 11247)
+++ cs/benchmark/cigma/trunk/scratch/cg/src/MainWindow.h 2008-02-26 12:52:00 UTC (rev 11248)
@@ -4,7 +4,9 @@
#include <QtGui>
#include "ui_MainWindow.h"
+class vtkRenderer;
+
class MainWindow : public QMainWindow, Ui::MainWindow
{
Q_OBJECT
@@ -16,6 +18,8 @@
public slots:
void fileExit();
+public:
+ vtkRenderer *ren;
};
#endif
More information about the cig-commits
mailing list