NDEVR
API Documentation
VulkanCameraManager

A structure for managing Viewport interactions with in the Vulkan Graphics Space. More...

Inheritance diagram for VulkanCameraManager:
[legend]
Collaboration diagram for VulkanCameraManager:
[legend]

Public Member Functions

 VulkanCameraManager (const ConstPointer< VulkanDevice > &device)
 Constructs a camera manager for the given device.
 VulkanCameraManager (const VulkanCameraManager &m_pipeline)
 Copy constructor.
 ~VulkanCameraManager ()
 Destructor.
void cleanup ()
 Releases all Vulkan resources held by this camera manager.
void commit ()
 Commits camera uniform data to the GPU buffer.
void createPipeline (VkDescriptorPool pool)
 Creates the descriptor pipeline from the given pool.
VkDescriptorSet descriptorSet () const
 Returns the descriptor set for binding camera uniforms.
void resetPool ()
 Resets the descriptor pool handle to null.
VkSampler sampler () const
 Returns the texture sampler handle.
const CameraUniformObjectuniformObject () const
 Returns a const reference to the camera uniform data.
Public Member Functions inherited from GraphicsCameraManager
 GraphicsCameraManager ()
 Default constructor.
 GraphicsCameraManager (const GraphicsCameraManager &m_pipeline)
 Copy constructor.
virtual ~GraphicsCameraManager ()
 Destructor.
UUID overrideMaterial () const
 Returns the override material UUID.
void setCamera (const UUID &camera)
 Sets the camera to manage.
const CameraUniformObjectuniformObject () const
 Returns the current camera uniform data.
virtual void updateUniformBuffer (GraphicsUpdateArguments &args)
 Updates the GPU uniform buffer from the current camera state.
bool useCameraMaterial () const
 Checks whether the camera material override is active.

Static Public Member Functions

static VkDescriptorSetLayout descriptorSetLayout (ConstPointer< VulkanDevice > instance)
 Returns the shared descriptor set layout for camera managers.

Protected Member Functions

void createDescriptorSet (VkDescriptorPool pool)
 Creates the descriptor set from the given pool.
Protected Member Functions inherited from GraphicsCameraManager
CameraUniformObject getCameraUniformObject (const Camera &camera, GraphicsUpdateArguments &args) const
 Builds a CameraUniformObject from a Camera and update arguments.

Protected Attributes

DynamicPointer< VulkanBufferm_camera_uniform_buffer
 GPU buffer holding camera uniform data.
VkDescriptorPool m_descriptor_pool
 The descriptor pool this camera's set was allocated from.
VkDescriptorSet m_descriptor_set
 The descriptor set for camera uniform bindings.
ConstPointer< VulkanDevicem_device
 The Vulkan device.
VkSampler m_sampler
 The texture sampler for camera-related sampling.
Protected Attributes inherited from GraphicsCameraManager
UUID m_camera
 UUID of the managed camera.
CameraUniformObject m_camera_uniform
 Current uniform data for the GPU.
Time m_last_updated_time
 Last time the uniform was updated.
bool m_needs_pipeline_update
 Whether the pipeline needs rebuilding.
bool m_needs_uniform_commit
 Whether the uniform buffer needs committing.
UUID m_override_material
 UUID of the material override (if any).
bool m_use_anisotropy
 Whether anisotropic filtering is enabled.
bool m_use_camera_material
 Whether camera-specific material is used.
bool m_uses_origin
 Whether origin-based precision is active.
Time m_visible_update_time = Time(0)
 Last time a visible change was detected.

Detailed Description

A structure for managing Viewport interactions with in the Vulkan Graphics Space.


Definition at line 51 of file VulkanCameraManager.h.

Constructor & Destructor Documentation

◆ VulkanCameraManager() [1/2]

VulkanCameraManager::VulkanCameraManager ( const ConstPointer< VulkanDevice > & device)

Constructs a camera manager for the given device.

Parameters
[in]deviceThe Vulkan device.

Referenced by VulkanCameraManager().

◆ VulkanCameraManager() [2/2]

VulkanCameraManager::VulkanCameraManager ( const VulkanCameraManager & m_pipeline)

Copy constructor.

Parameters
[in]m_pipelineThe camera manager to copy from.

References VulkanCameraManager().

Member Function Documentation

◆ createDescriptorSet()

void VulkanCameraManager::createDescriptorSet ( VkDescriptorPool pool)
protected

Creates the descriptor set from the given pool.

Parameters
[in]poolThe descriptor pool to allocate from.

◆ createPipeline()

void VulkanCameraManager::createPipeline ( VkDescriptorPool pool)

Creates the descriptor pipeline from the given pool.

Parameters
[in]poolThe descriptor pool to allocate from.

◆ descriptorSet()

VkDescriptorSet VulkanCameraManager::descriptorSet ( ) const
inline

Returns the descriptor set for binding camera uniforms.

Returns
The VkDescriptorSet handle.

Definition at line 76 of file VulkanCameraManager.h.

References m_descriptor_set.

◆ descriptorSetLayout()

VkDescriptorSetLayout VulkanCameraManager::descriptorSetLayout ( ConstPointer< VulkanDevice > instance)
static

Returns the shared descriptor set layout for camera managers.

Parameters
[in]instanceThe Vulkan device.
Returns
The VkDescriptorSetLayout.

◆ sampler()

VkSampler VulkanCameraManager::sampler ( ) const
inline

Returns the texture sampler handle.

Returns
The VkSampler.

Definition at line 67 of file VulkanCameraManager.h.

References m_sampler.

◆ uniformObject()

const CameraUniformObject & VulkanCameraManager::uniformObject ( ) const
inline

Returns a const reference to the camera uniform data.

Returns
The CameraUniformObject.

Definition at line 73 of file VulkanCameraManager.h.

References GraphicsCameraManager::m_camera_uniform.


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