fix: removed unnecessary code

This commit is contained in:
Djairo Hougee 2024-05-28 19:42:16 +02:00
parent bc9b0f9070
commit 9526c3602c
2 changed files with 0 additions and 15 deletions

View File

@ -38,15 +38,6 @@ void Program::setWinProperties() {
this->interact->SetInteractorStyle(style); this->interact->SetInteractorStyle(style);
} }
void Program::setupTimer(int dt) {
auto callback = vtkSmartPointer<TimerCallbackCommand>::New(this);
callback->SetClientData(this);
callback->setDt(dt);
this->interact->AddObserver(vtkCommand::TimerEvent, callback);
this->interact->AddObserver(vtkCommand::KeyPressEvent, callback);
this->interact->CreateRepeatingTimer(17); // 60 fps == 1000 / 60 == 16.7 ms per frame
}
void Program::setupCameraCallback() { void Program::setupCameraCallback() {
auto callback = vtkSmartPointer<CameraMoveCallback>::New(this->cam); auto callback = vtkSmartPointer<CameraMoveCallback>::New(this->cam);
this->interact->AddObserver(vtkCommand::MouseWheelForwardEvent, callback); this->interact->AddObserver(vtkCommand::MouseWheelForwardEvent, callback);
@ -63,7 +54,6 @@ Program::Program(QWidget *parent): QVTKOpenGLNativeWidget(parent) {
this->win->SetNumberOfLayers(0); this->win->SetNumberOfLayers(0);
setWinProperties(); setWinProperties();
setupTimer(60 * 60); // FIXME: manually tracking this variable is a little stupid.
setupCameraCallback(); setupCameraCallback();
} }

View File

@ -39,11 +39,6 @@ private:
*/ */
void setWinProperties(); void setWinProperties();
/** This function sets up and connects a TimerCallbackCommand with the program.
*/
void setupTimer(int dt);
/** This function sets up the camera's associated movement callbacks.. /** This function sets up the camera's associated movement callbacks..
*/ */
void setupCameraCallback(); void setupCameraCallback();