# wannabpark/week2_texture_wf architecture

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

- Interactive diagram: https://gitdiagram.com/wannabpark/week2_texture_wf
- Repository: https://github.com/wannabpark/week2_texture_wf

## Overview

This project is a game engine (named “Week1-Engine”) written in C++ that provides core engine functionality for rendering, scene management, actor/component handling, hardware abstraction, and debugging. The file tree clearly separates functional areas such as Core engine systems, various Actors and their Components, Rendering (including shader management), a Mathematical library, Input management, and integration with third-party libraries like ImGui and SimpleJSON.

##### Main Components
- Engine Core: Represent the entry point (main.cpp) and main engine loop (Engine.cpp/Engine.h, EngineStatics.cpp). This is the central hub that drives game logic, scene management, and system initialization.
- Scene & Object Management: Include modules for Scene Managers (FSceneManager), Object system (UObject, UClass, ObjectFactory) and the Actor hierarchy (under Source/Object/Actor). Illustrate how various actor types (Camera, Cube, Sphere, etc.) are instantiated and managed.
- Actor Components & Systems: Detail the Actor Component structure (including Colliders and Primitive components) which allows behaviors to be modularly added to actors.
- Rendering System: Highlight the Rendering module (URenderer, ShaderParameterMacros, BufferCache) plus the Shaders directory where several HLSL shader files reside. Show that the Engine Core directs render calls to the rendering system.
- Hardware Abstraction Layer (HAL): Include PlatformMemory, PlatformType, and StackAllocator under the HAL directory. This abstracts underlying hardware specifics such as memory management.
- Input System: Represent the input handling via PlayerInput and PlayerController, showing how user input feeds into the system.
- Math Library: Clearly mark the Math module (Vector, Matrix, Plane, Transform, MathUtility) as it underpins physics, rendering, and transformation calculations.
- Debug & Editor Tools: Represent debugging facilities (DebugConsole) and editor management (FEditorManager) which could be used during development.
- Third-Party Integrations: Include a separate block for ThirdParty libraries (ImGui for UI, SimpleJSON for serialization). Indicate how they integrate with the engine (for example, ImGui integration in Rendering via DirectX implementations).

##### Relationships and Interactions
- From the Scene Manager, show interactions with the Object and Actor systems – for instance, how the game world is populated with various actors and components.
- That ThirdParty modules like ImGui integrate with the Rendering system and possibly with Debug systems for overlay UIs.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Engine Core Subgraph
    subgraph "Engine Core"
        EP["Entry Point (Engine)"]:::core
        EL["Engine Loop (Initialization)"]:::core
    end

    %% Scene & Object Management Subgraph
    subgraph "Scene & Object Management"
        SM["Scene Manager"]:::core
        OS["Object System"]:::core
        AH["Actor Hierarchy"]:::core
    end

    %% Actor Components & Systems Subgraph
    subgraph "Actor Components & Systems"
        AC["Actor Components"]:::subsystem
        COL["Colliders"]:::subsystem
        PC["Primitive Components"]:::subsystem
    end

    %% Rendering System Subgraph
    subgraph "Rendering System"
        RM["Rendering Module"]:::subsystem
        SH["Shaders"]:::subsystem
        TA["Text Atlas Manager"]:::subsystem
    end

    %% Hardware Abstraction Layer Subgraph
    subgraph "Hardware Abstraction Layer (HAL)"
        HAL["HAL"]:::core
    end

    %% Input System Subgraph
    subgraph "Input System"
        IN["Input System"]:::subsystem
    end

    %% Math Library Subgraph
    subgraph "Math Library"
        ML["Math Library"]:::core
    end

    %% Debug & Editor Tools Subgraph
    subgraph "Debug & Editor Tools"
        DC["Debug Console"]:::subsystem
        EM["Editor Manager"]:::subsystem
    end

    %% Third-Party Integrations Subgraph
    subgraph "Third-Party Integrations"
        IM["ImGui"]:::tp
        SJ["SimpleJSON"]:::tp
    end

    %% Relationships from Engine Core
    EL -->|"controls"| SM
    EL -->|"controls"| RM
    EL -->|"controls"| IN
    EL -->|"controls"| HAL
    EL -->|"controls"| ML
    EL -->|"controls"| DC
    EL -->|"controls"| EM
    EL -->|"integrates"| IM
    EL -->|"integrates"| SJ

    %% Relationships in Scene & Object Management
    SM -->|"populates"| OS
    OS -->|"contains"| AH
    AH -->|"composes"| AC

    %% Relationships in Actor Components & Systems
    AC -->|"includes"| COL
    AC -->|"includes"| PC

    %% Relationships in Rendering System
    RM -->|"uses"| SH
    RM -->|"uses"| TA
    %% Third-party integration with Rendering and Debug
    RM -->|"ui-integrated"| IM
    DC -->|"overlay"| IM
    DC -->|"data-sourced"| SJ

    %% Define Styles
    classDef core fill:#aqua,stroke:#333,stroke-width:2px;
    classDef subsystem fill:#f9c8ff,stroke:#333,stroke-width:2px;
    classDef tp fill:#ffdd99,stroke:#333,stroke-width:2px;

    %% Click Events for Engine Core
    click EP "https://github.com/wannabpark/week2_texture_wf/blob/main/main.cpp"
    click EL "https://github.com/wannabpark/week2_texture_wf/blob/main/Source/Core/Engine.cpp"

    %% Click Events for Scene & Object Management
    click SM "https://github.com/wannabpark/week2_texture_wf/blob/main/Source/Core/FSceneManager.cpp"
    click OS "https://github.com/wannabpark/week2_texture_wf/blob/main/Source/Object/UObject.cpp"
    click AH "https://github.com/wannabpark/week2_texture_wf/tree/main/Source/Object/Actor"

    %% Click Events for Actor Components & Systems
    click AC "https://github.com/wannabpark/week2_texture_wf/tree/main/Source/Object/ActorComponent"
    click COL "https://github.com/wannabpark/week2_texture_wf/tree/main/Source/Object/ActorComponent/Colliders"
    click PC "https://github.com/wannabpark/week2_texture_wf/tree/main/Source/Object/PrimitiveComponent"

    %% Click Events for Rendering System
    click RM "https://github.com/wannabpark/week2_texture_wf/tree/main/Source/Core/Rendering"
    click SH "https://github.com/wannabpark/week2_texture_wf/tree/main/Shaders"
    click TA "https://github.com/wannabpark/week2_texture_wf/blob/main/Source/Core/Rendering/TextAtlasManager.cpp"

    %% Click Events for HAL
    click HAL "https://github.com/wannabpark/week2_texture_wf/tree/main/Source/Core/HAL"

    %% Click Events for Input System
    click IN "https://github.com/wannabpark/week2_texture_wf/tree/main/Source/Core/Input"

    %% Click Events for Math Library
    click ML "https://github.com/wannabpark/week2_texture_wf/tree/main/Source/Core/Math"

    %% Click Events for Debug & Editor Tools
    click DC "https://github.com/wannabpark/week2_texture_wf/blob/main/Source/Debug/DebugConsole.cpp"
    click EM "https://github.com/wannabpark/week2_texture_wf/blob/main/Source/Static/FEditorManager.cpp"

    %% Click Events for Third-Party Integrations
    click IM "https://github.com/wannabpark/week2_texture_wf/tree/main/Source/ThirdParty/ImGui"
    click SJ "https://github.com/wannabpark/week2_texture_wf/tree/main/Source/ThirdParty/SimpleJSON"
```
