Skip to content

Commit 5875ebb

Browse files
authored
Close #1701 : SURFACE obeys multiplot position when T3D is not enabled. (#1798)
OK for me. At least for some basics tests. Thanks @GillesDuvert
1 parent e1d7f28 commit 5875ebb

File tree

7 files changed

+156
-36
lines changed

7 files changed

+156
-36
lines changed

src/gdlgstream.cpp

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1398,7 +1398,24 @@ void GDLGStream::getSubpageRegion(PLFLT *sxmin, PLFLT *symin, PLFLT *sxmax, PLFL
13981398
*szmax=*szmin+profund;
13991399
}
14001400
}
1401-
//get region (3BPP data)
1401+
1402+
void GDLGStream::getCurrentSubpageInfo(PLFLT &xratio, PLFLT &yratio, PLFLT &zratio, PLFLT* displacement) {
1403+
int p=thePage.curPage-1;
1404+
int nx = thePage.nx;
1405+
int ny = thePage.ny;
1406+
xratio=1.0/thePage.nx;
1407+
yratio=1.0/thePage.ny;
1408+
zratio=1.0/thePage.nz;
1409+
int k= p / (thePage.nx*thePage.ny);
1410+
int l= p - k*(thePage.nx*thePage.ny);
1411+
int j= l /thePage.nx ;
1412+
int i= (l - j*thePage.nx);
1413+
displacement[0]=i*xratio;
1414+
displacement[1]=1-yratio-j*yratio;
1415+
displacement[2]=k*zratio;
1416+
}
1417+
1418+
//get region (3BPP data)
14021419

14031420
bool GDLGStream::GetRegion(DLong& xoff, DLong& yoff, DLong& nx, DLong& ny) {
14041421
long nxOrig,nyOrig;

src/gdlgstream.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,7 @@ class GDLGStream: public plstream
640640
void ssub( PLINT nx, PLINT ny, PLINT nz=1);
641641
void adv(PLINT page);
642642
void getSubpageRegion(PLFLT *sxmin, PLFLT *symin, PLFLT *sxmax, PLFLT *symax, PLFLT *zmin=NULL, PLFLT *zmax=NULL);
643+
void getCurrentSubpageInfo(PLFLT &xratio, PLFLT &yratio, PLFLT &zratio, PLFLT* displacement);
643644
void SetPageDPMM(float setPsCharFudge=1.0, float setPsSymFudge=1.0);
644645
void syncPageInfo();
645646
void updateBoxDeviceCoords();

src/plotting.cpp

Lines changed: 42 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3976,24 +3976,55 @@ void SelfNormLonLat(DDoubleGDL *lonlat) {
39763976
gdlAxis(e, a, YAXIS, yStart, yEnd, yLog);
39773977
}
39783978

3979-
void gdlBox3(EnvT *e, GDLGStream *a, DDouble xStart, DDouble xEnd, bool xLog, DDouble yStart, DDouble yEnd, bool yLog, DDouble zStart, DDouble zEnd, bool zLog, DDouble zValue) {
3979+
void gdlBox3(EnvT *e, GDLGStream *a, DDouble xStart, DDouble xEnd, bool xLog, DDouble yStart, DDouble yEnd, bool yLog, DDouble zStart, DDouble zEnd, bool zLog, DDouble zValue, bool zAxis, DLong zaxis_value) {
39803980
gdlAxis(e, a, XAXIS, xStart, xEnd, xLog, 1); //only Bottom
39813981
gdlAxis(e, a, YAXIS, yStart, yEnd, yLog, 1); //only left
3982-
3982+
39833983
PLFLT xnormmin, xnormmax, ynormmin, ynormmax, znormmin = 0, znormmax = 1;
39843984
a->getCurrentNormBox(xnormmin, xnormmax, ynormmin, ynormmax);
39853985
gdlGetCurrentAxisWindow(ZAXIS, znormmin, znormmax);
39863986

39873987
//almost cut and paste of plotting_axis section on Z axis:
3988-
PLFLT yPos = ynormmax;
3989-
PLFLT xPos = xnormmin;
3990-
PLFLT viewportXSize = xnormmax - xPos;
3991-
if (viewportXSize < 0.001) viewportXSize = 0.01;
3992-
a->vpor(xPos, xPos + viewportXSize, znormmin, znormmax);
3993-
//special transform to use 'y' axis code, but with 'z' values and yz exch.
3994-
gdlSetZto3DDriverTransform(a, yPos);
3995-
gdlExchange3DDriverTransform(a);
3996-
gdlAxis(e, a, ZAXIS, zStart, zEnd, zLog, 1);
3988+
if (zAxis) { //no use drawing something unseen, but IDL does, and wee need values if ztick_get is asked for!!!
3989+
PLFLT yPos ;
3990+
PLFLT xPos ;
3991+
PLFLT viewportXSize ;
3992+
DLong modifierCode=0;
3993+
switch (zaxis_value) {
3994+
case 1:
3995+
modifierCode = 2;
3996+
yPos = ynormmin;
3997+
xPos = xnormmax;
3998+
viewportXSize=xPos-xnormmin; if (viewportXSize<0.001) viewportXSize=0.01;
3999+
a->vpor(xPos - viewportXSize, xPos, znormmin, znormmax);
4000+
break;
4001+
case 4:
4002+
modifierCode = 2;
4003+
yPos = ynormmax;
4004+
xPos = xnormmax;
4005+
viewportXSize=xPos-xnormmin; if (viewportXSize<0.001) viewportXSize=0.01;
4006+
a->vpor(xPos - viewportXSize, xPos, znormmin, znormmax);
4007+
break;
4008+
case 2:
4009+
modifierCode = 1;
4010+
yPos = ynormmin;
4011+
xPos = xnormmin;
4012+
viewportXSize=xnormmax-xPos; if (viewportXSize<0.001) viewportXSize=0.01;
4013+
a->vpor(xPos, xPos + viewportXSize, znormmin, znormmax);
4014+
break;
4015+
default: //->3 = 0
4016+
modifierCode = 1;
4017+
yPos =ynormmax;
4018+
xPos =xnormmin;
4019+
viewportXSize=xnormmax-xPos; if (viewportXSize<0.001) viewportXSize=0.01;
4020+
a->vpor(xPos, xPos + viewportXSize, znormmin, znormmax);
4021+
break;
4022+
}
4023+
//special transform to use 'y' axis code, but with 'z' values and yz exch.
4024+
gdlSetZto3DDriverTransform(a, yPos);
4025+
gdlExchange3DDriverTransform(a);
4026+
gdlAxis(e, a, ZAXIS, zStart, zEnd, zLog, modifierCode);
4027+
}
39974028

39984029
//restore (normally not useful?)
39994030
gdlExchange3DDriverTransform(a);

src/plotting.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,9 @@ namespace lib {
234234
void SelfPDotTTransformXYZ(DDoubleGDL *xt, DDoubleGDL *yt, DDoubleGDL *zt);
235235
void PDotTTransformXYZval(PLFLT x, PLFLT y, PLFLT *xt, PLFLT *yt, PLPointer data);
236236
DDoubleGDL* gdlDefinePlplotRotationMatrix(DDouble az, DDouble alt, DDouble *scale, bool save);
237-
bool gdlInterpretT3DMatrixAsPlplotRotationMatrix(DDouble &az, DDouble &alt, DDouble &ay, DDouble *scale, T3DEXCHANGECODE &axisExchangeCode, bool &below);
237+
void gdlMakeSubpageRotationMatrix3d(DDoubleGDL* me, PLFLT xratio, PLFLT yratio, PLFLT zratio, PLFLT* trans);
238+
void gdlMakeSubpageRotationMatrix2d(DDoubleGDL* me, PLFLT xratio, PLFLT yratio, PLFLT zratio, PLFLT* trans);
239+
bool gdlInterpretT3DMatrixAsPlplotRotationMatrix(DDouble &az, DDouble &alt, DDouble &ay, DDouble *scale, /* DDouble *trans,*/ T3DEXCHANGECODE &axisExchangeCode, bool &below);
238240
DDoubleGDL* gdlGetT3DMatrix();
239241
void gdlStartT3DMatrixDriverTransform(GDLGStream *a, DDouble zValue);
240242
void gdlStartSpecial3DDriverTransform( GDLGStream *a, GDL_3DTRANSFORMDEVICE &PlotDevice3D);
@@ -436,7 +438,7 @@ namespace lib {
436438

437439
void gdlBox(EnvT *e, GDLGStream *a, DDouble xStart, DDouble xEnd, bool xLog, DDouble yStart, DDouble yEnd, bool yLog);
438440

439-
void gdlBox3(EnvT *e, GDLGStream *a, DDouble xStart, DDouble xEnd, bool xLog, DDouble yStart, DDouble yEnd, bool yLog, DDouble zStart, DDouble zEnd, bool zLog, DDouble zValue);
441+
void gdlBox3(EnvT *e, GDLGStream *a, DDouble xStart, DDouble xEnd, bool xLog, DDouble yStart, DDouble yEnd, bool yLog, DDouble zStart, DDouble zEnd, bool zLog, DDouble zValue, bool drawZ=false, DLong zcode=0);
440442

441443
//restore current clipbox, make another or remove it at all.
442444
bool gdlSwitchToClippedNormalizedCoordinates(EnvT *e, GDLGStream *actStream, bool invertedClipMeaning=false, bool commandHasCoordSys=true );

src/plotting_convert_coord.cpp

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -646,11 +646,13 @@ namespace lib {
646646
// create all 8 homogenous coordinates of the cubes points,
647647
// compute their projected coord,
648648
// find min and max on both axes.
649-
static DDoubleGDL* cube_coord = (new DDoubleGDL(dimension(8,4), BaseGDL::NOZERO));
650-
static DDouble vals[32]={0,1,0,1,0,1,0,1,0,0,1,1,0,0,1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1};
651-
for (auto i=0; i< 32; ++i) (*cube_coord)[i]=vals[i];
649+
static DDouble vals[32] = {0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
650+
// static DDoubleGDL cube_coord(dimension(8,4), BaseGDL::NOZERO);
651+
static DDoubleGDL cube_coord(vals,32);
652+
cube_coord.SetDim(dimension(8,4)); //needed as previous initializaton is 1D only.
653+
// for (auto i=0; i< 32; ++i) (*(&cube_coord))[i]=vals[i];
652654
// w=v#!p.t
653-
DDoubleGDL* tmp = plplot3d->MatrixOp(cube_coord, false, true);
655+
DDoubleGDL* tmp = plplot3d->MatrixOp(&cube_coord, false, true);
654656
DDoubleGDL* res = static_cast<DDoubleGDL*>(tmp->Transpose(NULL));
655657
GDLDelete(tmp);
656658
// SelfPrint3d(res);
@@ -718,6 +720,22 @@ DDoubleGDL* gdlDoAsScale3(DDouble az, DDouble alt, DDouble *scalex, DDouble *sca
718720
return t3dMatrix;
719721
}
720722

723+
//this displaces 3d elements made in NoSubpage mode to a particular subpage. Used for axis for example.
724+
void gdlMakeSubpageRotationMatrix3d(DDoubleGDL* me, PLFLT xratio, PLFLT yratio, PLFLT zratio, PLFLT* trans) {
725+
DDouble newscale[3]={ xratio, yratio, zratio};
726+
SelfTranspose3d(me);
727+
SelfScale3d(me,newscale);
728+
SelfTranslate3d(me,trans);
729+
SelfTranspose3d(me);
730+
}
731+
//this displaces 2D elements (images, already reprojected 3d) made in NoSubpage mode to a particluar subpage
732+
void gdlMakeSubpageRotationMatrix2d(DDoubleGDL* me, PLFLT xratio, PLFLT yratio, PLFLT zratio, PLFLT* trans) {
733+
DDouble newscale[3]={ xratio, yratio, zratio};
734+
SelfReset3d(me);
735+
SelfScale3d(me,newscale);
736+
SelfTranslate3d(me,trans);
737+
SelfTranspose3d(me);
738+
}
721739
//converts 3D values according to COORDSYS towards NORMAL coordinates and , logically, unset xLog,yLo,zLog and define code as NORMAL.
722740
void SelfConvertToNormXYZ(DDoubleGDL *x, bool &xLog, DDoubleGDL *y, bool &yLog, DDoubleGDL *z, bool &zLog, COORDSYS &code) {
723741
// std::cerr<<"SelfConvertToNormXYZ(DDoubleGDL)\n";
@@ -981,7 +999,7 @@ bool isAxonometricRotation(DDoubleGDL* Matrix, DDouble &alt, DDouble &az, DDoubl
981999
// Note that if drawing of axes and hidden surfaces (by plplot) are not needed (e.g., PLOTS), any matrix can be used.
9821000
// Returns a 'plplot-compatible' matrix that will be used in calls to plplot.
9831001
// Retunrs NULL if conversion is impossible.
984-
bool gdlInterpretT3DMatrixAsPlplotRotationMatrix(DDouble &az, DDouble &alt, DDouble &ay, DDouble *scale, T3DEXCHANGECODE &axisExchangeCode, bool &below) {
1002+
bool gdlInterpretT3DMatrixAsPlplotRotationMatrix(DDouble &az, DDouble &alt, DDouble &ay, DDouble *scale, /*DDouble *trans,*/ T3DEXCHANGECODE &axisExchangeCode, bool &below) {
9851003
// std::cerr<<"gdlInterpretT3DMatrixAsPlplotRotationMatrix(()\n";
9861004
//returns NULL if error!
9871005
DDoubleGDL* t3dMatrix = new DDoubleGDL(dimension(4, 4),BaseGDL::NOZERO);
@@ -991,6 +1009,12 @@ bool isAxonometricRotation(DDoubleGDL* Matrix, DDouble &alt, DDouble &az, DDoubl
9911009
static unsigned tTag = pStruct->Desc()->TagIndex("T");
9921010
for (int i = 0; i < t3dMatrix->N_Elements(); ++i)(*t3dMatrix)[i] = (*static_cast<DDoubleGDL*> (pStruct->GetTag(tTag, 0)))[i];
9931011
SelfTranspose3d(t3dMatrix);
1012+
// //compute translation in vport space using the displacement of [0,0,0]:
1013+
// static DDouble center[4]={0.5,0.5,0.5,1.};
1014+
// static DDoubleGDL zeropos(center,4);
1015+
// DDoubleGDL* intermediary = t3dMatrix->MatrixOp(&zeropos, false, false);
1016+
// for (int i=0; i< 3; ++i) trans[i]= (*intermediary)[i]-0.5;
1017+
// GDLDelete(intermediary);
9941018
//check if valid, get rotation etc.
9951019
if (!isAxonometricRotation(t3dMatrix, alt, az, ay, scale, axisExchangeCode, below)) return false;
9961020
return true;

src/plotting_shade_surf.cpp

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ namespace lib
4747
bool below=false;
4848
DDouble* Current3DMatrix;
4949
DDoubleGDL* gdlBox3d;
50-
50+
PLFLT xratio, yratio, zratio, trans[3];
51+
PLINT nx, ny;
5152
private:
5253
bool handle_args (EnvT* e)
5354
{
@@ -231,6 +232,14 @@ namespace lib
231232
{
232233
static int savet3dIx = e->KeywordIx("SAVE");
233234
bool saveT3d = e->KeywordSet(savet3dIx);
235+
bool zAxis=true;
236+
static int zaxisIx = e->KeywordIx("ZAXIS");
237+
DLong zaxis_value=0;
238+
if (e->GetKW(zaxisIx) != NULL) {
239+
e->AssureLongScalarKWIfPresent(zaxisIx, zaxis_value);
240+
if (zaxis_value > 4) zaxis_value=0;
241+
}
242+
if (zaxis_value < 0) zAxis = false;
234243

235244
// background BEFORE next plot since it is the only place plplot may redraw the background...
236245
gdlSetGraphicsBackgroundColorFromKw ( e, actStream );
@@ -266,9 +275,14 @@ namespace lib
266275
below=true;
267276
alt=-(360.-alt);
268277
}
269-
//Compute special transformation matrix for the BOX and give it to the driver
278+
//Compute special transformation matrix for the BOX and give it to the driver. Subpage info is important
270279
gdlBox3d=gdlDefinePlplotRotationMatrix( az, alt, scale, saveT3d);
271-
Guard<BaseGDL> g(gdlBox3d);
280+
actStream->getCurrentSubpageInfo(xratio, yratio, zratio, trans);
281+
gdlMakeSubpageRotationMatrix3d(gdlBox3d, xratio, yratio, zratio,trans);
282+
//now that 3D matrix is OK, we pass in 'No Sub'
283+
actStream->NoSub();
284+
zValue=gdlSetViewPortAndWorldCoordinates(e, actStream, xStart, xEnd, xLog, yStart, yEnd, yLog, zStart, zEnd, zLog, zValue);
285+
272286
GDL_3DTRANSFORMDEVICE T3DForAXes;
273287
for (int i = 0; i < 16; ++i)T3DForAXes.T[i] =(*gdlBox3d)[i];
274288
T3DForAXes.zValue = (std::isfinite(zValue))?zValue:0;
@@ -290,7 +304,7 @@ namespace lib
290304
//Should draw 3d mesh before axes
291305
gdlSetGraphicsForegroundColorFromKw ( e, actStream ); //COLOR
292306
//write OUR box using our 3D PLESC tricks:
293-
gdlBox3(e, actStream, xStart, xEnd, xLog, yStart, yEnd, yLog, zStart, zEnd, zLog, zValue);
307+
gdlBox3(e, actStream, xStart, xEnd, xLog, yStart, yEnd, yLog, zStart, zEnd, zLog, zValue, zAxis, zaxis_value);
294308
//reset driver to 2D plotting routines, further 3D is just plplot drawing a mesh.
295309
gdlStop3DDriverTransform(actStream);
296310

@@ -320,7 +334,8 @@ namespace lib
320334
//This is the good version for shade_surf, shifting the shaded surface by som amount in the 3DDriverTransform of the driver, not the plplot library.
321335
actStream->vpor(0,1,0,1);
322336
actStream->wind(-0.5/scale[0],0.5/scale[0],-0.5/scale[1],0.5/scale[1]); //mandatory: to center in (0,0,0) for 3D Matrix rotation.
323-
if (below) { actStream->w3d(1,1,1,0,1,0,1,0,1, -alt, az);
337+
if (below) {
338+
actStream->w3d(1,1,1,0,1,0,1,0,1, -alt, az);
324339
DDouble xp = 0;
325340
DDouble yp1 = 0;
326341
DDouble yp2 = 0;
@@ -340,6 +355,14 @@ namespace lib
340355
Matrix3DTransformXYZval(0, 0, 0.5, &xp, &yp2,Current3DMatrix);
341356
gdlShiftYaxisUsing3DDriverTransform(actStream, yp1 - yp2, false);
342357
}
358+
if (!doT3d) { //use a special matrix to shift and scale into current subpage
359+
gdlMakeSubpageRotationMatrix2d(gdlBox3d, xratio, yratio, zratio,trans);
360+
GDL_3DTRANSFORMDEVICE T3DForAXes;
361+
for (int i = 0; i < 16; ++i)T3DForAXes.T[i] = (*gdlBox3d)[i];
362+
T3DForAXes.zValue = (std::isfinite(zValue)) ? zValue : 0;
363+
gdlStartSpecial3DDriverTransform(actStream, T3DForAXes);
364+
Guard<BaseGDL> g(gdlBox3d);
365+
}
343366

344367
return false;
345368
}

src/plotting_surface.cpp

Lines changed: 34 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ namespace lib
4949
bool below=false;
5050
DDouble* Current3DMatrix;
5151
DDoubleGDL* gdlBox3d;
52-
52+
PLFLT xratio, yratio, zratio, trans[3];
53+
PLINT nx, ny;
5354
private:
5455
bool handle_args (EnvT* e)
5556
{
@@ -233,7 +234,15 @@ namespace lib
233234
{
234235
static int savet3dIx = e->KeywordIx("SAVE");
235236
bool saveT3d = e->KeywordSet(savet3dIx);
236-
237+
bool zAxis=true;
238+
static int zaxisIx = e->KeywordIx("ZAXIS");
239+
DLong zaxis_value=0;
240+
if (e->GetKW(zaxisIx) != NULL) {
241+
e->AssureLongScalarKWIfPresent(zaxisIx, zaxis_value);
242+
if (zaxis_value > 4) zaxis_value=0;
243+
}
244+
if (zaxis_value < 0) zAxis = false;
245+
237246
// background BEFORE next plot since it is the only place plplot may redraw the background...
238247
gdlSetGraphicsBackgroundColorFromKw ( e, actStream );
239248
//start a plot
@@ -267,10 +276,15 @@ namespace lib
267276
} else if (alt > 270) {
268277
below=true;
269278
alt=-(360.-alt);
270-
}
271-
//Compute special transformation matrix for the BOX and give it to the driver
279+
}
280+
//Compute special transformation matrix for the BOX and give it to the driver. Subpage info is important
272281
gdlBox3d=gdlDefinePlplotRotationMatrix( az, alt, scale, saveT3d);
273-
Guard<BaseGDL> g(gdlBox3d);
282+
actStream->getCurrentSubpageInfo(xratio, yratio, zratio, trans);
283+
gdlMakeSubpageRotationMatrix3d(gdlBox3d, xratio, yratio, zratio,trans);
284+
//now that 3D matrix is OK, we pass in 'No Sub'
285+
actStream->NoSub();
286+
zValue=gdlSetViewPortAndWorldCoordinates(e, actStream, xStart, xEnd, xLog, yStart, yEnd, yLog, zStart, zEnd, zLog, zValue);
287+
274288
GDL_3DTRANSFORMDEVICE T3DForAXes;
275289
for (int i = 0; i < 16; ++i)T3DForAXes.T[i] =(*gdlBox3d)[i];
276290
T3DForAXes.zValue = (std::isfinite(zValue))?zValue:0;
@@ -291,7 +305,7 @@ namespace lib
291305
//Draw axes with normal color!
292306
gdlSetGraphicsForegroundColorFromKw ( e, actStream ); //COLOR
293307
//write OUR box using our 3D PLESC tricks:
294-
gdlBox3(e, actStream, xStart, xEnd, xLog, yStart, yEnd, yLog, zStart, zEnd, zLog, zValue);
308+
gdlBox3(e, actStream, xStart, xEnd, xLog, yStart, yEnd, yLog, zStart, zEnd, zLog, zValue, zAxis, zaxis_value);
295309
//reset driver to 2D plotting routines, further 3D is just plplot drawing a mesh.
296310
gdlStop3DDriverTransform(actStream);
297311

@@ -324,13 +338,21 @@ namespace lib
324338
// shade // if (e->KeywordPresent(shadesIx)) doShade = true;
325339
// shade //
326340
// shade // if (!doShade) {
327-
//This is the good version for surface without the shade argument.
341+
//This is the good version for surface without the shade argument.
328342
actStream->vpor(0, 1, 0, 1);
329-
actStream->wind(-0.5 / scale[0], 0.5 / scale[0], -0.5 / scale[1], 0.5 / scale[1]);
330-
if (below) {
331-
actStream->w3d(1, 1, 1, 0, 1, 0, 1, 0.5, 1.5, -alt, az);
332-
gdlFlipYPlotDirection(actStream); //special trick, not possible with plplot
333-
} else actStream->w3d(1, 1, 1, 0, 1, 0, 1, 0.5, 1.5, alt, az);
343+
actStream->wind(-0.5/scale[0],0.5/scale[0],-0.5/scale[1],0.5/scale[1]); //mandatory: to center in (0,0,0) for 3D Matrix rotation.
344+
if (!doT3d) { //use a special matrix to shift and scale into current subpage
345+
gdlMakeSubpageRotationMatrix2d(gdlBox3d, xratio, yratio, zratio,trans);
346+
GDL_3DTRANSFORMDEVICE T3DForAXes;
347+
for (int i = 0; i < 16; ++i)T3DForAXes.T[i] = (*gdlBox3d)[i];
348+
T3DForAXes.zValue = (std::isfinite(zValue)) ? zValue : 0;
349+
gdlStartSpecial3DDriverTransform(actStream, T3DForAXes);
350+
Guard<BaseGDL> g(gdlBox3d);
351+
}
352+
if (below) {
353+
actStream->w3d(1, 1, 1, 0, 1, 0, 1, 0.5, 1.5, -alt, az);
354+
gdlFlipYPlotDirection(actStream); //special trick, not possible with plplot
355+
} else actStream->w3d(1, 1, 1, 0, 1, 0, 1, 0.5, 1.5, alt, az);
334356
// shade // } else {
335357
// shade // //This is the good version for shade_surf and surface with shade option
336358
// shade // // (needs shifting the plplot plot by some amount in the 3DDriverTransform of the driver.)

0 commit comments

Comments
 (0)