Skip to content
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

Updated vsgcameras example to use mouse buttons 4/5 #249

Merged
merged 2 commits into from
Aug 21, 2023

Conversation

lufriem
Copy link
Contributor

@lufriem lufriem commented Aug 21, 2023

This example is now leveraging the newly gained support for mouse buttons 4 and 5 to select the next and previous camera, respectively.

@@ -24,6 +24,29 @@ class CameraSelector : public vsg::Inherit<vsg::Visitor, CameraSelector>
vsg::ref_ptr<vsg::Camera> main_camera;
vsg::ref_ptr<vsg::LookAt> original_viewMatrix;
Cameras cameras;
int currentCameraIndex = 0;

void apply(vsg::ButtonPressEvent &buttonPress) override
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, the VSG and the rest of eco system use "TYPE& variable" convention rather than "TYPE &variable" convention. To me the type is TYPE& and &variable is the address.

@robertosfield robertosfield merged commit 0513d83 into vsg-dev:master Aug 21, 2023
@lufriem lufriem deleted the lrdev branch August 21, 2023 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants