préparation phase 1.1

This commit is contained in:
Jérôme Bousquié
2026-08-01 21:25:43 +02:00
parent 37432536dc
commit 895965750f
9 changed files with 168 additions and 3 deletions
+3 -3
View File
@@ -19,16 +19,16 @@ generated: { by: human:jerome, at: 2026-07-31T00:00:00Z }
**Objectif** : Afficher un cube (ou autre mesh) 3D avec un éclairage Phong basique.
### 1.1 Dépendances & Mathématiques
- [ ] Ajouter `glam = "0.29"` en dépendance (`lib/Cargo.toml`)
- [ ] Ajouter `glam = "0.33"` en dépendance (`lib/Cargo.toml`)
- [ ] Ajouter `slotmap = "1.0"` en dépendance
- [ ] Créer module `math/` (ou `transform.rs`) :
- [ ] Struct `Transform { translation: Vec3, rotation: Quat, scale: Vec3 }`
- [ ] Méthode `to_matrix() -> Mat4` pour calculer la matrice locale
- [ ] Struct `Camera { position: Vec3, target: Vec3, up: Vec3 }`
- [ ] Struct `Camera { position: Vec3, target: Vec3, up: Vec3 }` : resources/camera.rs
- [ ] Fonctions `view_matrix()` et `projection_matrix(fov, aspect, near, far)`
### 1.2 Geometry & Mesh
- [ ] Créer struct `Geometry` :
- [ ] Créer struct `Geometry` (math/geometry.rs) :
- [ ] `positions: Vec<[f32; 3]>` (obligatoire)
- [ ] `indices: Option<Vec<u16>>` (optionnel)
- [ ] `normals: Option<Vec<[f32; 3]>>` (pour Phong)