Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
VkCV Framework
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Vulkan2021
VkCV Framework
Commits
b0660863
Verified
Commit
b0660863
authored
3 years ago
by
Josch Morgenstern
Browse files
Options
Downloads
Patches
Plain Diff
[
#42
] remove camera & window from controller
parent
48081157
No related branches found
No related tags found
1 merge request
!35
Resolve "Kamera - Trackballkamera"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/camera/include/vkcv/camera/CameraController.hpp
+5
-28
5 additions, 28 deletions
modules/camera/include/vkcv/camera/CameraController.hpp
with
5 additions
and
28 deletions
modules/camera/include/vkcv/camera/CameraController.hpp
+
5
−
28
View file @
b0660863
...
...
@@ -10,11 +10,6 @@ namespace vkcv {
* #PilotCameraController.
*/
class
CameraController
{
protected:
Camera
*
m_camera
;
Window
*
m_window
;
double
m_lastX
;
double
m_lastY
;
public:
...
...
@@ -23,29 +18,11 @@ namespace vkcv {
*/
CameraController
()
=
default
;
/**
* @brief Gets the camera object.
* @return The camera object.
*/
Camera
&
getCamera
();
/**
* @brief Sets @p camera as the new camera object.
* @param camera The new camera object.
*/
virtual
void
setCamera
(
Camera
&
camera
);
/**
* @brief Sets @p window as the new window object.
* @param window The new window object.
*/
void
setWindow
(
Window
&
window
);
/**
* @brief Updates the camera object in respect to @p deltaTime.
* @param deltaTime The time that has passed since last update.
*/
virtual
void
updateCamera
(
double
deltaTime
);
virtual
void
updateCamera
(
double
deltaTime
,
Camera
&
camera
);
/**
* @brief A callback function for key events.
...
...
@@ -54,21 +31,21 @@ namespace vkcv {
* @param[in] action The key action.
* @param[in] mods The modifier bits.
*/
virtual
void
keyCallback
(
int
key
,
int
scancode
,
int
action
,
int
mods
);
virtual
void
keyCallback
(
int
key
,
int
scancode
,
int
action
,
int
mods
,
Camera
&
camera
);
/**
* @brief A callback function for mouse scrolling events.
* @param[in] offsetX The offset in horizontal direction.
* @param[in] offsetY The offset in vertical direction.
*/
virtual
void
scrollCallback
(
double
offsetX
,
double
offsetY
);
virtual
void
scrollCallback
(
double
offsetX
,
double
offsetY
,
Camera
&
camera
);
/**
* @brief A callback function for mouse movement events.
* @param[in] x The horizontal mouse position.
* @param[in] y The vertical mouse position.
*/
virtual
void
mouseMoveCallback
(
double
offsetX
,
double
offsetY
);
virtual
void
mouseMoveCallback
(
double
offsetX
,
double
offsetY
,
Camera
&
camera
);
/**
* @brief A callback function for mouse button events.
...
...
@@ -76,7 +53,7 @@ namespace vkcv {
* @param[in] action The button action.
* @param[in] mods The modifier bits.
*/
virtual
void
mouseButtonCallback
(
int
button
,
int
action
,
int
mods
);
virtual
void
mouseButtonCallback
(
int
button
,
int
action
,
int
mods
,
Camera
&
camera
);
};
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment