Skip to main content

Architecture

1. Overview

본 문서는 ged 모듈의 아키텍처 구조를 기술한다.

ged는 에디터 기능을 제공하는 모듈이며 다음 구성요소로 이루어진다.

Editor EditorState Tool System Command System UndoStack UI System

각 구성요소는 독립된 모듈로 정의되며 Editor 객체를 중심으로 상호 작용한다.


2. Module Structure

ged 모듈 구조

ged/ ├─ editor/ ├─ tools/ ├─ command/ ├─ ui/ └─ tests/

각 디렉토리는 다음 역할을 수행한다.

editor 에디터 중심 객체 정의

tools 사용자 입력 처리

command 작업 실행 및 Undo / Redo 관리

ui 에디터 UI 구조 정의

tests 기능 검증 코드


3. Core Components

Editor

Editor는 에디터 시스템의 중심 객체이다.

관리 객체

EditorState UndoStack UiRoot Tool

Editor는 이벤트를 Tool로 전달한다.


EditorState

EditorState는 에디터 상태 데이터를 저장한다.

저장 데이터

selection active_object tool_mode


Tool System

Tool 시스템은 사용자 입력을 처리한다.

구조

Tool │ ├─ SelectTool └─ TransformTool

Tool은 이벤트를 처리하고 필요 시 Command를 생성한다.


Command System

Command 시스템은 작업 실행과 Undo / Redo 기능을 제공한다.

구조

Command │ ├─ SelectCommand └─ TransformCommand

Command 실행 히스토리는 UndoStack이 관리한다.


UndoStack

UndoStack은 Command 실행 히스토리를 관리한다.

주요 기능

push undo redo clear


UI System

UI 시스템은 에디터 사용자 인터페이스 구조를 정의한다.

구성요소

UiRoot Dockspace

패널 구조

ViewportPanel OutlinerPanel PropertiesPanel


4. Module Dependency

모듈 의존 관계

editor_state │ ▼ command │ ▼ tools │ ▼ ui │ ▼ editor


5. Event Flow

이벤트 처리 흐름

gcore::Event │ ▼ Editor │ ▼ Active Tool │ ▼ Command │ ▼ UndoStack


6. Object Ownership

Editor는 다음 객체를 생성하고 관리한다.

EditorState UndoStack UiRoot SelectTool TransformTool

현재 활성 Tool

Tool* active_tool_


7. Test

tests/smoke.cpp는 기본 기능 검증을 수행한다.

검증 항목

Editor 생성 SelectCommand 실행 Undo 수행 Redo 수행 Tool 실행 TransformTool 실행