mirror of
https://github.com/orange-cpp/omath.git
synced 2026-02-13 15:03:27 +00:00
patch
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
//
|
||||
// Created by Vlad on 27.08.2024.
|
||||
//
|
||||
#include <complex>
|
||||
#include <gtest/gtest.h>
|
||||
#include <omath/Matrix.h>
|
||||
#include <print>
|
||||
@@ -8,8 +9,10 @@
|
||||
|
||||
TEST(UnitTestProjection, IsPointOnScreen)
|
||||
{
|
||||
const omath::projection::Camera camera({}, {90, 0.f, 0.f} , {1920.f, 1080.f, 0.f}, 120, 10, 100);
|
||||
const omath::projection::Camera camera({0, 0, 0}, {0, 0.f, 0.f} , {1920.f, 1080.f, 0.f}, 110, 0.1, 500);
|
||||
|
||||
const auto proj = camera.WorldToScreen({0, 0, 20});
|
||||
const auto proj = camera.WorldToScreen({5, 0, 0});
|
||||
if (proj)
|
||||
std::print("{} {} {}", proj->x, proj->z, proj->y);
|
||||
EXPECT_TRUE(proj.has_value());
|
||||
}
|
||||
Reference in New Issue
Block a user