From c0487d4066771268ebf39c55d444e58f651aa0e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20=C4=8C=C3=AD=C5=BE?= Date: Tue, 18 Jun 2019 23:17:37 +0200 Subject: [PATCH] Add todo --- programs/carModel.h | 24 ++++++++++++------------ programs/city.c | 6 ++++-- todo.txt | 5 ++--- 3 files changed, 18 insertions(+), 17 deletions(-) diff --git a/programs/carModel.h b/programs/carModel.h index ff22d9b..f77b6be 100644 --- a/programs/carModel.h +++ b/programs/carModel.h @@ -3,18 +3,18 @@ #define CAR_VERTEX_COUNT 12 const S3L_Unit carVertices[CAR_VERTEX_COUNT * 3] = { - -159, 27, -121, // 0 - -119, 205, -88, // 3 - -119, 205, 88, // 6 - 47, 27, -121, // 9 - 7, 205, -88, // 12 - 7, 205, 88, // 15 - -152, 116, 159, // 18 - 40, 116, 159, // 21 - -159, 103, 267, // 24 - -144, 27, 267, // 27 - 32, 27, 267, // 30 - 47, 103, 267 // 33 + -103, 13, -216, // 0 + -63, 191, -184, // 3 + -63, 191, -7, // 6 + 103, 13, -216, // 9 + 63, 191, -184, // 12 + 63, 191, -7, // 15 + -96, 102, 63, // 18 + 96, 102, 63, // 21 + -103, 89, 172, // 24 + -88, 13, 172, // 27 + 88, 13, 172, // 30 + 103, 89, 172 // 33 }; // carVertices #define CAR_TRIANGLE_COUNT 18 diff --git a/programs/city.c b/programs/city.c index 4518953..9cacaab 100644 --- a/programs/city.c +++ b/programs/city.c @@ -224,10 +224,12 @@ int main() } scene.camera.transform.translation.x = scene.models[1].transform.translation.x - carDirection.x; - scene.camera.transform.translation.y = S3L_FRACTIONS_PER_UNIT; + scene.camera.transform.translation.y = S3L_FRACTIONS_PER_UNIT / 2; scene.camera.transform.translation.z = scene.models[1].transform.translation.z - carDirection.z; - scene.camera.transform.rotation.y = scene.models[1].transform.rotation.y; + S3L_lookAt(scene.models[1].transform.translation,&(scene.camera.transform)); + + scene.camera.transform.translation.y = S3L_FRACTIONS_PER_UNIT; SDL_RenderClear(renderer); SDL_RenderCopy(renderer,textureSDL,NULL,NULL); diff --git a/todo.txt b/todo.txt index f1f2e79..4b5b889 100644 --- a/todo.txt +++ b/todo.txt @@ -72,9 +72,8 @@ features: bugs: -- Barycentric coodinates can get wrong in these ways: - - Any of them can exceed the range <0,511> - - b0 + b1 can be > 511, which causes b2 (= 511 - b0 - b1) to be negative! +- Long triangle interpolation overflows -- e.g. in the city demo, can be seen + a lot at the blue skyscraper. repeated: