# virtualexplorer7613/techlab4_week07_team2 architecture

> Architecture diagram of the GitHub repository virtualexplorer7613/techlab4_week07_team2, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/virtualexplorer7613/techlab4_week07_team2
- Repository: https://github.com/virtualexplorer7613/techlab4_week07_team2

## Overview

Hitori is a C++ 3D engine with an editor and an OBJ-viewer application. The principal editor workflow runs from engine startup and asset loading, through editor view configuration and render-queue construction, to rendering; the editor also supports scene editing and Play-In-Editor (PIE) world duplication. Runtime rendering and asset management are shown alongside editor panels and viewport handling. The README provides no capability details, so feature scope and links rely on the supplied source index and excerpts; unsampled subsystem internals and uncertain links are omitted.

Main entry points: [`Source/Runtime/Launch/LaunchEngineLoop.cpp`](https://github.com/virtualexplorer7613/techlab4_week07_team2/blob/master/Source/Runtime/Launch/LaunchEngineLoop.cpp) (Engine loop), [`Source/Editor/HitoriEd/EditorEngine.cpp`](https://github.com/virtualexplorer7613/techlab4_week07_team2/blob/master/Source/Editor/HitoriEd/EditorEngine.cpp) (Editor engine), [`Source/Runtime/Asset/AssetManager.cpp`](https://github.com/virtualexplorer7613/techlab4_week07_team2/blob/master/Source/Runtime/Asset/AssetManager.cpp) (Asset manager), [`Source/Runtime/Render/Renderer.cpp`](https://github.com/virtualexplorer7613/techlab4_week07_team2/blob/master/Source/Runtime/Render/Renderer.cpp) (Renderer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_startup["Engine startup"]
  node_loop["Engine loop"]
  node_engine["Engine mode<br/>[Engine.cpp]"]
  node_window["Platform window<br/>[Window.cpp]"]
  node_device["Render device<br/>[RenderDevice.cpp]"]
end

subgraph group_assets["Assets and content"]
  node_assetmgr["Asset manager<br/>[AssetManager.cpp]"]
  node_objimport["OBJ importer<br/>[ObjImporter.cpp]"]
  node_lod["Mesh LOD"]
end

subgraph group_world["World and editor"]
  node_editor["Editor engine<br/>[EditorEngine.cpp]"]
  node_worldstate["World and levels<br/>[World.cpp]"]
  node_viewpanel["Viewport panel<br/>[ViewportsPanel.cpp]"]
  node_viewadapter["Viewport adapter"]
  node_editorui["Editor panels<br/>[EditorUI.cpp]"]
  node_details["Details panel<br/>[DetailsPanel.cpp]"]
  node_outliner["World outliner<br/>[OutlinerPanel.cpp]"]
end

subgraph group_render["Rendering"]
  node_renderer["Renderer<br/>[Renderer.cpp]"]
  node_renderqueue["Render packets<br/>[RenderPacket.h]"]
  node_commands["Render commands<br/>[RenderCommand.cpp]"]
  node_resources["Shader resources"]
  node_texture["Texture assets<br/>[Texture2D.h]"]
end

subgraph group_support["Runtime support"]
  node_log["Engine logging<br/>[EngineLog.cpp]"]
  node_stats["Performance stats<br/>[LightweightStats.h]"]
  node_overlay["Stats overlay<br/>[StatOverlay.h]"]
end

node_user(("Editor user"))

node_user -.->|"edits scene"| node_editor
node_loop -->|"creates"| node_device
node_loop -->|"creates"| node_window
node_loop -->|"initializes"| node_commands
node_loop -->|"initializes"| node_renderer
node_loop -->|"initializes"| node_resources
node_loop -->|"loads assets"| node_assetmgr
node_loop -->|"initializes"| node_engine
node_assetmgr -->|"loads meshes"| node_objimport
node_assetmgr -->|"generates LODs"| node_lod
node_editor -->|"reads view state"| node_viewpanel
node_editor -->|"builds render queue"| node_viewadapter
node_editor -->|"renders world"| node_worldstate
node_editor -->|"configures UI"| node_editorui
node_editor -->|"ticks stats"| node_overlay
node_viewpanel -->|"uses adapter"| node_viewadapter
node_viewadapter -.->|"builds packets"| node_renderqueue
node_renderer -->|"consumes packets"| node_renderqueue
node_renderer -.->|"issues draws"| node_commands
node_assetmgr -->|"loads textures"| node_texture
node_loop -->|"updates frame stats"| node_stats
node_log -.->|"reports logs"| node_overlay
node_user -.->|"edits properties"| node_details
node_user -.->|"selects actors"| node_outliner

click node_loop "https://github.com/virtualexplorer7613/techlab4_week07_team2/blob/master/Source/Runtime/Launch/LaunchEngineLoop.cpp"
click node_engine "https://github.com/virtualexplorer7613/techlab4_week07_team2/blob/master/Source/Runtime/Engine/Engine.cpp"
click node_window "https://github.com/virtualexplorer7613/techlab4_week07_team2/blob/master/Source/Runtime/Core/Window.cpp"
click node_device "https://github.com/virtualexplorer7613/techlab4_week07_team2/blob/master/Source/Runtime/Render/RenderDevice.cpp"
click node_assetmgr "https://github.com/virtualexplorer7613/techlab4_week07_team2/blob/master/Source/Runtime/Asset/AssetManager.cpp"
click node_objimport "https://github.com/virtualexplorer7613/techlab4_week07_team2/blob/master/Source/Runtime/Asset/ObjImporter/ObjImporter.cpp"
click node_lod "https://github.com/virtualexplorer7613/techlab4_week07_team2/blob/master/Source/Runtime/Asset/LOD/StaticMeshLODGenerator.cpp"
click node_editor "https://github.com/virtualexplorer7613/techlab4_week07_team2/blob/master/Source/Editor/HitoriEd/EditorEngine.cpp"
click node_worldstate "https://github.com/virtualexplorer7613/techlab4_week07_team2/blob/master/Source/Runtime/Engine/World.cpp"
click node_viewpanel "https://github.com/virtualexplorer7613/techlab4_week07_team2/blob/master/Source/Editor/Viewports/ViewportsPanel.cpp"
click node_viewadapter "https://github.com/virtualexplorer7613/techlab4_week07_team2/blob/master/Source/Editor/LevelEditor/MultipleViewports/Adapter/MultipleViewportsAdapter.cpp"
click node_editorui "https://github.com/virtualexplorer7613/techlab4_week07_team2/blob/master/Source/Editor/EditorUI/EditorUI.cpp"
click node_details "https://github.com/virtualexplorer7613/techlab4_week07_team2/blob/master/Source/Editor/Details/DetailsPanel.cpp"
click node_outliner "https://github.com/virtualexplorer7613/techlab4_week07_team2/blob/master/Source/Editor/Outliner/OutlinerPanel.cpp"
click node_renderer "https://github.com/virtualexplorer7613/techlab4_week07_team2/blob/master/Source/Runtime/Render/Renderer.cpp"
click node_renderqueue "https://github.com/virtualexplorer7613/techlab4_week07_team2/blob/master/Source/Runtime/Render/RenderPacket.h"
click node_commands "https://github.com/virtualexplorer7613/techlab4_week07_team2/blob/master/Source/Runtime/Render/RenderCommand.cpp"
click node_resources "https://github.com/virtualexplorer7613/techlab4_week07_team2/blob/master/Source/Runtime/Render/RenderResourceManager.cpp"
click node_texture "https://github.com/virtualexplorer7613/techlab4_week07_team2/blob/master/Source/Runtime/Render/Texture2D.h"
click node_log "https://github.com/virtualexplorer7613/techlab4_week07_team2/blob/master/Source/Runtime/Core/EngineLog.cpp"
click node_stats "https://github.com/virtualexplorer7613/techlab4_week07_team2/blob/master/Source/Runtime/Core/Stats/LightweightStats.h"
click node_overlay "https://github.com/virtualexplorer7613/techlab4_week07_team2/blob/master/Source/Runtime/Core/StatOverlay.h"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_loop,node_engine,node_window,node_device,node_user toneBlue
class node_assetmgr,node_objimport,node_lod toneAmber
class node_editor,node_worldstate,node_viewpanel,node_viewadapter,node_editorui,node_details,node_outliner toneMint
class node_renderer,node_renderqueue,node_commands,node_resources,node_texture toneRose
class node_log,node_stats,node_overlay toneIndigo
```

## Components

### Engine startup

- [Engine loop](https://github.com/virtualexplorer7613/techlab4_week07_team2/blob/master/Source/Runtime/Launch/LaunchEngineLoop.cpp): `Source/Runtime/Launch/LaunchEngineLoop.cpp`
- [Engine mode](https://github.com/virtualexplorer7613/techlab4_week07_team2/blob/master/Source/Runtime/Engine/Engine.cpp): `Source/Runtime/Engine/Engine.cpp`
- [Platform window](https://github.com/virtualexplorer7613/techlab4_week07_team2/blob/master/Source/Runtime/Core/Window.cpp): `Source/Runtime/Core/Window.cpp`
- [Render device](https://github.com/virtualexplorer7613/techlab4_week07_team2/blob/master/Source/Runtime/Render/RenderDevice.cpp): `Source/Runtime/Render/RenderDevice.cpp`

### Assets and content

- [Asset manager](https://github.com/virtualexplorer7613/techlab4_week07_team2/blob/master/Source/Runtime/Asset/AssetManager.cpp): `Source/Runtime/Asset/AssetManager.cpp`
- [OBJ importer](https://github.com/virtualexplorer7613/techlab4_week07_team2/blob/master/Source/Runtime/Asset/ObjImporter/ObjImporter.cpp): `Source/Runtime/Asset/ObjImporter/ObjImporter.cpp`
- [Mesh LOD](https://github.com/virtualexplorer7613/techlab4_week07_team2/blob/master/Source/Runtime/Asset/LOD/StaticMeshLODGenerator.cpp): `Source/Runtime/Asset/LOD/StaticMeshLODGenerator.cpp`

### World and editor

- [Editor engine](https://github.com/virtualexplorer7613/techlab4_week07_team2/blob/master/Source/Editor/HitoriEd/EditorEngine.cpp): `Source/Editor/HitoriEd/EditorEngine.cpp`
- [World and levels](https://github.com/virtualexplorer7613/techlab4_week07_team2/blob/master/Source/Runtime/Engine/World.cpp): `Source/Runtime/Engine/World.cpp`
- [Viewport panel](https://github.com/virtualexplorer7613/techlab4_week07_team2/blob/master/Source/Editor/Viewports/ViewportsPanel.cpp): `Source/Editor/Viewports/ViewportsPanel.cpp`
- [Viewport adapter](https://github.com/virtualexplorer7613/techlab4_week07_team2/blob/master/Source/Editor/LevelEditor/MultipleViewports/Adapter/MultipleViewportsAdapter.cpp): `Source/Editor/LevelEditor/MultipleViewports/Adapter/MultipleViewportsAdapter.cpp`
- [Editor panels](https://github.com/virtualexplorer7613/techlab4_week07_team2/blob/master/Source/Editor/EditorUI/EditorUI.cpp): `Source/Editor/EditorUI/EditorUI.cpp`
- [Details panel](https://github.com/virtualexplorer7613/techlab4_week07_team2/blob/master/Source/Editor/Details/DetailsPanel.cpp): `Source/Editor/Details/DetailsPanel.cpp`
- [World outliner](https://github.com/virtualexplorer7613/techlab4_week07_team2/blob/master/Source/Editor/Outliner/OutlinerPanel.cpp): `Source/Editor/Outliner/OutlinerPanel.cpp`

### Rendering

- [Renderer](https://github.com/virtualexplorer7613/techlab4_week07_team2/blob/master/Source/Runtime/Render/Renderer.cpp): `Source/Runtime/Render/Renderer.cpp`
- [Render packets](https://github.com/virtualexplorer7613/techlab4_week07_team2/blob/master/Source/Runtime/Render/RenderPacket.h): `Source/Runtime/Render/RenderPacket.h`
- [Render commands](https://github.com/virtualexplorer7613/techlab4_week07_team2/blob/master/Source/Runtime/Render/RenderCommand.cpp): `Source/Runtime/Render/RenderCommand.cpp`
- [Shader resources](https://github.com/virtualexplorer7613/techlab4_week07_team2/blob/master/Source/Runtime/Render/RenderResourceManager.cpp): `Source/Runtime/Render/RenderResourceManager.cpp`
- [Texture assets](https://github.com/virtualexplorer7613/techlab4_week07_team2/blob/master/Source/Runtime/Render/Texture2D.h): `Source/Runtime/Render/Texture2D.h`

### Runtime support

- [Engine logging](https://github.com/virtualexplorer7613/techlab4_week07_team2/blob/master/Source/Runtime/Core/EngineLog.cpp): `Source/Runtime/Core/EngineLog.cpp`
- [Performance stats](https://github.com/virtualexplorer7613/techlab4_week07_team2/blob/master/Source/Runtime/Core/Stats/LightweightStats.h): `Source/Runtime/Core/Stats/LightweightStats.h`
- [Stats overlay](https://github.com/virtualexplorer7613/techlab4_week07_team2/blob/master/Source/Runtime/Core/StatOverlay.h): `Source/Runtime/Core/StatOverlay.h`

### Other components

- **Editor user**

## Connections

- Editor user → Editor engine: edits scene
- Engine loop → Render device: creates (evidence: `Source/Runtime/Launch/LaunchEngineLoop.cpp`)
- Engine loop → Platform window: creates (evidence: `Source/Runtime/Launch/LaunchEngineLoop.cpp`)
- Engine loop → Render commands: initializes (evidence: `Source/Runtime/Launch/LaunchEngineLoop.cpp`)
- Engine loop → Renderer: initializes (evidence: `Source/Runtime/Launch/LaunchEngineLoop.cpp`)
- Engine loop → Shader resources: initializes (evidence: `Source/Runtime/Launch/LaunchEngineLoop.cpp`)
- Engine loop → Asset manager: loads assets (evidence: `Source/Runtime/Launch/LaunchEngineLoop.cpp`)
- Engine loop → Engine mode: initializes (evidence: `Source/Runtime/Launch/LaunchEngineLoop.cpp`)
- Asset manager → OBJ importer: loads meshes (evidence: `Source/Runtime/Asset/AssetManager.cpp`)
- Asset manager → Mesh LOD: generates LODs
- Editor engine → Viewport panel: reads view state (evidence: `Source/Editor/HitoriEd/EditorEngine.cpp`)
- Editor engine → Viewport adapter: builds render queue (evidence: `Source/Editor/HitoriEd/EditorEngine.cpp`)
- Editor engine → World and levels: renders world (evidence: `Source/Editor/HitoriEd/EditorEngine.cpp`)
- Editor engine → Editor panels: configures UI
- Editor engine → Stats overlay: ticks stats (evidence: `Source/Editor/HitoriEd/EditorEngine.cpp`)
- Viewport panel → Viewport adapter: uses adapter (evidence: `Source/Editor/Viewports/ViewportsPanel.cpp`)
- Viewport adapter → Render packets: builds packets
- Renderer → Render packets: consumes packets
- Renderer → Render commands: issues draws
- Asset manager → Texture assets: loads textures (evidence: `Source/Runtime/Asset/AssetManager.cpp`)
- Engine loop → Performance stats: updates frame stats (evidence: `Source/Runtime/Launch/LaunchEngineLoop.cpp`)
- Engine logging → Stats overlay: reports logs
- Editor user → Details panel: edits properties
- Editor user → World outliner: selects actors
