Compare commits
No commits in common. "main" and "architect" have entirely different histories.
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +0,0 @@
|
||||
.DS_Store
|
||||
.idea/
|
||||
@ -3,9 +3,6 @@ project(Prog3B)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
# WICHTIG: wegen raylib + neuer CMake-Version
|
||||
set(CMAKE_POLICY_VERSION_MINIMUM 3.5)
|
||||
|
||||
include(FetchContent)
|
||||
|
||||
FetchContent_Declare(
|
||||
@ -23,14 +20,4 @@ add_executable(Prog3B
|
||||
)
|
||||
|
||||
target_include_directories(Prog3B PRIVATE .)
|
||||
target_link_libraries(Prog3B raylib)
|
||||
|
||||
# macOS-Frameworks nicht vergessen:
|
||||
if(APPLE)
|
||||
target_link_libraries(Prog3B
|
||||
"-framework Cocoa"
|
||||
"-framework IOKit"
|
||||
"-framework CoreVideo"
|
||||
"-framework OpenGL"
|
||||
)
|
||||
endif()
|
||||
target_link_libraries(Prog3B raylib)
|
||||
@ -14,7 +14,7 @@ void gamecube::Update(float flipSpeed)
|
||||
flippingForward = false;
|
||||
flipped = true;
|
||||
}
|
||||
}// test
|
||||
}
|
||||
else if (flippingBackward)
|
||||
{
|
||||
rotation -= flipSpeed;
|
||||
|
||||
66
gantt
66
gantt
@ -1,66 +0,0 @@
|
||||
========================================================
|
||||
GANTT-CHART – Projekt gamematrix (C++ Library)
|
||||
Rolle: Projektleiter
|
||||
========================================================
|
||||
|
||||
Gesamtdauer: 90 Minuten
|
||||
Vorgehensmodell: Wasserfall
|
||||
Datum: 03.11.2025
|
||||
Teammitglieder: (getBeerreturntrue)
|
||||
|
||||
--------------------------------------------------------
|
||||
Legende:
|
||||
█ = aktive Arbeitszeit
|
||||
░ = Unterstützung / Wartezeit / Review
|
||||
--------------------------------------------------------
|
||||
|
||||
Zeit: 0 10 20 30 40 50 60 70 80 90
|
||||
|----|----|----|----|----|----|----|----|----|
|
||||
|
||||
--------------------------------------------------------
|
||||
1. ANFORDERUNGSANALYSE (0–10 min)
|
||||
--------------------------------------------------------
|
||||
Projektleiter ██████████
|
||||
Architekt ████░░░░░░
|
||||
Entwickler ░░░░░░░░░░
|
||||
Tester ███░░░░░░░
|
||||
|
||||
--------------------------------------------------------
|
||||
2. DESIGN / ENTWURF (10–20 min)
|
||||
--------------------------------------------------------
|
||||
Architekt ████████████
|
||||
Projektleiter ███░░░░░░░░░
|
||||
Entwickler ░░░░░░░░░░░░
|
||||
Tester ███░░░░░░░░░
|
||||
|
||||
--------------------------------------------------------
|
||||
3. IMPLEMENTIERUNG (20–50 min)
|
||||
--------------------------------------------------------
|
||||
Entwickler ████████████████████████
|
||||
Projektleiter ███░░░░░░░░░░░░░░░░░░░░
|
||||
Architekt ░░░░░░░░░░░░░░░░░░░░░░░
|
||||
Tester ██░░░░░░░░░░░░░░░░░░░░░
|
||||
|
||||
--------------------------------------------------------
|
||||
4. TESTEN & VALIDIERUNG (50–70 min)
|
||||
--------------------------------------------------------
|
||||
Tester ███████████████
|
||||
Entwickler ███░░░░░░░░░░░░
|
||||
Projektleiter ██░░░░░░░░░░░░░
|
||||
Architekt ░░░░░░░░░░░░░░
|
||||
|
||||
--------------------------------------------------------
|
||||
5. ABSCHLUSS / DOKUMENTATION (70–90 min)
|
||||
--------------------------------------------------------
|
||||
Projektleiter ██████████████
|
||||
Architekt ██░░░░░░░░░░░░
|
||||
Entwickler ██░░░░░░░░░░░░
|
||||
Tester ██░░░░░░░░░░░░
|
||||
|
||||
--------------------------------------------------------
|
||||
Ergebnisse:
|
||||
- Anforderungen abgeschlossen
|
||||
- Design & Architektur dokumentiert
|
||||
- Funktionen implementiert und getestet
|
||||
- Merge & Abschlussdokumentation fertig
|
||||
========================================================
|
||||
@ -1,59 +0,0 @@
|
||||
========================================================
|
||||
Projekt: gamematrix (C++ Library)
|
||||
Rolle: Projektleiter
|
||||
Datei: requirements.txt
|
||||
Datum: 03.11.2025
|
||||
Team: getBeerreturntrue(3 Personen)
|
||||
========================================================
|
||||
|
||||
# ----------------------------
|
||||
# 1. Projektziel
|
||||
# ----------------------------
|
||||
Ziel: Entwicklung einer C++-Bibliothek für 3D-Transformationen (4x4-Matrizen)
|
||||
zur späteren Nutzung über pybind11 in Python sowie Integration in das
|
||||
bestehende Spielprojekt. Bereitstellung von Funktionen für Translation,
|
||||
Rotation und Matrixmultiplikation im 3D-Raum.
|
||||
|
||||
# ----------------------------
|
||||
# 2. Funktionale Anforderungen
|
||||
# ----------------------------
|
||||
|
||||
| Funktion | Eingabe | Ausgabe | Kurzbeschreibung |
|
||||
|---------------|------------------------------------|-----------------------|----------------------------------------|
|
||||
| matmul | 4x4 Matrix A, 4x4 Matrix B | 4x4 Matrix | Multiplikation zweier 4x4 Matrizen |
|
||||
| translate | 3D Vektor (x,y,z) | 4x4 Matrix | Erzeugt Translationsmatrix |
|
||||
| rot3D | Winkel in °, Rotationsachse (x/y/z)| 4x4 Matrix | Rotationsmatrix um Achse |
|
||||
| identity | --- | 4x4 Matrix | Identitätsmatrix zurückgeben |
|
||||
| apply | Matrix, Vec3 | Vec3 | Vektor mit Transformationsmatrix transformieren |
|
||||
|
||||
# ----------------------------
|
||||
# 3. Nicht-funktionale Anforderungen
|
||||
# ----------------------------
|
||||
|
||||
- Lesbarkeit & Wartbarkeit (klarer Namespace, Header-Trennung)
|
||||
- Ausführung in Echtzeit-Spielumgebung (gute Performance)
|
||||
- Kompatibilität mit pybind11
|
||||
- Keine dynamische Speicherallokation innerhalb der Matrixoperationen
|
||||
|
||||
# ----------------------------
|
||||
# 4. Annahmen / Einschränkungen
|
||||
# ----------------------------
|
||||
|
||||
- Alle Matrizen im homogenen Format 4x4
|
||||
- Winkelangabe in Grad
|
||||
- Datentyp double
|
||||
- Koordinatensystem: Rechtshändig
|
||||
|
||||
# ----------------------------
|
||||
# 5. Abnahmekriterien
|
||||
# ----------------------------
|
||||
|
||||
- Beispiel-Transformationen funktionieren korrekt
|
||||
- Unit-Tests für alle Funktionen bestehen
|
||||
- Vergleich mit bekannten Resultaten (z. B. 90°-Rotation)
|
||||
- Bibliothek lässt sich erfolgreich in Python binden
|
||||
|
||||
========================================================
|
||||
Hinweis:
|
||||
Diese Datei wird vom Projektleiter gepflegt.
|
||||
========================================================
|
||||
36
tests.cpp
36
tests.cpp
@ -1,28 +1,22 @@
|
||||
#include <iostream>
|
||||
#include <cmath>
|
||||
#include "gamematrix.h"
|
||||
using namespace Matrix3D;
|
||||
|
||||
bool approx(double a, double b, double eps = 1e-6) {
|
||||
return std::fabs(a - b) < eps;
|
||||
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";
|
||||
}
|
||||
|
||||
int main() {
|
||||
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;
|
||||
test_rotation_z();
|
||||
test_translate();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user