Compare commits

..

11 Commits

Author SHA1 Message Date
c7cc86197c Merge branch 'project_tests'
# Conflicts:
#	tests.txt
2025-11-17 15:40:25 +01:00
2f74c66844 Merge branch 'main' into project_tests
-tried to repair
-works with newer c-make versions

# Conflicts:
#	CMakeLists.txt
#	gamecube.cpp
#	gamecube.h
#	tests.cpp
2025-11-17 15:22:17 +01:00
d9abb1cfe9 Merge branch 'main' into project_tests
-tried to repair

# Conflicts:
#	CMakeLists.txt
#	gamecube.cpp
#	gamecube.h
#	tests.cpp
2025-11-17 15:03:57 +01:00
2a4fac44e5 Projektleiter: Dateien ins Hauptverzeichnis verschoben und aktualisiert 2025-11-17 14:56:41 +01:00
b7b87e7258 my own stuff 2025-11-17 14:40:52 +01:00
1e1e8fe93c Add .gitignore for macOS and IDE files 2025-11-04 16:27:36 +01:00
31e26a7a55 Add docs/tests.txt and initial tests.cpp for gamematrix 2025-11-04 16:04:27 +01:00
Iskender Abdullayev
a7ec47ca03 Add completed test plan to docs/tests.txt 2025-11-03 15:37:26 +01:00
88e29a1d3e CMakeLists.txt betriebssystemunabhängig machen 2025-10-29 16:35:15 +00:00
a1aa30a84c CMakeLists.txt aktualisiert 2025-10-20 12:00:17 +00:00
Anja Freudenreich
4c3bec0b4d initiate git repo 2025-10-12 16:59:58 +02:00
5 changed files with 39 additions and 18 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
.DS_Store
.idea/

View File

@ -3,6 +3,9 @@ project(Prog3B)
set(CMAKE_CXX_STANDARD 17)
# WICHTIG: wegen raylib + neuer CMake-Version
set(CMAKE_POLICY_VERSION_MINIMUM 3.5)
include(FetchContent)
FetchContent_Declare(
@ -20,4 +23,14 @@ add_executable(Prog3B
)
target_include_directories(Prog3B PRIVATE .)
target_link_libraries(Prog3B raylib)
target_link_libraries(Prog3B raylib)
# macOS-Frameworks nicht vergessen:
if(APPLE)
target_link_libraries(Prog3B
"-framework Cocoa"
"-framework IOKit"
"-framework CoreVideo"
"-framework OpenGL"
)
endif()

View File

@ -6,7 +6,7 @@ Rolle: Projektleiter
Gesamtdauer: 90 Minuten
Vorgehensmodell: Wasserfall
Datum: 03.11.2025
Teammitglieder: (getBereturntrue)
Teammitglieder: (getBeerreturntrue)
--------------------------------------------------------
Legende:

View File

@ -3,7 +3,7 @@ Projekt: gamematrix (C++ Library)
Rolle: Projektleiter
Datei: requirements.txt
Datum: 03.11.2025
Team: getBereturntrue(3 Personen)
Team: getBeerreturntrue(3 Personen)
========================================================
# ----------------------------

View File

@ -1,22 +1,28 @@
#include <iostream>
#include <cmath>
#include "gamematrix.h"
using namespace Matrix3D;
void test_rotation_z() {
Vec3 v{1,0,0};
auto R = rot3D(90,'z');
Vec3 res = apply(R,v);
std::cout << "Rotate Z 90° -> (" << res.x << "," << res.y << "," << res.z << ")\n";
}
void test_translate() {
Vec3 v{0,0,0};
auto T = translate({1,2,3});
Vec3 res = apply(T,v);
std::cout << "Translate -> (" << res.x << "," << res.y << "," << res.z << ")\n";
bool approx(double a, double b, double eps = 1e-6) {
return std::fabs(a - b) < eps;
}
int main() {
test_rotation_z();
test_translate();
int failed = 0;
// Beispiel-Test: Rotation um Z 90°
std::array<double,3> v = {1,0,0};
auto Rz = rot3D(90, 'z'); // ggf. Namespace anpassen
auto result = apply(Rz, v);
if (!approx(result[0], 0.0) || !approx(result[1], 1.0)) {
std::cout << "Test rot3D(Z,90) failed!\n";
failed++;
}
// Ausgabe
if (failed == 0)
std::cout << "ALL TESTS PASSED ✅\n";
else
std::cout << failed << " TEST(S) FAILED ❌\n";
return failed;
}