Commit Graph

60 Commits

Author SHA1 Message Date
b48160e1b7 Improves screen to world conversion accuracy
Adds support for different screen origin configurations.

This change allows for more accurate conversion from screen coordinates to world coordinates by correctly handling different screen origin positions (top-left and bottom-left). Includes new unit tests to verify the functionality with both configurations.
2025-11-08 13:51:56 +03:00
88b709f531 deleted not needed header 2025-10-23 00:49:54 +03:00
a7eacb529e updated comments 2025-10-23 00:48:54 +03:00
570c035f27 added second method of w2s 2025-10-21 04:38:43 +03:00
5657282577 Fixes incorrect NDC calculation and updates formulas
Corrects the NDC calculation in `world_to_screen` to improve accuracy.
Replaces custom perspective projection matrix calculation with `omath::mat_perspective_right_handed` for correctness and consistency.
Updates test cases and provides debugging information by printing view and projection matrices.
Addresses an issue in the feature/ndc_invalid_calc_fix branch.
2025-10-21 04:38:43 +03:00
1ef7833bd9 reordored omath headers 2025-10-03 13:51:53 +03:00
5539bbad0d reverted 2025-09-20 15:46:21 +03:00
792db7a673 added new mat function
more tests
2025-09-20 15:44:33 +03:00
7fef690f5e fixed iw engine
fixed source

revert
2025-09-20 15:44:33 +03:00
29a96d64bb Adds 2D screen to world conversion
Adds an overload for screen_to_world that accepts a 2D screen position.

Renames screen_to_dnc to screen_to_ndc for clarity.
2025-09-14 04:48:56 +03:00
418b7c0e7e Fixes float type conversion in world_to_screen
Fixes a potential type conversion issue by explicitly casting the x-coordinate to float in the world_to_screen test. This prevents possible compiler warnings and ensures the intended behavior.
2025-09-09 02:13:45 +03:00
de61f7a5d8 Adds screen to world space conversion
Adds functionality to convert screen coordinates to world space, including handling for cases where the inverse view projection matrix is singular or when the world position is out of screen bounds.

Also exposes Camera class to unit tests.
2025-09-09 01:31:23 +03:00
d74c66990a Refactors: Moves linear algebra to new directory
Moves linear algebra headers to a new subdirectory to improve project structure.

Updates includes to reflect the directory change.
Adds vcpkg to the tracked repositories.
2025-08-31 23:36:05 +03:00
687772f073 feat(omath): Add NDC to screen position coordinate diagram 2025-08-12 09:29:14 +03:00
0bd9eda48f Introduces CameraEngine concept
Adds a concept `CameraEngineConcept` to ensure that camera
engine implementations provide the necessary functions
with the correct signatures and `noexcept` specifications.

This enables compile-time checks for valid camera engine
implementations, improving code reliability and preventing
runtime errors.
2025-08-12 09:13:02 +03:00
15c055beb7 Removes virtual destructor from Camera
Removes the virtual destructor from the Camera class as it is not required,
as the class does not act as a base class. This simplifies the class
definition and avoids potential vtable overhead.
2025-08-11 01:43:22 +03:00
d96b0cd2f7 Marks Camera class as final
Prevents inheritance from the Camera class.
2025-08-11 01:18:39 +03:00
17b150499d Refactors camera and prediction engine traits.
Moves camera and prediction engine implementations into traits for each engine,
decoupling the engine-specific logic from the core classes, promoting code reuse
and maintainability. This change allows for easier addition of new engines and
customization of existing ones.
2025-08-11 00:32:09 +03:00
50ddf2d31e added more noexcept 2025-05-05 01:46:50 +03:00
a6e4c0461d added noexcept 2025-05-05 01:16:12 +03:00
b5e788385d fixed style 2025-05-03 20:38:58 +03:00
df6d75e554 changed code style 2025-05-03 20:31:59 +03:00
d7f1f49165 resetting state 2025-04-25 23:52:10 +03:00
d9219cdddb naming fixed 2025-03-23 01:02:11 +03:00
74f2241bcf uncommented test 2025-03-23 00:52:12 +03:00
481d7b85df improved camera 2025-03-22 17:39:40 +03:00
4f037a1952 added unity engine tests 2025-03-22 08:12:16 +03:00
5acd166d8f fixed include names 2025-03-21 04:40:59 +03:00
2688d977a9 change 2025-03-21 04:21:31 +03:00
Vladislav Alpatov
b9ac44a901 renamed headers 2025-03-21 04:17:42 +03:00
4200ef63a6 improved mat & camera interface 2025-03-15 18:53:18 +03:00
Vladislav Alpatov
6d0d267743 now template 2025-03-01 21:11:46 +03:00
d0c532df39 hot fix 2025-01-06 05:36:27 +03:00
931937d010 added open gl stuff 2024-12-23 17:53:47 +03:00
af880be056 added methods 2024-12-23 15:34:38 +03:00
409cd18de6 dropped .dll/.so support 2024-12-23 13:47:28 +03:00
さくらみこ
58fb6a0304 clean 2024-12-17 08:40:48 +03:00
さくらみこ
193e87847a fixup 2024-12-17 07:24:44 +03:00
Saikari
075c553521 Export 2024-12-17 04:55:13 +03:00
ecdd9ecdd6 improved some code 2024-12-08 05:19:49 +03:00
4b50ac8c1d optimized view proj matrix generation 2024-12-04 16:04:41 +03:00
0afa20b4e5 refactored camera 2024-12-04 04:58:29 +03:00
9c0285e353 added check, removed deprecated code 2024-12-02 10:57:47 +03:00
5473515ffd refactored some stuff 2024-12-01 14:06:52 +03:00
339dbade7e patch 2024-12-01 04:10:25 +03:00
46b4eb9151 huge improvement 2024-12-01 03:51:40 +03:00
6a9a51b39c refactored tests 2024-11-27 19:36:28 +03:00
103c3d38e4 moving from .h to .hpp to make thing more clear 2024-10-20 08:36:19 -07:00
ef24377049 fixed some stuff added constexpr 2024-10-20 00:25:03 +03:00
3e6cabb6c7 fixed projection matrix 2024-10-18 17:20:23 +03:00