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
6f3bdf7b
Verified
Commit
6f3bdf7b
authored
3 years ago
by
Josch Morgenstern
Browse files
Options
Downloads
Patches
Plain Diff
[
#54
] Add handling of NONE controller
parent
ac9d3514
No related branches found
No related tags found
1 merge request
!53
Resolve "Kamera - Kamerafahrt mit Interpolation"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/camera/include/vkcv/camera/CameraManager.hpp
+10
-1
10 additions, 1 deletion
modules/camera/include/vkcv/camera/CameraManager.hpp
modules/camera/src/vkcv/camera/CameraManager.cpp
+5
-1
5 additions, 1 deletion
modules/camera/src/vkcv/camera/CameraManager.cpp
with
15 additions
and
2 deletions
modules/camera/include/vkcv/camera/CameraManager.hpp
+
10
−
1
View file @
6f3bdf7b
...
...
@@ -110,6 +110,15 @@ namespace vkcv::camera {
*/
CameraController
&
getActiveController
();
/**
* @brief Returns 'true' if the camera has a controller.
*
* @param cameraIndex
* @return true
* @return false
*/
bool
CameraManager
::
cameraHasController
(
uint32_t
cameraIndex
);
public:
/**
...
...
@@ -184,7 +193,7 @@ namespace vkcv::camera {
* @throws std::runtime_error If @p cameraIndex is not a valid camera index.
*/
ControllerType
getControllerType
(
uint32_t
cameraIndex
);
/**
* @brief Updates all stored camera controllers in respect to @p deltaTime.
* @param[in] deltaTime The time that has passed since last update.
...
...
This diff is collapsed.
Click to expand it.
modules/camera/src/vkcv/camera/CameraManager.cpp
+
5
−
1
View file @
6f3bdf7b
...
...
@@ -184,9 +184,13 @@ namespace vkcv::camera {
}
}
bool
CameraManager
::
cameraHasController
(
uint32_t
cameraIndex
)
{
return
(
m_cameraControllerTypes
[
cameraIndex
]
!=
ControllerType
::
NONE
);
}
void
CameraManager
::
update
(
double
deltaTime
)
{
m_frameTime
=
deltaTime
;
if
(
glfwGetWindowAttrib
(
m_window
.
getWindow
(),
GLFW_FOCUSED
)
==
GLFW_TRUE
)
{
if
(
(
glfwGetWindowAttrib
(
m_window
.
getWindow
(),
GLFW_FOCUSED
)
==
GLFW_TRUE
)
&&
cameraHasController
(
getActiveCameraIndex
()))
{
getActiveController
().
updateCamera
(
deltaTime
,
getActiveCamera
());
}
}
...
...
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