summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/runarray.in
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/utils/asymptote/runarray.in')
-rw-r--r--Build/source/utils/asymptote/runarray.in31
1 files changed, 31 insertions, 0 deletions
diff --git a/Build/source/utils/asymptote/runarray.in b/Build/source/utils/asymptote/runarray.in
index 61b0f9a485f..894f765df4f 100644
--- a/Build/source/utils/asymptote/runarray.in
+++ b/Build/source/utils/asymptote/runarray.in
@@ -22,6 +22,7 @@ callableReal* => realRealFunction()
#include "triple.h"
#include "path3.h"
#include "Delaunay.h"
+#include "glrender.h"
#ifdef HAVE_LIBFFTW3
#include "fftw++.h"
@@ -1832,3 +1833,33 @@ pair maxratio(triplearray2 *P, pair b)
delete[] A;
return b;
}
+
+realarray *_projection()
+{
+ gl::projection P=gl::camera();
+ array *a=new array(14);
+ size_t k=0;
+ (*a)[k++]=P.orthographic ? 1.0 : 0.0;
+
+ triple camera=P.camera;
+ (*a)[k++]=camera.getx();
+ (*a)[k++]=camera.gety();
+ (*a)[k++]=camera.getz();
+
+ triple up=P.up;
+ (*a)[k++]=up.getx();
+ (*a)[k++]=up.gety();
+ (*a)[k++]=up.getz();
+
+ triple target=P.target;
+ (*a)[k++]=target.getx();
+ (*a)[k++]=target.gety();
+ (*a)[k++]=target.getz();
+
+ (*a)[k++]=P.zoom;
+ (*a)[k++]=P.angle;
+
+ (*a)[k++]=P.viewportshift.getx();
+ (*a)[k++]=P.viewportshift.gety();
+ return a;
+}