Skip to content

KDGpuExample::XrCylinderLayer

#include <xr_cylinder_layer.h>

Inherits from KDGpuExample::XrCompositorLayer

Inherited by KDGpuExample::XrCylinderImGuiLayer

Public Functions

Name
XrCylinderLayer(const XrCylinderLayerOptions & options)
~XrCylinderLayer() override
XrCylinderLayer(const XrCylinderLayer & ) =delete
XrCylinderLayer & operator=(const XrCylinderLayer & ) =delete
XrCylinderLayer(XrCylinderLayer && ) =default
XrCylinderLayer & operator=(XrCylinderLayer && ) =default

Protected Functions

Name
virtual void initialize() override
virtual void cleanup() override
virtual bool update(const KDXr::FrameState & frameState) override
void recreateSwapchains()
virtual void renderCylinder() =0
virtual KDXr::CompositionLayer * compositionLayer() override

Public Attributes

Name
KDBindings::Property< KDXr::Vector3 > position
KDBindings::Property< KDXr::Quaternion > orientation
KDBindings::Property< KDGpu::Extent2D > resolution
KDBindings::Property< float > radius
KDBindings::Property< float > centralAngle
KDBindings::Property< float > aspectRatio
KDBindings::Property< KDXr::EyeVisibility > eyeVisibility

Protected Attributes

Name
KDGpu::Device * m_device
KDGpu::Queue * m_queue
KDXr::Session * m_session
KDGpu::Format m_colorSwapchainFormat
KDGpu::Format m_depthSwapchainFormat
KDGpu::SampleCountFlagBits m_samples
KDXr::SwapchainInfo m_colorSwapchain
KDXr::SwapchainInfo m_depthSwapchain
uint32_t m_currentColorImageIndex
uint32_t m_currentDepthImageIndex
KDXr::CylinderLayer m_cylinderLayer

Additional inherited members

Public Types inherited from KDGpuExample::XrCompositorLayer

Name
enum class uint32_t Type { Projection, Quad, Cylinder, Cube, Equirect, PassThrough}

Public Functions inherited from KDGpuExample::XrCompositorLayer

Name
virtual ~XrCompositorLayer()
XrCompositorLayer(const XrCompositorLayer & ) =delete
XrCompositorLayer(XrCompositorLayer && ) =default
Type type() const
void setReferenceSpace(const KDGpu::Handle< KDXr::ReferenceSpace_t > & referenceSpace)
KDGpu::Handle< KDXr::ReferenceSpace_t > referenceSpace() const
const XrExampleEngineLayer * engineLayer() const
XrExampleEngineLayer * engineLayer()
const Engine * engine() const
Engine * engine()

Protected Functions inherited from KDGpuExample::XrCompositorLayer

Name
XrCompositorLayer(Type type)
std::shared_ptr< spdlog::logger > logger() const
void uploadBufferData(const KDGpu::BufferUploadOptions & options)
void uploadTextureData(const KDGpu::TextureUploadOptions & options)

Protected Attributes inherited from KDGpuExample::XrCompositorLayer

Name
Type m_type
XrExampleEngineLayer * m_engineLayer
KDGpu::Handle< KDXr::ReferenceSpace_t > m_referenceSpace

Friends inherited from KDGpuExample::XrCompositorLayer

Name
class XrExampleEngineLayer

Public Functions Documentation

function XrCylinderLayer

1
2
3
explicit XrCylinderLayer(
    const XrCylinderLayerOptions & options
)

function ~XrCylinderLayer

1
~XrCylinderLayer() override

function XrCylinderLayer

1
2
3
XrCylinderLayer(
    const XrCylinderLayer & 
) =delete

function operator=

1
2
3
XrCylinderLayer & operator=(
    const XrCylinderLayer & 
) =delete

function XrCylinderLayer

1
2
3
XrCylinderLayer(
    XrCylinderLayer && 
) =default

function operator=

1
2
3
XrCylinderLayer & operator=(
    XrCylinderLayer && 
) =default

Protected Functions Documentation

function initialize

1
virtual void initialize() override

Reimplements: KDGpuExample::XrCompositorLayer::initialize

function cleanup

1
virtual void cleanup() override

Reimplements: KDGpuExample::XrCompositorLayer::cleanup

function update

1
2
3
virtual bool update(
    const KDXr::FrameState & frameState
) override

Reimplements: KDGpuExample::XrCompositorLayer::update

function recreateSwapchains

1
void recreateSwapchains()

function renderCylinder

1
virtual void renderCylinder() =0

Reimplemented by: KDGpuExample::XrCylinderImGuiLayer::renderCylinder

function compositionLayer

1
inline virtual KDXr::CompositionLayer * compositionLayer() override

Reimplements: KDGpuExample::XrCompositorLayer::compositionLayer

Public Attributes Documentation

variable position

1
KDBindings::Property< KDXr::Vector3 > position {};

variable orientation

1
KDBindings::Property< KDXr::Quaternion > orientation {};

variable resolution

1
KDBindings::Property< KDGpu::Extent2D > resolution { KDGpu::Extent2D{ 1280, 720 } };

variable radius

1
KDBindings::Property< float > radius { 0.0f };

variable centralAngle

1
KDBindings::Property< float > centralAngle { 0.0f };

variable aspectRatio

1
KDBindings::Property< float > aspectRatio { 1280.0f / 720.0f };

variable eyeVisibility

1
KDBindings::Property< KDXr::EyeVisibility > eyeVisibility { KDXr::EyeVisibility::Both };

Protected Attributes Documentation

variable m_device

1
KDGpu::Device * m_device { nullptr };

variable m_queue

1
KDGpu::Queue * m_queue { nullptr };

variable m_session

1
KDXr::Session * m_session { nullptr };

variable m_colorSwapchainFormat

1
KDGpu::Format m_colorSwapchainFormat { KDGpu::Format::UNDEFINED };

variable m_depthSwapchainFormat

1
KDGpu::Format m_depthSwapchainFormat { KDGpu::Format::UNDEFINED };

variable m_samples

1
KDGpu::SampleCountFlagBits m_samples { KDGpu::SampleCountFlagBits::Samples1Bit };

variable m_colorSwapchain

1
KDXr::SwapchainInfo m_colorSwapchain;

variable m_depthSwapchain

1
KDXr::SwapchainInfo m_depthSwapchain;

variable m_currentColorImageIndex

1
uint32_t m_currentColorImageIndex { 0 };

variable m_currentDepthImageIndex

1
uint32_t m_currentDepthImageIndex { 0 };

variable m_cylinderLayer

1
KDXr::CylinderLayer m_cylinderLayer;

Updated on 2024-12-22 at 00:01:23 +0000