Establishing the Transformation Library
This weekend’s development on the helios engine centered on finalizing transformation logic within helios.math.
The transformation functions translate, rotate, scale were implemented within helios.math.transform. A key decision was to standardize on post-multiplication (M’ = M * T) for all transformations, to provide parity with glm: This convention ensures that new transformations are applied in the local space of a model matrix M.
Implementation Notes: constexpr and Performance
To maximize performance and enable compile-time computation, all transformation functions were designed as constexpr operations. The notable exception is rotate(), which depends on trigonometric functions (sin, cos) and vector normalization (sqrt), none of which are constexpr in the standard library. Future work may include implementing constexpr variants of these mathematical primitives, depending on how benchmarks fare in specific rendering scenarios.
The translate and scale functions were implemented as direct, element-wise modifications of the input matrix, avoiding the creation of temporary matrices. This optimized approach is mathematically equivalent to the full matrix multiplication but results in more efficient code.
On to the rendering pipeline!
helios
helios is a custom game framework built from first principles, written in C++.
| Status | Prototype |
| Category | Tool |
| Author | GarageCraft Games |
| Tags | cpp, eductational, engine, gamedev, linearalgebra, programming, software-architecture |
More posts
- helios: Design and prototypical implementation of a C++ game framework1 day ago
- Just make it exist first!23 days ago
- Onwards to the rendering model44 days ago
- Event Queue and Application Controllers50 days ago
- From Camera- to Clip-Space, to NDCs and z-Fighting55 days ago
- Updates to main()58 days ago
- The Great Modular Restructuring59 days ago
- Layer Abstraction initiated64 days ago
- inb4 Clip Space66 days ago
- Model Matrix: Rotations70 days ago
Leave a comment
Log in with itch.io to leave a comment.