diff options
author | rodri <rgl@antares-labs.eu> | 2024-08-26 15:43:21 +0000 |
---|---|---|
committer | rodri <rgl@antares-labs.eu> | 2024-08-26 15:43:21 +0000 |
commit | 845764edfe05c69aa2c1adcf6bcf63a72b6d5bf2 (patch) | |
tree | c5ddf8a8ee99430aba5d08027388264ac9fa740a | |
parent | 7d6a4f26f918097cd7bbaec474ceafa986940eb4 (diff) | |
download | 3dee-845764edfe05c69aa2c1adcf6bcf63a72b6d5bf2.tar.gz 3dee-845764edfe05c69aa2c1adcf6bcf63a72b6d5bf2.tar.bz2 3dee-845764edfe05c69aa2c1adcf6bcf63a72b6d5bf2.zip |
med: use the correct cube normals.
-rw-r--r-- | med.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -190,16 +190,13 @@ addcube(void) v1 = Vec3(1,0,0); v2 = Vec3(0,1,0); t[0].v[0].p = addpt3(center, p); - t[0].v[0].n = p; + t[0].v[0].n = t[0].v[1].n = t[0].v[2].n = t[1].v[2].n = Vec3(0,0,1); t[0].v[1].p = addpt3(center, addpt3(p, v1)); - t[0].v[1].n = addpt3(p, v1); t[0].v[2].p = addpt3(center, addpt3(p, addpt3(v1, v2))); - t[0].v[2].n = addpt3(p, addpt3(v1, v2)); t[0].v[0].c = t[0].v[1].c = t[0].v[2].c = Pt3(1,1,1,1); t[1].v[0] = t[0].v[0]; t[1].v[1] = t[0].v[2]; t[1].v[2].p = addpt3(center, addpt3(p, v2)); - t[1].v[2].n = addpt3(p, v2); t[1].v[2].c = Pt3(1,1,1,1); /* make a cube by rotating the reference face */ |