VkCV Framework  0.0.1
CV Vulkan framework
vkcv::camera::CameraController Class Referenceabstract

Used as a base class for defining camera controller classes with different behaviors, e.g. the #PilotCameraController. More...

#include <CameraController.hpp>

Inheritance diagram for vkcv::camera::CameraController:

Public Member Functions

 CameraController ()=default
 The constructor of the CameraController (default behavior).
 
virtual void updateCamera (double deltaTime, Camera &camera)=0
 Updates camera in respect to deltaTime. More...
 
virtual void keyCallback (int key, int scancode, int action, int mods, Camera &camera)=0
 A callback function for key events. More...
 
virtual void scrollCallback (double offsetX, double offsetY, Camera &camera)=0
 A callback function for mouse scrolling events. More...
 
virtual void mouseMoveCallback (double offsetX, double offsetY, Camera &camera)=0
 A callback function for mouse movement events. More...
 
virtual void mouseButtonCallback (int button, int action, int mods, Camera &camera)=0
 A callback function for mouse button events. More...
 
virtual void gamepadCallback (int gamepadIndex, Camera &camera, double frametime)=0
 A callback function for gamepad input events. More...
 

Detailed Description

Used as a base class for defining camera controller classes with different behaviors, e.g. the #PilotCameraController.

Member Function Documentation

◆ gamepadCallback()

virtual void vkcv::camera::CameraController::gamepadCallback ( int  gamepadIndex,
Camera camera,
double  frametime 
)
pure virtual

A callback function for gamepad input events.

Parameters
gamepadIndexThe gamepad index.
cameraThe camera object.
frametimeThe current frametime.

Implemented in vkcv::camera::PilotCameraController, and vkcv::camera::TrackballCameraController.

Referenced by vkcv::camera::CameraManager::gamepadCallback().

Here is the caller graph for this function:

◆ keyCallback()

virtual void vkcv::camera::CameraController::keyCallback ( int  key,
int  scancode,
int  action,
int  mods,
Camera camera 
)
pure virtual

A callback function for key events.

Parameters
[in]keyThe keyboard key.
[in]scancodeThe platform-specific scancode.
[in]actionThe key action.
[in]modsThe modifier bits.
[in]cameraThe camera object.

Implemented in vkcv::camera::PilotCameraController, and vkcv::camera::TrackballCameraController.

Referenced by vkcv::camera::CameraManager::keyCallback().

Here is the caller graph for this function:

◆ mouseButtonCallback()

virtual void vkcv::camera::CameraController::mouseButtonCallback ( int  button,
int  action,
int  mods,
Camera camera 
)
pure virtual

A callback function for mouse button events.

Parameters
[in]buttonThe mouse button.
[in]actionThe button action.
[in]modsThe modifier bits.
[in]cameraThe camera object.

Implemented in vkcv::camera::PilotCameraController, and vkcv::camera::TrackballCameraController.

Referenced by vkcv::camera::CameraManager::mouseButtonCallback().

Here is the caller graph for this function:

◆ mouseMoveCallback()

virtual void vkcv::camera::CameraController::mouseMoveCallback ( double  offsetX,
double  offsetY,
Camera camera 
)
pure virtual

A callback function for mouse movement events.

Parameters
[in]xThe horizontal mouse position.
[in]yThe vertical mouse position.
[in]cameraThe camera object.

Implemented in vkcv::camera::TrackballCameraController, and vkcv::camera::PilotCameraController.

Referenced by vkcv::camera::CameraManager::mouseMoveCallback().

Here is the caller graph for this function:

◆ scrollCallback()

virtual void vkcv::camera::CameraController::scrollCallback ( double  offsetX,
double  offsetY,
Camera camera 
)
pure virtual

A callback function for mouse scrolling events.

Parameters
[in]offsetXThe offset in horizontal direction.
[in]offsetYThe offset in vertical direction.
[in]cameraThe camera object.

Implemented in vkcv::camera::PilotCameraController, and vkcv::camera::TrackballCameraController.

Referenced by vkcv::camera::CameraManager::scrollCallback().

Here is the caller graph for this function:

◆ updateCamera()

virtual void vkcv::camera::CameraController::updateCamera ( double  deltaTime,
Camera camera 
)
pure virtual

Updates camera in respect to deltaTime.

Parameters
[in]deltaTimeThe time that has passed since last update.
[in]cameraThe camera object.

Implemented in vkcv::camera::PilotCameraController, and vkcv::camera::TrackballCameraController.

Referenced by vkcv::camera::CameraManager::update().

Here is the caller graph for this function:

The documentation for this class was generated from the following file: