Bicameral Engine
GPU-resident engine for a magic-research open-world game
Loading...
Searching...
No Matches
bicameral::render::DebugViewController Class Reference

#include <debug_view_controller.h>

Collaboration diagram for bicameral::render::DebugViewController:
[legend]

Public Member Functions

 DebugViewController (uint32_t gridSize, const DebugViewSettings &settings, const OrbitCameraState &camera)
std::vector< CellCoordinate > HandleInput (std::span< const InputEvent > events, uint32_t width, uint32_t height)
ProbeViewConstants Constants (uint32_t extractionIndex, uint32_t width, uint32_t height) const
const DebugViewSettings & Settings () const
const OrbitCamera & Camera () const
std::string Describe () const
bool TakeTraceRequest ()
std::vector< CameraRay > TakePushRays ()
void Peek (CellCoordinate cell, uint32_t depth)
const PeekView & Peeking () const
bool TakePeekChange ()

Private Member Functions

void HandlePointer (const InputEvent &event, uint32_t width, uint32_t height, std::vector< CellCoordinate > &pokes)
void HandleKey (const InputEvent &event, uint32_t width, uint32_t height)
void HandlePeekKey (const InputEvent &event, uint32_t width, uint32_t height)
void FocusOnPeek ()

Private Attributes

uint32_t m_gridSize
DebugViewSettings m_settings
OrbitCamera m_camera
bool m_rotating = false
bool m_panning = false
int32_t m_lastX = 0
int32_t m_lastY = 0
bool m_traceRequested = false
std::vector< CameraRay > m_pushRays
PeekView m_peek
bool m_peekChanged = false

Detailed Description

Definition at line 46 of file debug_view_controller.h.

Constructor & Destructor Documentation

◆ DebugViewController()

bicameral::render::DebugViewController::DebugViewController ( uint32_t gridSize,
const DebugViewSettings & settings,
const OrbitCameraState & camera )

Definition at line 50 of file debug_view_controller.cpp.

References m_camera, m_gridSize, and m_settings.

Member Function Documentation

◆ Camera()

const OrbitCamera & bicameral::render::DebugViewController::Camera ( ) const
inlinenodiscard

Definition at line 56 of file debug_view_controller.h.

References m_camera.

◆ Constants()

◆ Describe()

std::string bicameral::render::DebugViewController::Describe ( ) const
nodiscard

Definition at line 262 of file debug_view_controller.cpp.

References m_settings.

Referenced by HandleKey().

Here is the caller graph for this function:

◆ FocusOnPeek()

void bicameral::render::DebugViewController::FocusOnPeek ( )
private

Definition at line 198 of file debug_view_controller.cpp.

References m_camera, and m_peek.

Referenced by HandlePeekKey(), and Peek().

Here is the caller graph for this function:

◆ HandleInput()

std::vector< CellCoordinate > bicameral::render::DebugViewController::HandleInput ( std::span< const InputEvent > events,
uint32_t width,
uint32_t height )
nodiscard

Definition at line 57 of file debug_view_controller.cpp.

References HandleKey(), HandlePointer(), bicameral::KeyDown, m_camera, and bicameral::Wheel.

Here is the call graph for this function:

◆ HandleKey()

void bicameral::render::DebugViewController::HandleKey ( const InputEvent & event,
uint32_t width,
uint32_t height )
private

◆ HandlePeekKey()

void bicameral::render::DebugViewController::HandlePeekKey ( const InputEvent & event,
uint32_t width,
uint32_t height )
private

Definition at line 154 of file debug_view_controller.cpp.

References FocusOnPeek(), bicameral::Info, bicameral::InputEvent::key, bicameral::Log(), m_camera, m_gridSize, m_lastX, m_lastY, m_peek, m_peekChanged, m_settings, Peek(), bicameral::render::PEEK_MAX_DEPTH, bicameral::render::PickSliceCell(), bicameral::render::RayThroughPixel(), bicameral::Render, and bicameral::InputEvent::shift.

Referenced by HandleKey().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ HandlePointer()

void bicameral::render::DebugViewController::HandlePointer ( const InputEvent & event,
uint32_t width,
uint32_t height,
std::vector< CellCoordinate > & pokes )
private

Definition at line 74 of file debug_view_controller.cpp.

References bicameral::InputEvent::button, bicameral::ButtonDown, bicameral::InputEvent::kind, m_camera, m_gridSize, m_lastX, m_lastY, m_panning, m_pushRays, m_rotating, m_settings, bicameral::Middle, bicameral::render::PickSliceCell(), bicameral::PointerMove, bicameral::render::RayThroughPixel(), bicameral::Right, bicameral::InputEvent::shift, bicameral::InputEvent::x, and bicameral::InputEvent::y.

Referenced by HandleInput().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Peek()

void bicameral::render::DebugViewController::Peek ( CellCoordinate cell,
uint32_t depth )

Definition at line 188 of file debug_view_controller.cpp.

References FocusOnPeek(), bicameral::Info, bicameral::Log(), m_peek, m_peekChanged, bicameral::render::PEEK_MAX_DEPTH, bicameral::Render, bicameral::render::CellCoordinate::x, bicameral::render::CellCoordinate::y, and bicameral::render::CellCoordinate::z.

Referenced by HandlePeekKey().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Peeking()

const PeekView & bicameral::render::DebugViewController::Peeking ( ) const
inlinenodiscard

Definition at line 68 of file debug_view_controller.h.

References m_peek.

◆ Settings()

const DebugViewSettings & bicameral::render::DebugViewController::Settings ( ) const
inlinenodiscard

Definition at line 55 of file debug_view_controller.h.

References m_settings.

◆ TakePeekChange()

bool bicameral::render::DebugViewController::TakePeekChange ( )
nodiscard

Definition at line 215 of file debug_view_controller.cpp.

References m_peekChanged.

◆ TakePushRays()

std::vector< CameraRay > bicameral::render::DebugViewController::TakePushRays ( )
nodiscard

Definition at line 229 of file debug_view_controller.cpp.

References m_pushRays.

◆ TakeTraceRequest()

bool bicameral::render::DebugViewController::TakeTraceRequest ( )
nodiscard

Definition at line 222 of file debug_view_controller.cpp.

References m_traceRequested.

Member Data Documentation

◆ m_camera

OrbitCamera bicameral::render::DebugViewController::m_camera
private

◆ m_gridSize

uint32_t bicameral::render::DebugViewController::m_gridSize
private

◆ m_lastX

int32_t bicameral::render::DebugViewController::m_lastX = 0
private

Definition at line 86 of file debug_view_controller.h.

Referenced by HandlePeekKey(), and HandlePointer().

◆ m_lastY

int32_t bicameral::render::DebugViewController::m_lastY = 0
private

Definition at line 87 of file debug_view_controller.h.

Referenced by HandlePeekKey(), and HandlePointer().

◆ m_panning

bool bicameral::render::DebugViewController::m_panning = false
private

Definition at line 85 of file debug_view_controller.h.

Referenced by HandlePointer().

◆ m_peek

PeekView bicameral::render::DebugViewController::m_peek
private

Definition at line 92 of file debug_view_controller.h.

Referenced by Constants(), FocusOnPeek(), HandlePeekKey(), Peek(), and Peeking().

◆ m_peekChanged

bool bicameral::render::DebugViewController::m_peekChanged = false
private

Definition at line 93 of file debug_view_controller.h.

Referenced by HandlePeekKey(), Peek(), and TakePeekChange().

◆ m_pushRays

std::vector<CameraRay> bicameral::render::DebugViewController::m_pushRays
private

Definition at line 90 of file debug_view_controller.h.

Referenced by HandlePointer(), and TakePushRays().

◆ m_rotating

bool bicameral::render::DebugViewController::m_rotating = false
private

Definition at line 84 of file debug_view_controller.h.

Referenced by HandlePointer().

◆ m_settings

DebugViewSettings bicameral::render::DebugViewController::m_settings
private

◆ m_traceRequested

bool bicameral::render::DebugViewController::m_traceRequested = false
private

Definition at line 89 of file debug_view_controller.h.

Referenced by HandleKey(), and TakeTraceRequest().


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