feat: qwidget layout

This commit is contained in:
djaidjai committed 2024-05-26 03:03:21 +02:00
1 parent 4a5b7c4712
commit 7d7e1a5b95
8 files changed
+801 -268

No files matched your search

+8 -4
View File
@@ -51,17 +51,17 @@ void Program::setupCameraCallback() {
this->interact->AddObserver(vtkCommand::KeyPressEvent, callback);
}
Program::Program(int timerDT, vtkSmartPointer<vtkGenericOpenGLRenderWindow> win) {
// this->win = vtkSmartPointer<vtkGenericOpenGLRenderWindow>::New();
this->win = win;
Program::Program(QWidget *parent): QVTKOpenGLNativeWidget(parent) {
this->win = vtkSmartPointer<vtkGenericOpenGLRenderWindow>::New();
// this->interact = vtkSmartPointer<vtkRenderWindowInteractor>::New();
// this->interact = vtkSmartPointer<QVTKInteractor>::New();
setRenderWindow(this->win);
this->interact = win->GetInteractor();
this->cam = createNormalisedCamera();
this->win->SetNumberOfLayers(0);
setWinProperties();
setupTimer(timerDT);
setupTimer(60 * 60); // FIXME: manually tracking this variable is a little stupid.
setupCameraCallback();
}
@@ -103,3 +103,7 @@ void Program::render() {
win->Render();
interact->Start();
}
Program::~Program() {
cout << "deleting program" << endl;
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.