VkCV Framework  0.0.1
CV Vulkan framework
Buffer.hpp File Reference

template buffer class, template for type security, implemented here because template classes can't be written in .cpp More...

#include "Handles.hpp"
#include "BufferManager.hpp"
#include <vector>
Include dependency graph for Buffer.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  vkcv::Buffer< T >
 

Detailed Description

template buffer class, template for type security, implemented here because template classes can't be written in .cpp

class for image handles

Authors
Lars Hoerttrich, Tobias Frisch
Lars Hoerttrich

Definition in file Buffer.hpp.

vkcv::camera::CameraManager::setActiveCamera
void setActiveCamera(uint32_t cameraIndex)
Sets the stored camera object located at cameraIndex as the active camera.
Definition: CameraManager.cpp:145
vkcv::Window::~Window
virtual ~Window()
Definition: Window.cpp:35
vkcv::event::operator()
void operator()(T... arguments)
Definition: Event.hpp:38
vkcv::material::PBRMaterial::vec4
Definition: PBRMaterial.hpp:19
vkcv::PassConfig
Definition: PassConfig.hpp:47
vkcv::camera::Camera::getNearFar
void getNearFar(float &near, float &far) const
Gets the near and far bounds of the view frustum of the camera.
Definition: Camera.cpp:27
vkcv::Window::operator=
Window & operator=(const Window &other)=delete
vkcv::gui::GUI::~GUI
virtual ~GUI()
Definition: GUI.cpp:153
vkcv::PipelineManager
Definition: PipelineManager.hpp:11
vkcv::Core::createImage
Image createImage(vk::Format format, uint32_t width, uint32_t height, uint32_t depth=1, bool createMipChain=false, bool supportStorage=false, bool supportColorAttachment=false, Multisampling multisampling=Multisampling::None)
Definition: Core.cpp:497
vkcv::gui::GUI::GUI
GUI(Core &core, Window &window)
Definition: GUI.cpp:18
vkcv::Core::createBuffer
Buffer< T > createBuffer(vkcv::BufferType type, size_t count, BufferMemoryType memoryType=BufferMemoryType::DEVICE_LOCAL)
Definition: Core.hpp:188
vkcv::DrawcallInfo
Definition: DrawcallRecording.hpp:39
vkcv::ShaderProgram::addShader
bool addShader(ShaderStage shaderStage, const std::filesystem::path &shaderPath)
Definition: ShaderProgram.cpp:79
vkcv::SampledImageDescriptorWrite
Definition: DescriptorWrites.hpp:6
vkcv::BufferManager::destroyBufferById
void destroyBufferById(uint64_t id)
Definition: BufferManager.cpp:319
vkcv::camera::CameraManager::getControllerType
ControllerType getControllerType(uint32_t cameraIndex)
Gets the currently bound camera controller type of the stored camera object located at cameraIndex.
Definition: CameraManager.cpp:167
vkcv::material::Material
Definition: Material.hpp:6
vkcv::SyncResources
Definition: SyncResources.hpp:5
vkcv::camera::Camera::setCenter
void setCenter(const glm::vec3 &center)
Sets center as the new center point.
Definition: Camera.cpp:120
vkcv::event::unlock
void unlock()
Definition: Event.hpp:84
vkcv::Window::pollEvents
static void pollEvents()
Definition: Window.cpp:69
vkcv::camera::Camera::setRatio
void setRatio(float ratio)
Updates the aspect ratio of the camera with ratio and, thus, changes the projection matrix.
Definition: Camera.cpp:81
vkcv::Core::recordAndSubmitCommandsImmediate
void recordAndSubmitCommandsImmediate(const SubmitInfo &submitInfo, const RecordCommandFunction &record, const FinishCommandFunction &finish)
Definition: Core.cpp:436
vkcv::camera::Camera::setNearFar
void setNearFar(float near, float far)
Sets near and far as new values for the view frustum of the camera. This leads to changes in the proj...
Definition: Camera.cpp:85
vkcv::camera::PilotCameraController::moveForward
void moveForward(int action)
Indicates forward movement of the camera depending on the performed action.
Definition: PilotCameraController.cpp:167
vkcv::StorageBufferDescriptorWrite
Definition: DescriptorWrites.hpp:29
vkcv::Swapchain::shouldUpdateSwapchain
bool shouldUpdateSwapchain() const
Definition: Swapchain.cpp:213
vkcv::PassManager
Definition: PassManager.hpp:10
vkcv::DescriptorSet
Definition: DescriptorConfig.hpp:10
vkcv::SamplerDescriptorWrite
Definition: DescriptorWrites.hpp:35
vkcv::searchImageMemoryType
uint32_t searchImageMemoryType(const vk::PhysicalDeviceMemoryProperties &physicalMemoryProperties, uint32_t typeBits, vk::MemoryPropertyFlags requirements)
searches memory type index for image allocation, combines requirements of image and application
Definition: ImageManager.cpp:42
vkcv::DescriptorWrites
Definition: DescriptorWrites.hpp:41
vkcv::camera::CameraController::CameraController
CameraController()=default
The constructor of the CameraController (default behavior).
vkcv::Swapchain::~Swapchain
virtual ~Swapchain()
Definition: Swapchain.cpp:266
vkcv::Window::e_mouseButton
event< int, int, int > e_mouseButton
Definition: Window.hpp:109
vkcv::PassHandle
Definition: Handles.hpp:70
vkcv::camera::Camera::getYaw
float getYaw() const
Gets the yaw value of the camera in degrees.
Definition: Camera.cpp:140
vkcv::asset::PBRTextureTarget
PBRTextureTarget
Definition: asset_loader.hpp:91
vkcv::event_handle< int, int >
vkcv::camera::CameraManager::CameraManager
CameraManager(Window &window)
The constructor of the CameraManager.
Definition: CameraManager.cpp:7
vkcv::ShaderProgram
Definition: ShaderProgram.hpp:27
vkcv::camera::PilotCameraController::keyCallback
void keyCallback(int key, int scancode, int action, int mods, Camera &camera)
A callback function for key events. Currently, 3D camera movement via W, A, S, D, E,...
Definition: PilotCameraController.cpp:83
vkcv::Mesh
Definition: DrawcallRecording.hpp:23
vkcv::Window::onMouseScrollEvent
static void onMouseScrollEvent(GLFWwindow *callbackWindow, double xoffset, double yoffset)
A callback function for handling mouse scrolling events.
Definition: Window.cpp:120
vkcv::Window::getWindow
GLFWwindow * getWindow() const
Definition: Window.cpp:181
vkcv::event::lock
void lock()
Definition: Event.hpp:77
vkcv::camera::TrackballCameraController::keyCallback
void keyCallback(int key, int scancode, int action, int mods, Camera &camera)
A callback function for key events. Currently, the trackball camera does not support camera movement....
Definition: TrackballCameraController.cpp:68
vkcv::QueueManager::queueCreateInfosQueueHandles
static void queueCreateInfosQueueHandles(vk::PhysicalDevice &physicalDevice, std::vector< float > &queuePriorities, std::vector< vk::QueueFlagBits > &queueFlags, std::vector< vk::DeviceQueueCreateInfo > &queueCreateInfos, std::vector< std::pair< int, int >> &queuePairsGraphics, std::vector< std::pair< int, int >> &queuePairsCompute, std::vector< std::pair< int, int >> &queuePairsTransfer)
Definition: QueueManager.cpp:29
vkcv::Context
Definition: Context.hpp:9
vkcv::gui::GUI
Definition: GUI.hpp:12
vkcv::camera::CameraManager::getControllerByType
CameraController & getControllerByType(ControllerType controllerType)
Gets a camera controller object of specified controllerType.
Definition: CameraManager.cpp:176
vkcv::PipelineConfig
Definition: PipelineConfig.hpp:25
vkcv::AttachmentDescription
Definition: PassConfig.hpp:34
vkcv::QueueManager
Definition: QueueManager.hpp:15
vkcv::SamplerHandle
Definition: Handles.hpp:88
vkcv::camera::PilotCameraController::moveRight
void moveRight(int action)
Indicates right movement of the camera depending on the performed action.
Definition: PilotCameraController.cpp:179
vkcv::asset::PrimitiveType
PrimitiveType
Definition: asset_loader.hpp:113
Buffer.hpp
template buffer class, template for type security, implemented here because template classes can't be...
vkcv::DescriptorSetUsage
Definition: DrawcallRecording.hpp:15
vkcv::camera::CameraController::updateCamera
virtual void updateCamera(double deltaTime, Camera &camera)=0
Updates camera in respect to deltaTime.
vkcv::camera::Camera::getView
const glm::mat4 & getView() const
Gets the view matrix of the camera.
Definition: Camera.cpp:32
vkcv::asset::PrimitiveMode
PrimitiveMode
Definition: asset_loader.hpp:51
vkcv::event::remove
void remove(event_handle< T... > handle)
Definition: Event.hpp:65
vkcv::Core::beginFrame
bool beginFrame(uint32_t &width, uint32_t &height)
start recording command buffers and increment frame index
Definition: Core.cpp:186
vkcv::camera::PilotCameraController
Used to move around a camera object in world space.
Definition: PilotCameraController.hpp:10
vkcv::Image
Definition: Image.hpp:18
vkcv::camera::PilotCameraController::PilotCameraController
PilotCameraController()
The default constructor of the PilotCameraController.
Definition: PilotCameraController.cpp:6
vkcv::Window::Window
Window(GLFWwindow *window)
Definition: Window.cpp:14
vkcv::SubmitInfo
Definition: Core.hpp:40
vkcv::WriteDescriptorSetInfo
Definition: DescriptorManager.cpp:88
vkcv::Swapchain::updateSwapchain
void updateSwapchain(const Context &context, const Window &window)
Definition: Swapchain.cpp:217
vkcv::Swapchain::Swapchain
Swapchain(const Surface &surface, vk::SwapchainKHR swapchain, vk::Format format, vk::ColorSpaceKHR colorSpace, vk::PresentModeKHR presentMode, uint32_t imageCount, vk::Extent2D extent) noexcept
Definition: Swapchain.cpp:29
vkcv::DescriptorManager::m_DescriptorSets
std::vector< DescriptorSet > m_DescriptorSets
Definition: DescriptorManager.hpp:46
vkcv::CommandResources
Definition: CommandResources.hpp:7
vkcv::DescriptorManager::DescriptorManager
DescriptorManager(vk::Device device) noexcept
Definition: DescriptorManager.cpp:7
vkcv::camera::Camera::getFront
glm::vec3 getFront() const
Gets the current front vector of the camera in world space.
Definition: Camera.cpp:95
vkcv::BufferManager
Definition: BufferManager.hpp:25
vkcv::camera::Camera::getMVP
glm::mat4 getMVP() const
Gets the model-view-projection matrix of the camera with y-axis-correction applied.
Definition: Camera.cpp:55
vkcv::asset::VertexAttribute
Definition: asset_loader.hpp:133
vkcv::asset::Mesh
Definition: asset_loader.hpp:166
vkcv::CommandStreamHandle
Definition: Handles.hpp:105
vkcv::VertexBufferBinding
Definition: DrawcallRecording.hpp:7
vkcv::Swapchain::Surface
Definition: Swapchain.hpp:17
vkcv::Core::create
static Core create(Window &window, const char *applicationName, uint32_t applicationVersion, std::vector< vk::QueueFlagBits > queueFlags={}, std::vector< const char * > instanceExtensions={}, std::vector< const char * > deviceExtensions={})
Definition: Core.cpp:53
vkcv::BufferManager::Buffer
Definition: BufferManager.hpp:30
vkcv::asset::TextureData
Definition: asset_loader.hpp:194
vkcv::asset::materialHasTexture
bool materialHasTexture(const Material *const m, const PBRTextureTarget t)
Definition: asset_loader.cpp:117
vkcv::camera::CameraController
Used as a base class for defining camera controller classes with different behaviors,...
Definition: CameraController.hpp:12
vkcv::Window
Definition: Window.hpp:17
vkcv::camera::CameraManager::addCamera
uint32_t addCamera(ControllerType controllerType=ControllerType::NONE)
Adds a new camera object to the CameraManager and binds it to a camera controller object of specified...
Definition: CameraManager.cpp:117
vkcv::BufferManager::fillBuffer
void fillBuffer(const BufferHandle &handle, const void *data, size_t size, size_t offset)
Definition: BufferManager.cpp:222
vkcv::asset::print_what
void print_what(const std::exception &e, const std::string &path)
Definition: asset_loader.cpp:41
vkcv::ShaderProgram::reflectShader
void reflectShader(ShaderStage shaderStage)
Definition: ShaderProgram.cpp:110
vkcv::BufferManager::getBuffer
vk::Buffer getBuffer(const BufferHandle &handle) const
Definition: BufferManager.cpp:186
vkcv::camera::Camera::getFov
float getFov() const
Gets the current field of view of the camera in radians.
Definition: Camera.cpp:59
vkcv::BufferManager::createBuffer
BufferHandle createBuffer(BufferType type, size_t size, BufferMemoryType memoryType)
Definition: BufferManager.cpp:57
vkcv::Buffer
Definition: Buffer.hpp:15
vkcv::asset::ComponentType
ComponentType
Definition: asset_loader.hpp:127
vkcv::camera::PilotCameraController::updateCamera
void updateCamera(double deltaTime, Camera &camera)
Updates camera in respect to deltaTime.
Definition: PilotCameraController.cpp:67
vkcv::asset::IndexType
IndexType
Definition: asset_loader.hpp:57
vkcv::BufferManager::mapBuffer
void * mapBuffer(const BufferHandle &handle, size_t offset, size_t size)
Definition: BufferManager.cpp:272
vkcv::Window::getWidth
int getWidth() const
Definition: Window.cpp:169
vkcv::Swapchain::getSurface
vk::SurfaceKHR getSurface() const
Definition: Swapchain.cpp:61
vkcv::camera::Camera
Used to create a camera which governs the view and projection matrices.
Definition: Camera.hpp:12
vkcv::camera::TrackballCameraController::scrollCallback
void scrollCallback(double offsetX, double offsetY, Camera &camera)
A callback function for mouse scrolling events. Currently, this leads to changes in the field of view...
Definition: TrackballCameraController.cpp:70
vkcv::camera::CameraManager::mouseButtonCallback
void mouseButtonCallback(int button, int action, int mods)
A callback function for mouse button events.
Definition: CameraManager.cpp:44
vkcv::event
Definition: Event.hpp:26
vkcv::asset::Texture
Definition: asset_loader.hpp:67
vkcv::camera::CameraController::scrollCallback
virtual void scrollCallback(double offsetX, double offsetY, Camera &camera)=0
A callback function for mouse scrolling events.
vkcv::camera::CameraManager::getActiveCamera
Camera & getActiveCamera()
Gets the stored camera object set as the active camera.
Definition: CameraManager.cpp:141
vkcv::ImageManager
Definition: ImageManager.hpp:16
vkcv::camera::CameraManager::keyCallback
void keyCallback(int key, int scancode, int action, int mods)
A callback function for key events. Currently, cycling between all existing camera controllers via Ta...
Definition: CameraManager.cpp:66
vkcv::asset::convertTypeToInt
uint8_t convertTypeToInt(const fx::gltf::Accessor::Type type)
Definition: asset_loader.cpp:20
vkcv::DescriptorManager
Definition: DescriptorManager.hpp:18
vkcv::StorageImageDescriptorWrite
Definition: DescriptorWrites.hpp:15
vkcv::shader::GLSLCompiler
Definition: GLSLCompiler.hpp:10
vkcv::camera::TrackballCameraController::TrackballCameraController
TrackballCameraController()
The default constructor of the TrackballCameraController.
Definition: TrackballCameraController.cpp:6
vkcv::Window::onCharEvent
static void onCharEvent(GLFWwindow *callbackWindow, unsigned int c)
Definition: Window.cpp:144
vkcv::camera::Camera::setUp
void setUp(const glm::vec3 &up)
Sets up as the new up vector.
Definition: Camera.cpp:128
vkcv::Core::createComputePipeline
PipelineHandle createComputePipeline(const ShaderProgram &config, const std::vector< vk::DescriptorSetLayout > &descriptorSetLayouts)
Definition: Core.cpp:142
vkcv::Window::onKeyEvent
static void onKeyEvent(GLFWwindow *callbackWindow, int key, int scancode, int action, int mods)
Definition: Window.cpp:136
vkcv::camera::CameraManager::scrollCallback
void scrollCallback(double offsetX, double offsetY)
A callback function for mouse scrolling events.
Definition: CameraManager.cpp:62
vkcv::camera::PilotCameraController::changeFov
void changeFov(double offset, Camera &camera)
Changes the field of view of camera with an offset in degrees.
Definition: PilotCameraController.cpp:27
vkcv::Shader
Definition: ShaderProgram.hpp:21
vkcv::Window::getHeight
int getHeight() const
Definition: Window.cpp:175
vkcv::camera::Camera::setView
void setView(const glm::mat4 &view)
Sets the view matrix of the camera to view.
Definition: Camera.cpp:36
vkcv::Swapchain
Definition: Swapchain.hpp:13
vkcv::Window::onMouseButtonEvent
static void onMouseButtonEvent(GLFWwindow *callbackWindow, int button, int action, int mods)
Definition: Window.cpp:104
vkcv::camera::PilotCameraController::moveDownward
void moveDownward(int action)
Indicates downward movement of the camera depending on the performed action.
Definition: PilotCameraController.cpp:187
vkcv::material::PBRMaterial
Definition: PBRMaterial.hpp:13
vkcv::camera::Camera::lookAt
void lookAt(const glm::vec3 &position, const glm::vec3 &center, const glm::vec3 &up)
Sets the view matrix of the camera according to position, center and up.
Definition: Camera.cpp:19
vkcv::camera::Camera::setFov
void setFov(float fov)
Sets the field of view of the camera to fov in radians.
Definition: Camera.cpp:70
vkcv::asset::loadScene
int loadScene(const std::string &path, Scene &scene)
Definition: asset_loader.cpp:122
vkcv::VertexLayout::VertexLayout
VertexLayout() noexcept
Definition: VertexLayout.cpp:55
vkcv::Window::getFramebufferSize
void getFramebufferSize(int &width, int &height) const
Definition: Window.cpp:185
vkcv::camera::CameraController::gamepadCallback
virtual void gamepadCallback(int gamepadIndex, Camera &camera, double frametime)=0
A callback function for gamepad input events.
vkcv::camera::CameraManager::setControllerType
void setControllerType(uint32_t cameraIndex, ControllerType controllerType)
Binds a stored camera object located at cameraIndex to a camera controller of specified controllerTyp...
Definition: CameraManager.cpp:158
vkcv::Core
Definition: Core.hpp:46
vkcv::BufferManager::unmapBuffer
void unmapBuffer(const BufferHandle &handle)
Definition: BufferManager.cpp:300
vkcv::Window::onGamepadEvent
static void onGamepadEvent(int gamepadIndex)
A callback function for gamepad input events.
Definition: Window.cpp:152
vkcv::Swapchain::getExtent
const vk::Extent2D & getExtent() const
Definition: Swapchain.cpp:262
vkcv::Swapchain::getSwapchain
const vk::SwapchainKHR & getSwapchain() const
Definition: Swapchain.cpp:57
vkcv::StagingStepInfo
Definition: BufferManager.cpp:126
vkcv::VertexAttachment
Definition: VertexLayout.hpp:21
vkcv::BufferManager::getDeviceMemory
vk::DeviceMemory getDeviceMemory(const BufferHandle &handle) const
Definition: BufferManager.cpp:210
vkcv::Swapchain::getFormat
vk::Format getFormat() const
Definition: Swapchain.cpp:65
vkcv::Swapchain::create
static Swapchain create(const Window &window, const Context &context)
Definition: Swapchain.cpp:167
vkcv::asset::getIndexType
enum IndexType getIndexType(const enum fx::gltf::Accessor::ComponentType &t)
Definition: asset_loader.cpp:56
vkcv::camera::TrackballCameraController::~TrackballCameraController
~TrackballCameraController()=default
The destructor of the TrackballCameraController (default behavior).
vkcv::gui::GUI::endGUI
void endGUI()
Definition: GUI.cpp:186
vkcv::camera::CameraManager::getCamera
Camera & getCamera(uint32_t cameraIndex)
Gets the stored camera object located at cameraIndex.
Definition: CameraManager.cpp:132
vkcv::asset::computeModelMatrix
std::array< float, 16 > computeModelMatrix(std::array< float, 3 > translation, std::array< float, 3 > scale, std::array< float, 4 > rotation, std::array< float, 16 > matrix)
Definition: asset_loader.cpp:79
vkcv::camera::PilotCameraController::moveBackward
void moveBackward(int action)
Indicates backward movement of the camera depending on the performed action.
Definition: PilotCameraController.cpp:171
vkcv::PipelineHandle
Definition: Handles.hpp:76
vkcv::asset::VertexGroup
Definition: asset_loader.hpp:147
vkcv::DescriptorManager::allocateDescriptorPool
vk::DescriptorPool allocateDescriptorPool()
Definition: DescriptorManager.cpp:283
vkcv::Core::createPass
PassHandle createPass(const PassConfig &config)
Definition: Core.cpp:149
vkcv::DescriptorManager::convertDescriptorTypeFlag
static vk::DescriptorType convertDescriptorTypeFlag(DescriptorType type)
Definition: DescriptorManager.cpp:230
vkcv::camera::CameraManager::gamepadCallback
void gamepadCallback(int gamepadIndex)
A callback function for gamepad input events. Currently, inputs are handled only for the first connec...
Definition: CameraManager.cpp:90
vkcv::shader::Compiler
Definition: Compiler.hpp:9
vkcv::asset
Definition: asset_loader.hpp:47
vkcv::asset::Sampler
Definition: asset_loader.hpp:59
vkcv::camera::PilotCameraController::moveLeft
void moveLeft(int action)
Indicates left movement of the camera depending on the performed action.
Definition: PilotCameraController.cpp:175
ImageManager.hpp
class creating and managing images
vkcv::Window::create
static Window create(const char *windowTitle, int width=-1, int height=-1, bool resizable=false)
Definition: Window.cpp:52
vkcv::SamplerManager
Definition: SamplerManager.hpp:13
vkcv::CommandStreamManager
Definition: CommandStreamManager.hpp:12
vkcv::camera::CameraManager::mouseMoveCallback
void mouseMoveCallback(double x, double y)
A callback function for mouse movement events.
Definition: CameraManager.cpp:54
vkcv::Core::createDescriptorSet
DescriptorSetHandle createDescriptorSet(const std::vector< DescriptorBinding > &bindings)
Definition: Core.cpp:535
vkcv::camera::TrackballCameraController::setRadius
void setRadius(const float radius)
Sets radius as the new radius for orbiting around the camera's center point.
Definition: TrackballCameraController.cpp:13
vkcv::camera::Camera::getProjection
glm::mat4 getProjection() const
Gets the current projection of the camera.
Definition: Camera.cpp:47
vkcv::asset::Material
Definition: asset_loader.hpp:76
vkcv::camera::Camera::setPitch
void setPitch(float pitch)
Sets the pitch value of the camera to pitch in degrees.
Definition: Camera.cpp:136
vkcv::ImageManager::Image
Definition: ImageManager.hpp:20
vkcv::Core::createSampler
SamplerHandle createSampler(SamplerFilterType magFilter, SamplerFilterType minFilter, SamplerMipmapMode mipmapMode, SamplerAddressMode addressMode)
Definition: Core.cpp:492
vkcv::camera::PilotCameraController::mouseButtonCallback
void mouseButtonCallback(int button, int action, int mods, Camera &camera)
A callback function for mouse button events. Currently, the right mouse button enables panning the vi...
Definition: PilotCameraController.cpp:124
vkcv::camera::Camera::setProjection
void setProjection(const glm::mat4 &projection)
Sets the projection matrix of the camera to projection.
Definition: Camera.cpp:51
vkcv::camera::CameraManager::bindCameraToEvents
void bindCameraToEvents()
Binds the camera object to the window event handles.
Definition: CameraManager.cpp:27
vkcv::Swapchain::getImageCount
uint32_t getImageCount() const
Definition: Swapchain.cpp:270
vkcv::camera::Camera::getRatio
float getRatio() const
Gets the current aspect ratio of the camera.
Definition: Camera.cpp:74
vkcv::PassManager::Pass
Definition: PassManager.hpp:13
vkcv::Window::isWindowOpen
bool isWindowOpen() const
Definition: Window.cpp:165
vkcv::camera::Camera::getPosition
const glm::vec3 & getPosition() const
Gets the current position of the camera in world space.
Definition: Camera.cpp:108
vkcv::camera::CameraController::keyCallback
virtual void keyCallback(int key, int scancode, int action, int mods, Camera &camera)=0
A callback function for key events.
vkcv::camera::Camera::setYaw
void setYaw(float yaw)
Sets the yaw value of the camera to yaw.
Definition: Camera.cpp:144
vkcv::camera::TrackballCameraController::mouseButtonCallback
void mouseButtonCallback(int button, int action, int mods, Camera &camera)
A callback function for mouse button events. Currently, the right mouse button enables panning the vi...
Definition: TrackballCameraController.cpp:86
vkcv::BufferHandle
Definition: Handles.hpp:64
vkcv::camera::CameraManager::resizeCallback
void resizeCallback(int width, int height)
A callback function for handling the window resizing event. Each existing camera is resized in respec...
Definition: CameraManager.cpp:36
vkcv::camera::TrackballCameraController::panView
void panView(double xOffset, double yOffset, Camera &camera)
Pans the view of camera according to the pitch and yaw values and additional offsets xOffset and yOff...
Definition: TrackballCameraController.cpp:17
vkcv::BufferManager::getBufferSize
size_t getBufferSize(const BufferHandle &handle) const
Definition: BufferManager.cpp:198
vkcv::camera::CameraManager::update
void update(double deltaTime)
Updates all stored camera controllers in respect to deltaTime.
Definition: CameraManager.cpp:187
vkcv::CommandStreamManager::CommandStream
Definition: CommandStreamManager.hpp:16
vkcv::camera::Camera::getUp
const glm::vec3 & getUp() const
Gets the up vector.
Definition: Camera.cpp:124
vkcv::gui::GUI::beginGUI
void beginGUI()
Definition: GUI.cpp:173
vkcv::PushConstantData
Definition: DrawcallRecording.hpp:32
vkcv::DescriptorManager::destroyDescriptorSetById
void destroyDescriptorSetById(uint64_t id)
Definition: DescriptorManager.cpp:269
vkcv::camera::Camera::setFront
void setFront(const glm::vec3 &front)
Sets the front vector of the camera in world space to front.
Definition: Camera.cpp:103
vkcv::camera::TrackballCameraController::updateCamera
void updateCamera(double deltaTime, Camera &camera)
Updates camera in respect to deltaTime.
Definition: TrackballCameraController.cpp:46
vkcv::copyFromStagingBuffer
void copyFromStagingBuffer(Core *core, StagingStepInfo &info)
Definition: BufferManager.cpp:149
vkcv::camera::CameraManager::getActiveCameraIndex
uint32_t getActiveCameraIndex() const
Gets the index of the stored active camera object.
Definition: CameraManager.cpp:154
vkcv::material::PBRMaterial::vec3
Definition: PBRMaterial.hpp:16
vkcv::ImageManager::destroyImageById
void destroyImageById(uint64_t id)
Definition: ImageManager.cpp:614
vkcv::camera::PilotCameraController::panView
void panView(double xOffset, double yOffset, Camera &camera)
Pans the view of camera according to the pitch and yaw values and additional offsets xOffset and yOff...
Definition: PilotCameraController.cpp:46
vkcv::DescriptorBinding
Definition: DescriptorConfig.hpp:35
vkcv::Queue
Definition: QueueManager.hpp:8
vkcv::ShaderProgram::getShader
const Shader & getShader(ShaderStage shaderStage) const
Definition: ShaderProgram.cpp:97
vkcv::camera::PilotCameraController::~PilotCameraController
~PilotCameraController()=default
The destructor of the PilotCameraController (default behavior).
vkcv::event::add
event_handle< T... > add(typename event_function< T... >::type callback)
Definition: Event.hpp:53
vkcv::Handle
Definition: Handles.hpp:17
vkcv::camera::PilotCameraController::mouseMoveCallback
void mouseMoveCallback(double x, double y, Camera &camera)
A callback function for mouse movement events. Currently, this leads to panning the view of the camer...
Definition: PilotCameraController.cpp:112
vkcv::camera::Camera::getPitch
float getPitch() const
Gets the pitch value of the camera in degrees.
Definition: Camera.cpp:132
vkcv::camera::CameraManager
Used for managing an arbitrary amount of camera controllers.
Definition: CameraManager.hpp:26
vkcv::camera::Camera::setPerspective
void setPerspective(float fov, float ratio, float near, float far)
Sets the perspective object according to fov, ratio, near and far. This leads to changes in the proje...
Definition: Camera.cpp:89
vkcv::Core::~Core
~Core() noexcept
Definition: Core.cpp:125
vkcv::camera::CameraManager::getActiveController
CameraController & getActiveController()
Definition: CameraManager.cpp:112
vkcv::VertexLayout
Definition: VertexLayout.hpp:55
vkcv::PipelineManager::Pipeline
Definition: PipelineManager.hpp:14
vkcv::camera::TrackballCameraController
Used to orbit a camera around its center point.
Definition: TrackballCameraController.hpp:10
vkcv::camera::Camera::Camera
Camera()
The default constructor of the camera.
Definition: Camera.cpp:7
vkcv::Core::endFrame
void endFrame()
end recording and present image
Definition: Core.cpp:396
vkcv::readShaderCode
std::vector< char > readShaderCode(const std::filesystem::path &shaderPath)
Definition: ShaderProgram.cpp:17
vkcv::camera::Camera::~Camera
~Camera()
The destructor of the camera (default behavior)
vkcv::Window::onResize
static void onResize(GLFWwindow *callbackWindow, int width, int height)
Definition: Window.cpp:128
vkcv::Window::onMouseMoveEvent
static void onMouseMoveEvent(GLFWwindow *window, double x, double y)
Definition: Window.cpp:112
vkcv::camera::PilotCameraController::moveUpward
void moveUpward(int action)
Indicates upward movement of the camera depending on the performed action.
Definition: PilotCameraController.cpp:183
vkcv::camera::TrackballCameraController::updateRadius
void updateRadius(double offset, Camera &camera)
Updates the current radius of camera in respect to the offset.
Definition: TrackballCameraController.cpp:34
vkcv::camera::TrackballCameraController::mouseMoveCallback
void mouseMoveCallback(double xoffset, double yoffset, Camera &camera)
A callback function for mouse movement events. Currently, this leads to panning the view of the camer...
Definition: TrackballCameraController.cpp:74
vkcv::Core::operator=
Core & operator=(const Core &other)=delete
vkcv::camera::CameraController::mouseButtonCallback
virtual void mouseButtonCallback(int button, int action, int mods, Camera &camera)=0
A callback function for mouse button events.
vkcv::UniformBufferDescriptorWrite
Definition: DescriptorWrites.hpp:23
vkcv::camera::CameraController::mouseMoveCallback
virtual void mouseMoveCallback(double offsetX, double offsetY, Camera &camera)=0
A callback function for mouse movement events.
vkcv::event_function
Definition: Event.hpp:14
vkcv::camera::Camera::setPosition
void setPosition(const glm::vec3 &position)
Sets the position of the camera to position.
Definition: Camera.cpp:112
vkcv::Handle::getId
uint64_t getId() const
Definition: Handles.cpp:67
vkcv::camera::Camera::getCenter
const glm::vec3 & getCenter() const
Gets the center point.
Definition: Camera.cpp:116
vkcv::ImageHandle
Definition: Handles.hpp:94
vkcv::camera::PilotCameraController::scrollCallback
void scrollCallback(double offsetX, double offsetY, Camera &camera)
A callback function for mouse scrolling events. Currently, this leads to changes in the field of view...
Definition: PilotCameraController.cpp:108
vkcv::VertexBinding
Definition: VertexLayout.hpp:39
vkcv::Handle::getRC
uint64_t getRC() const
Definition: Handles.cpp:71
vkcv::asset::Scene
Definition: asset_loader.hpp:177
vkcv::DescriptorSetHandle
Definition: Handles.hpp:82
vkcv::camera::TrackballCameraController::gamepadCallback
void gamepadCallback(int gamepadIndex, Camera &camera, double frametime)
A callback function for gamepad input events.
Definition: TrackballCameraController.cpp:95
vkcv::Core::createGraphicsPipeline
PipelineHandle createGraphicsPipeline(const PipelineConfig &config)
Definition: Core.cpp:137
vkcv::camera::CameraManager::~CameraManager
~CameraManager()
The destructor of the CameraManager. Destroying the CameraManager leads to deletion of all stored cam...
Definition: CameraManager.cpp:18
vkcv::camera::PilotCameraController::gamepadCallback
void gamepadCallback(int gamepadIndex, Camera &camera, double frametime)
A callback function for gamepad input events.
Definition: PilotCameraController.cpp:133
vkcv::DescriptorManager::convertShaderStageFlag
static vk::ShaderStageFlagBits convertShaderStageFlag(ShaderStage stage)
Definition: DescriptorManager.cpp:249
vkcv::testing::Test
Definition: Test.hpp:5
vkcv::searchBufferMemoryType
uint32_t searchBufferMemoryType(const vk::PhysicalDeviceMemoryProperties &physicalMemoryProperties, uint32_t typeBits, vk::MemoryPropertyFlags requirements)
searches memory type index for buffer allocation, combines requirements of buffer and application
Definition: BufferManager.cpp:38