Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
engine:worldlayout [2017/02/02 22:36] – [Angles] stohrendorf | engine:worldlayout [2017/06/04 21:34] (current) – zdimension | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== World Layout ====== | ====== World Layout ====== | ||
+ | |||
+ | ===== Coordinate System ===== | ||
+ | |||
+ | The engine uses a right-handed coordinate system, with $X$ to the right, $Y$ down, and $Z$ forward. | ||
+ | |||
+ | The mapping between OpenGL and the engine' | ||
+ | |||
+ | ==== Units ==== | ||
+ | |||
+ | The most important " | ||
+ | and approximately equals two meters in the real world. | ||
+ | |||
+ | Another significant, | ||
+ | It is used to define floor and ceiling slants, and is also a "rule of thumb" | ||
+ | |||
+ | ==== Sectors ==== | ||
+ | |||
+ | The whole engine world is divided into // | ||
+ | defines | ||
+ | * ceiling and floor layout, | ||
+ | * behaviour, and | ||
+ | * the adjoining room for that sector. | ||
===== Angles ===== | ===== Angles ===== | ||
- | {{: | + | {{: |
- | " | + | " |
+ | $2^{15}-1$ | ||
The conversion functions are: | The conversion functions are: | ||
Line 15: | Line 38: | ||
$\varphi_{\mathrm{AU}} = \varphi_{\mathrm{deg}} \cdot 2^{15} / 180 = \varphi_{\mathrm{rad}} \cdot 2^{15} / \pi$ | $\varphi_{\mathrm{AU}} = \varphi_{\mathrm{deg}} \cdot 2^{15} / 180 = \varphi_{\mathrm{rad}} \cdot 2^{15} / \pi$ | ||
+ | ==== YPR Rotation ==== | ||
+ | The engine uses Euler angles to express rotations, and applies them in ZXY order. | ||
+ | |||
+ | |||
+ | ===== Rooms & Portals ===== | ||
+ | |||
+ | The world is divided into so-called //rooms//, which are basically subdivisions of the whole level. | ||
+ | A room may be physically incomplete, i.e. a large physical room may be artificially split into two engine rooms. | ||
+ | Each room is connected to its direct neighbors through // | ||
+ | to determine which room should be rendered and which not. | ||
+ | |||
+ | See https:// |