summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/drawsurface.cc
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-04-03 22:35:04 +0000
committerKarl Berry <karl@freefriends.org>2018-04-03 22:35:04 +0000
commit36b8d1341af4a7ab1f5759d75ad1eecfc375c1f4 (patch)
tree12d09b686d2c18f245dc6fd492c09cdcd4c02ebc /Build/source/utils/asymptote/drawsurface.cc
parentd73e029b665b866fe734e44508746a2cba513fd7 (diff)
asy 2.42 sources
git-svn-id: svn://tug.org/texlive/trunk@47274 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/drawsurface.cc')
-rw-r--r--Build/source/utils/asymptote/drawsurface.cc40
1 files changed, 32 insertions, 8 deletions
diff --git a/Build/source/utils/asymptote/drawsurface.cc b/Build/source/utils/asymptote/drawsurface.cc
index 60388dd27dd..ac82cfc9a5e 100644
--- a/Build/source/utils/asymptote/drawsurface.cc
+++ b/Build/source/utils/asymptote/drawsurface.cc
@@ -17,7 +17,9 @@ namespace camp {
const triple drawElement::zero;
-double T[3]; // z-component of current transform
+//double Tx[3]; // x-component of current transform
+//double Ty[3]; // y-component of current transform
+double Tz[3]; // z-component of current transform
using vm::array;
@@ -65,7 +67,7 @@ void setcolors(bool colors, bool lighton,
if(!colors && (diffuse != lastdiffuse || ambient != lastambient ||
emissive != lastemissive || specular != lastspecular ||
shininess != lastshininess)) {
- drawBezierPatch::S.draw();
+ drawBezierPatch::S.draw();
lastdiffuse=diffuse;
lastambient=ambient;
lastemissive=emissive;
@@ -278,9 +280,20 @@ void drawBezierPatch::render(GLUnurbs *nurb, double size2,
glGetDoublev(GL_MODELVIEW_MATRIX,t);
// Like Fortran, OpenGL uses transposed (column-major) format!
run::transpose(t,4);
- T[0]=t[8];
- T[1]=t[9];
- T[2]=t[10];
+/*
+ Tx[0]=t[0];
+ Tx[1]=t[1];
+ Tx[2]=t[2];
+
+ Ty[0]=t[4];
+ Ty[1]=t[5];
+ Ty[2]=t[6];
+*/
+
+ Tz[0]=t[8];
+ Tz[1]=t[9];
+ Tz[2]=t[10];
+
run::inverse(t,4);
bbox3 box(m,M);
box.transform(t);
@@ -505,9 +518,20 @@ void drawBezierTriangle::render(GLUnurbs *nurb, double size2,
glGetDoublev(GL_MODELVIEW_MATRIX,t);
// Like Fortran, OpenGL uses transposed (column-major) format!
run::transpose(t,4);
- T[0]=t[8];
- T[1]=t[9];
- T[2]=t[10];
+/*
+ Tx[0]=t[0];
+ Tx[1]=t[1];
+ Tx[2]=t[2];
+
+ Ty[0]=t[4];
+ Ty[1]=t[5];
+ Ty[2]=t[6];
+*/
+
+ Tz[0]=t[8];
+ Tz[1]=t[9];
+ Tz[2]=t[10];
+
run::inverse(t,4);
bbox3 box(m,M);
box.transform(t);