-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add custom camera controller #244
base: master
Are you sure you want to change the base?
Add custom camera controller #244
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks nice and it is time for us to make tests for the UI code. Do you have an idea for how to write Python unit tests for it?
@@ -60,6 +60,45 @@ class ROrbitCameraController | |||
using Qt3DExtras::QOrbitCameraController::QOrbitCameraController; | |||
}; /* end class ROrbitCameraController */ | |||
|
|||
class RCustomCameraController |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even though this is prototype code, we may use a descriptive name for the class. What name would be informative?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, I don't know, I think it depends on the behavior of the camera? like orbital or FPS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How would you like the camera to behave (move)?
I've never wrote unit tests for UI, maybe try pytest-qt? |
If it does not take a lot of time (like more than 4 hours), it is a good idea to give it a try. |
As mentioned in issue #70, the current camera control needs improvement. This pull request aims to create our own camera controller class derived from
QAbstractCameraController
to better suit our requirements. At this point, the code introduces a new camera controller to the menu, which functions in the same way as theRFirstPersonCameraController
. Further discussion is needed to determinte which functions should be added to the controller.