shithub: 3dee

Download patch

ref: 8ee6eca01b653764ce62accdf6c86dc1987fea02
parent: c46b7a3e97390bbe8803afbb70b307362f9123f0
author: rodri <rgl@antares-labs.eu>
date: Thu May 16 05:37:08 EDT 2024

add a triangular basis and clamp the fov to [1,180]°.

--- /dev/null
+++ b/mdl/tribasis.obj
@@ -1,0 +1,11 @@
+mtllib basis.mtl
+v 0 0 0
+v 1 0 0
+v 0 1 0
+v 0 0 1
+usemtl x
+f 1 2 3
+usemtl y
+f 1 3 4
+usemtl z
+f 1 4 2
--- a/vis.c
+++ b/vis.c
@@ -429,7 +429,7 @@
 void
 zoomin(void)
 {
-	maincam->fov = fclamp(maincam->fov - 1*DEG, 1*DEG, 359*DEG);
+	maincam->fov = fclamp(maincam->fov - 1*DEG, 1*DEG, 180*DEG);
 	reloadcamera(maincam);
 }
 
@@ -436,7 +436,7 @@
 void
 zoomout(void)
 {
-	maincam->fov = fclamp(maincam->fov + 1*DEG, 1*DEG, 359*DEG);
+	maincam->fov = fclamp(maincam->fov + 1*DEG, 1*DEG, 180*DEG);
 	reloadcamera(maincam);
 }