summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrodri <rgl@antares-labs.eu>2024-08-26 15:43:21 +0000
committerrodri <rgl@antares-labs.eu>2024-08-26 15:43:21 +0000
commit845764edfe05c69aa2c1adcf6bcf63a72b6d5bf2 (patch)
treec5ddf8a8ee99430aba5d08027388264ac9fa740a
parent7d6a4f26f918097cd7bbaec474ceafa986940eb4 (diff)
download3dee-845764edfe05c69aa2c1adcf6bcf63a72b6d5bf2.tar.gz
3dee-845764edfe05c69aa2c1adcf6bcf63a72b6d5bf2.tar.bz2
3dee-845764edfe05c69aa2c1adcf6bcf63a72b6d5bf2.zip
med: use the correct cube normals.
-rw-r--r--med.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/med.c b/med.c
index e0e83ce..1f5949a 100644
--- a/med.c
+++ b/med.c
@@ -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 */