improved some code

This commit is contained in:
2024-12-08 05:19:49 +03:00
parent 4b50ac8c1d
commit ecdd9ecdd6
13 changed files with 106 additions and 67 deletions

View File

@@ -11,8 +11,8 @@
TEST(UnitTestProjection, Projection)
{
auto x = omath::Angle<float, 0.f, 180.f, omath::AngleFlags::Clamped>::FromDegrees(90.f);
auto cam = omath::source::Camera({-10, 0, 0}, omath::source::ViewAngles{}, {1920.f, 1080.f}, x, 0.1f, 1000.f);
auto cam = omath::source::Camera({0, 0, 0}, omath::source::ViewAngles{}, {1920.f, 1080.f}, x, 0.01f, 1000.f);
const auto projected = cam.WorldToScreen({10, 0, 0});
const auto projected = cam.WorldToScreen(cam.GetViewProjectionMatrix(), {1000, 0, 50});
std::print("{} {} {}", projected->x, projected->y, projected->z);
}