mirror of
https://git.coom.tech/drummyfish/small3dlib.git
synced 2024-11-23 20:59:58 +01:00
Add todo
This commit is contained in:
parent
81d3264dfd
commit
c0487d4066
3 changed files with 18 additions and 17 deletions
|
@ -3,18 +3,18 @@
|
||||||
|
|
||||||
#define CAR_VERTEX_COUNT 12
|
#define CAR_VERTEX_COUNT 12
|
||||||
const S3L_Unit carVertices[CAR_VERTEX_COUNT * 3] = {
|
const S3L_Unit carVertices[CAR_VERTEX_COUNT * 3] = {
|
||||||
-159, 27, -121, // 0
|
-103, 13, -216, // 0
|
||||||
-119, 205, -88, // 3
|
-63, 191, -184, // 3
|
||||||
-119, 205, 88, // 6
|
-63, 191, -7, // 6
|
||||||
47, 27, -121, // 9
|
103, 13, -216, // 9
|
||||||
7, 205, -88, // 12
|
63, 191, -184, // 12
|
||||||
7, 205, 88, // 15
|
63, 191, -7, // 15
|
||||||
-152, 116, 159, // 18
|
-96, 102, 63, // 18
|
||||||
40, 116, 159, // 21
|
96, 102, 63, // 21
|
||||||
-159, 103, 267, // 24
|
-103, 89, 172, // 24
|
||||||
-144, 27, 267, // 27
|
-88, 13, 172, // 27
|
||||||
32, 27, 267, // 30
|
88, 13, 172, // 30
|
||||||
47, 103, 267 // 33
|
103, 89, 172 // 33
|
||||||
}; // carVertices
|
}; // carVertices
|
||||||
|
|
||||||
#define CAR_TRIANGLE_COUNT 18
|
#define CAR_TRIANGLE_COUNT 18
|
||||||
|
|
|
@ -224,10 +224,12 @@ int main()
|
||||||
}
|
}
|
||||||
|
|
||||||
scene.camera.transform.translation.x = scene.models[1].transform.translation.x - carDirection.x;
|
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.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_RenderClear(renderer);
|
||||||
SDL_RenderCopy(renderer,textureSDL,NULL,NULL);
|
SDL_RenderCopy(renderer,textureSDL,NULL,NULL);
|
||||||
|
|
5
todo.txt
5
todo.txt
|
@ -72,9 +72,8 @@ features:
|
||||||
|
|
||||||
bugs:
|
bugs:
|
||||||
|
|
||||||
- Barycentric coodinates can get wrong in these ways:
|
- Long triangle interpolation overflows -- e.g. in the city demo, can be seen
|
||||||
- Any of them can exceed the range <0,511>
|
a lot at the blue skyscraper.
|
||||||
- b0 + b1 can be > 511, which causes b2 (= 511 - b0 - b1) to be negative!
|
|
||||||
|
|
||||||
repeated:
|
repeated:
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue