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

#include <lab_panel.h>

Public Member Functions

 LabPanel (ID3D12Device *device)
void Build ()
void StartAuto ()
bool AutoFailed () const

Private Member Functions

bool CreateSession ()
void RunAuto ()
void BuildControls ()
void BuildStatus ()
void BuildSlice ()
void BuildCell () const
void BuildRecording ()
void Report (const std::expected< void, std::string > &result)

Private Attributes

ComPtr< ID3D12Device5 > m_device
std::optional< sim::LabSession > m_session
std::vector< sim::LabMaterial > m_materials
std::string m_error
std::string m_message
std::array< int, 3 > m_cell = {3, 3, 3}
int m_material = 1
int m_temperatureKelvin = 300
bool m_running = false
std::string m_recordingPath = "lab_recording.blab"
bool m_autoPending = false
bool m_autoFailed = false

Detailed Description

Definition at line 25 of file lab_panel.h.

Constructor & Destructor Documentation

◆ LabPanel()

bicameral::editor::LabPanel::LabPanel ( ID3D12Device * device)
explicit

Definition at line 46 of file lab_panel.cpp.

References m_device.

Member Function Documentation

◆ AutoFailed()

bool bicameral::editor::LabPanel::AutoFailed ( ) const
inlinenodiscard

Definition at line 34 of file lab_panel.h.

References m_autoFailed.

◆ Build()

void bicameral::editor::LabPanel::Build ( )

Definition at line 90 of file lab_panel.cpp.

References BuildCell(), BuildControls(), BuildRecording(), BuildSlice(), BuildStatus(), CreateSession(), m_autoPending, m_error, m_running, m_session, Report(), and RunAuto().

Here is the call graph for this function:

◆ BuildCell()

void bicameral::editor::LabPanel::BuildCell ( ) const
private

Definition at line 224 of file lab_panel.cpp.

References bicameral::sim::LabCellPosition::Index(), bicameral::sim::LabBoxCell(), m_cell, m_session, and bicameral::sim::BakedReactionTable::speciesNames.

Referenced by Build().

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

◆ BuildControls()

void bicameral::editor::LabPanel::BuildControls ( )
private

Definition at line 146 of file lab_panel.cpp.

References bicameral::sim::LAB_BOX_EDGE, m_cell, m_error, m_material, m_materials, m_message, m_running, m_session, m_temperatureKelvin, and Report().

Referenced by Build().

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

◆ BuildRecording()

void bicameral::editor::LabPanel::BuildRecording ( )
private

Definition at line 273 of file lab_panel.cpp.

References m_message, m_recordingPath, m_session, bicameral::sim::ParseLabRecording(), Report(), and bicameral::sim::SerializeLabRecording().

Referenced by Build().

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

◆ BuildSlice()

void bicameral::editor::LabPanel::BuildSlice ( )
private

Definition at line 191 of file lab_panel.cpp.

References bicameral::sim::LAB_BOX_EDGE, bicameral::sim::LabBoxCell(), m_cell, and m_session.

Referenced by Build().

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

◆ BuildStatus()

void bicameral::editor::LabPanel::BuildStatus ( )
private

Definition at line 123 of file lab_panel.cpp.

References m_error, and m_session.

Referenced by Build().

Here is the caller graph for this function:

◆ CreateSession()

bool bicameral::editor::LabPanel::CreateSession ( )
private

Definition at line 51 of file lab_panel.cpp.

References bicameral::sim::BakeReactionTable(), bicameral::sim::LabSession::Create(), bicameral::Info, bicameral::Log(), m_device, m_error, m_material, m_materials, m_session, bicameral::sim::MakeCombustionTestTable(), bicameral::sim::MakeLabMaterials(), and bicameral::Sim.

Referenced by Build(), and RunAuto().

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

◆ Report()

void bicameral::editor::LabPanel::Report ( const std::expected< void, std::string > & result)
private

Definition at line 77 of file lab_panel.cpp.

References bicameral::Error, bicameral::Log(), m_error, m_running, m_session, and bicameral::Sim.

Referenced by Build(), BuildControls(), and BuildRecording().

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

◆ RunAuto()

void bicameral::editor::LabPanel::RunAuto ( )
private

Definition at line 308 of file lab_panel.cpp.

References CreateSession(), bicameral::Error, bicameral::sim::LabRecording::hashes, bicameral::Info, bicameral::Log(), m_autoFailed, m_cell, m_error, m_materials, m_session, bicameral::sim::LabMaterial::name, bicameral::sim::ParseLabRecording(), bicameral::sim::SerializeLabRecording(), and bicameral::Sim.

Referenced by Build().

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

◆ StartAuto()

void bicameral::editor::LabPanel::StartAuto ( )
inline

Definition at line 33 of file lab_panel.h.

References m_autoPending.

Member Data Documentation

◆ m_autoFailed

bool bicameral::editor::LabPanel::m_autoFailed = false
private

Definition at line 61 of file lab_panel.h.

Referenced by AutoFailed(), and RunAuto().

◆ m_autoPending

bool bicameral::editor::LabPanel::m_autoPending = false
private

Definition at line 60 of file lab_panel.h.

Referenced by Build(), and StartAuto().

◆ m_cell

std::array<int, 3> bicameral::editor::LabPanel::m_cell = {3, 3, 3}
private

Definition at line 54 of file lab_panel.h.

Referenced by BuildCell(), BuildControls(), BuildSlice(), and RunAuto().

◆ m_device

ComPtr<ID3D12Device5> bicameral::editor::LabPanel::m_device
private

Definition at line 47 of file lab_panel.h.

Referenced by CreateSession(), and LabPanel().

◆ m_error

std::string bicameral::editor::LabPanel::m_error
private

Definition at line 50 of file lab_panel.h.

Referenced by Build(), BuildControls(), BuildStatus(), CreateSession(), Report(), and RunAuto().

◆ m_material

int bicameral::editor::LabPanel::m_material = 1
private

Definition at line 55 of file lab_panel.h.

Referenced by BuildControls(), and CreateSession().

◆ m_materials

std::vector<sim::LabMaterial> bicameral::editor::LabPanel::m_materials
private

Definition at line 49 of file lab_panel.h.

Referenced by BuildControls(), CreateSession(), and RunAuto().

◆ m_message

std::string bicameral::editor::LabPanel::m_message
private

Definition at line 51 of file lab_panel.h.

Referenced by BuildControls(), and BuildRecording().

◆ m_recordingPath

std::string bicameral::editor::LabPanel::m_recordingPath = "lab_recording.blab"
private

Definition at line 58 of file lab_panel.h.

Referenced by BuildRecording().

◆ m_running

bool bicameral::editor::LabPanel::m_running = false
private

Definition at line 57 of file lab_panel.h.

Referenced by Build(), BuildControls(), and Report().

◆ m_session

std::optional<sim::LabSession> bicameral::editor::LabPanel::m_session
private

◆ m_temperatureKelvin

int bicameral::editor::LabPanel::m_temperatureKelvin = 300
private

Definition at line 56 of file lab_panel.h.

Referenced by BuildControls().


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