# Structure & Description

* Engine 구조

<div align="right" data-full-width="false"><figure><img src="/files/670Lv5Xg7O1Qt0Q0yWOZ" alt=""><figcaption></figcaption></figure></div>

<div data-full-width="false"><figure><img src="/files/yK8XDlVEbQoiDDAX23dN" alt=""><figcaption></figcaption></figure></div>

1. <mark style="color:red;background-color:orange;">**주요 Class 설명**</mark>
   * <mark style="color:purple;background-color:blue;">**EngineBody**</mark>

     * **엔진 시스템 통합 관리:** &#x20;

       * Graphics, Resource, Input, Time, Scene, Render 등 모든 주요 매니저 클래스들을 중앙에서 통합 관리

     * **엔진 모드 제어:**&#x20;

       * Edit(편집), Play(게임 실행), Pause(일시정지) 모드 간 전환 관리

     * **생명주기 관리:**
       * &#x20;Init
         * 엔진 시작 시 한 번 호출되어 모든 핵심 시스템 초기화
         * 각 매니저 시스템(Graphics, Input, Time, Resource 등)의 초기화 메서드 호출
         * 윈도우 핸들과 크기 설정 및 초기 Scene 로드
       * &#x20;Update
         * 매 프레임마다 호출되는 로직 처리 단계
         * 모든 게임 로직과 상태 변경이 이 단계에서 처리됨
       * Render&#x20;

         * 업데이트된 게임 상태를 화면에 출력
         * 더블 버퍼링을 위한 스왑 체인 호출

     * **Scene 상태 관리:**&#x20;
       * 편집 모드와 플레이 모드 간 씬 상태 보존 및 전환

   * <mark style="color:purple;background-color:blue;">**SceneManager**</mark>
     * **Scene 생명주기 관리**:

       * EngineBody에서 제어하는 생명주기에 맞춰 현재 실행될 Scene에 Start, Update, LateUpdate를 호출

     * **Scene 로드 및 생성**:

       * 다양한 Scene 로드 함수 (LoadScene, LoadPlayScene)
       * Scene 생성
       * Edit/Play모드 간 Scene 상태 관리

     * **XML 기반 데이터 관리**:

       * Scene 정보를 XML 파일로 저장 및 로드
       * 프리팹(Prefab) 로드 및 복제 지원
       * 모든 게임 오브젝트와 컴포넌트 속성을 파일로 저장하고 복원

     * **게임 오브젝트 생성 도구**:

       * 기본 프리미티브 오브젝트 생성 (Cube, Sphere, Cylinder 등)
       * Mesh, Particle, Terrain 등 특수 오브젝트 생성
       * UI오브젝트 생성(Image, Button)
       * 애니메이션 모델 및 정적 모델 로드

   * <mark style="color:purple;background-color:blue;">**RenderManager**</mark>
     * **게임 엔진의 렌더링 시스템을 총괄**

       * 현재 Scene에서 렌더링 할 오브젝트들을 선별하여 관리
       * 렌더링 흐름을 제어하여 ShadowMapping, Gaussian Blur 등의 기능을 지원

     * **렌더링 객체 관리**:

       * 일반 오브젝트, 환경맵 오브젝트, UI 오브젝트, Particle, Terrain을 구분하여 관리&#x20;

     * **렌더링 최적화**:

       * 인스턴싱을 사용하여 동일한 오브젝트를 효율적으로 렌더링 가능하도록 지원

   * <mark style="color:purple;background-color:blue;">**ResourceManager**</mark>
     * **게임 엔진의 모든 리소스 관리:**

       * Mesh, Texture, Shader, Material, Model 등 다양한 리소스 타입 관리
       * 각 리소스에 고유 이름 부여 및 이름으로 접근 가능
       * 리소스 종류별로 별도의 저장소 사용<br>

         ```cpp
         ResourecMap _resources[RESOURCE_TYPE_COUNT]; // 리소스 타입별로 다른 맵 사용
         ```

     * **XML 기반 직렬화/역직렬화**

       * 모든 리소스 정보를 XML 파일로 저장
       * Engine 시작 시 XML 파일에서 리소스 데이터 로드

     * **리소스 캐싱 및 재사용**
       * 동일 리소스의 중복 로드 방지
       * 이름 기반 리소스 참조 시스템


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://jihoon-jungs-organization.gitbook.io/jihoon_engine/introduce/structure-and-description.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
