summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrodri <rgl@antares-labs.eu>2024-08-17 12:45:25 +0000
committerrodri <rgl@antares-labs.eu>2024-08-17 12:45:25 +0000
commit7a07b2c636e42a95920ff5a4edfef4b9c3fbd729 (patch)
tree5f5eadffaf455f6110d57aee6f7b790bbddc8486
parent4605adef59010fa2ed74b862e8169baf73680bf4 (diff)
download3dee-7a07b2c636e42a95920ff5a4edfef4b9c3fbd729.tar.gz
3dee-7a07b2c636e42a95920ff5a4edfef4b9c3fbd729.tar.bz2
3dee-7a07b2c636e42a95920ff5a4edfef4b9c3fbd729.zip
use the new light types constants.
-rw-r--r--med.c2
-rw-r--r--vis.c14
2 files changed, 12 insertions, 4 deletions
diff --git a/med.c b/med.c
index 4ba9d30..25dccec 100644
--- a/med.c
+++ b/med.c
@@ -802,7 +802,7 @@ threadmain(int argc, char *argv[])
placecamera(cam, scene, camcfg.p, camcfg.lookat, camcfg.up);
light.p = Pt3(0,100,100,1);
light.c = Pt3(1,1,1,1);
- light.type = LIGHT_POINT;
+ light.type = LightPoint;
tsampler = neartexsampler;
kctl = emalloc(sizeof *kctl);
diff --git a/vis.c b/vis.c
index e43ac08..c9d674e 100644
--- a/vis.c
+++ b/vis.c
@@ -733,6 +733,13 @@ rmb(void)
for(idx = 0; idx < nelem(cams); idx++)
memset(&cams[idx]->stats, 0, sizeof(cams[idx]->stats));
}
+// if(om.buttons == mctl->buttons){
+// Point p;
+//
+// p = subpt(mctl->xy, om.xy);
+// maincam->view->p.x += p.x;
+// maincam->view->p.y += p.y;
+// }
unlockdisplay(display);
nbsend(drawc, nil);
}
@@ -1023,7 +1030,8 @@ fprint(2, "screen %R\n", screenb->r);
else
cams[i] = Cam(Rect(0,0,fbw,fbh), rctl,
camcfgs[i].ptype, camcfgs[i].fov, camcfgs[i].clipn, camcfgs[i].clipf);
-
+ if(cams[i] == nil)
+ sysfatal("Cam: %r");
placecamera(cams[i], scene, camcfgs[i].p, camcfgs[i].lookat, camcfgs[i].up);
cams[i]->view->setscale(cams[i]->view, scale, scale);
@@ -1039,8 +1047,8 @@ fprint(2, "cam%d off %v scalex %g scaley %g\n", i+1, cams[i]->view->p, cams[i]->
light.p = Pt3(0,100,100,1);
// light.dir = Vec3(0,-1,0);
light.c = Pt3(1,1,1,1);
- light.type = LIGHT_POINT;
-// light.type = LIGHT_SPOT;
+ light.type = LightPoint;
+// light.type = LightSpot;
// light.θu = 30*DEG;
// light.θp = 5*DEG;
tsampler = neartexsampler;