| version 1.2, 2002/07/07 23:57:58 |
version 1.3, 2002/07/11 23:44:38 |
| Line 22 int CheckHiddenCrosshair(WindowType theW |
|
| Line 22 int CheckHiddenCrosshair(WindowType theW |
|
| int xIndex, int yIndex, int LeaveIndex, |
int xIndex, int yIndex, int LeaveIndex, |
| double tan_phi, double theOtherIndexStep) |
double tan_phi, double theOtherIndexStep) |
| { |
{ |
| int theCurrentIndex, theLastIndex, theIndexStep = 1; |
int theCurrentIndex = 0; |
| |
int theLastIndex = 0; |
| |
int theIndexStep = 1; |
| LabelType theLabel = theWindow->label; |
LabelType theLabel = theWindow->label; |
| DataType theData = (DataType)malloc(sizeof(struct data)); |
DataType theData = (DataType)malloc(sizeof(struct data)); |
| double theLineZStep, theLineZValue, theOtherIndex, theSurfZValue; |
double theLineZStep = 0; |
| double xmin, xmax, ymin, ymax, zmin, zmax, rho, phi; |
double theLineZValue, theOtherIndex, theSurfZValue; |
| |
double xmin, xmax; |
| |
double ymin, ymax; |
| |
double zmin, zmax; |
| |
double rho, phi; |
| int xindex1, xindex2, yindex1, yindex2; |
int xindex1, xindex2, yindex1, yindex2; |
| POSITION linePos = NONE; |
POSITION linePos = NONE; |
| double theta = theWindow->theta; |
double theta = theWindow->theta; |
| Line 42 int CheckHiddenCrosshair(WindowType theW |
|
| Line 48 int CheckHiddenCrosshair(WindowType theW |
|
| theData->zArraySize = theWindow->data->zArraySize; |
theData->zArraySize = theWindow->data->zArraySize; |
| theData->zArrayOffset = theWindow->data->zArrayOffset; |
theData->zArrayOffset = theWindow->data->zArrayOffset; |
| |
|
| switch (direction) { |
theLastIndex = LeaveIndex; |
| case 0: /* The X direction */ |
if (direction) { |
| theCurrentIndex = xIndex; |
/* the Y direction */ |
| theOtherIndex = yIndex; |
theCurrentIndex = yIndex; |
| theLastIndex = LeaveIndex; |
theOtherIndex = xIndex; |
| if (xIndex > LeaveIndex) { |
if (yIndex > LeaveIndex) { |
| theIndexStep = -1; |
theIndexStep = -1; |
| } |
} |
| rho = 1.0/(sin(deg2rad(theta))*fabs(cos(deg2rad(phi)))); |
rho = 1.0/(sin(deg2rad(theta))*fabs(sin(deg2rad(phi)))); |
| theLineZStep = rho*cos(deg2rad(theta))*(zmax-zmin)/ |
theLineZStep = rho*cos(deg2rad(theta))*(zmax-zmin)/ |
| (double)(theWindow->mend-1-theWindow->mstart); |
(double)(theWindow->nend-1-theWindow->nstart); |
| break; |
} |
| case 1: /* the Y direction */ |
else { |
| theCurrentIndex = yIndex; |
/* The X direction */ |
| theOtherIndex = xIndex; |
theCurrentIndex = xIndex; |
| theLastIndex = LeaveIndex; |
theOtherIndex = yIndex; |
| if (yIndex > LeaveIndex) { |
if (xIndex > LeaveIndex) { |
| theIndexStep = -1; |
theIndexStep = -1; |
| } |
} |
| rho = 1.0/(sin(deg2rad(theta))*fabs(sin(deg2rad(phi)))); |
rho = 1.0/(sin(deg2rad(theta))*fabs(cos(deg2rad(phi)))); |
| theLineZStep = rho*cos(deg2rad(theta))*(zmax-zmin)/ |
theLineZStep = rho*cos(deg2rad(theta))*(zmax-zmin)/ |
| (double)(theWindow->nend-1-theWindow->nstart); |
(double)(theWindow->mend-1-theWindow->mstart); |
| break; |
|
| } |
} |
| |
|
| theLineZValue = SurfaceZ(theData,xIndex,yIndex)*theLabel->Z_Scale; |
theLineZValue = SurfaceZ(theData,xIndex,yIndex)*theLabel->Z_Scale; |
| Line 440 void Paint_ThreeD_Window(WindowType theW |
|
| Line 445 void Paint_ThreeD_Window(WindowType theW |
|
| Tk_Window tkwin; |
Tk_Window tkwin; |
| XRectangle theClientArea; |
XRectangle theClientArea; |
| |
|
| double n1, n2, n3, v1, v2, v3; |
double n1, n2, n3, v1, v2, v3; |
| double u1, u2, u3, up1, up2, up3; |
double u1, u2, u3, up1, up2, up3; |
| double a1, a2, a3, b1, b2, b3; |
double a1, a2, a3, b1, b2, b3; |
| double xprojmax, xprojmin; |
double xprojmax, xprojmin; |
| double yprojmax, yprojmin; |
double yprojmax, yprojmin; |
| double mag, c1, c2, d1, d2; |
double mag, c1, c2, d1, d2; |
| double xtemp, ytemp, ztemp; |
double xtemp, ytemp, ztemp; |
| |
|
| int m, n, mstart, mend, nend, nstart; |
int m, n, mstart, mend, nend, nstart; |
| int i, j, k, x1, y1, x2, y2, colornumber; |
int i, j, k, x1, y1, x2, y2, colornumber; |
| int phi_flag, theta_flag, i1, j1, k1, maxlen; |
int phi_flag = 0; |
| |
int theta_flag, i1, j1, k1, maxlen; |
| int xstart, xend, xstep, ystart, yend, ystep; |
int xstart, xend, xstep, ystart, yend, ystep; |
| |
|
| |
xstart = xend = xstep = ystart = yend = ystep = 0; |
| tkwin = theWindow->tkwin; |
tkwin = theWindow->tkwin; |
| |
|
| data_Ptr = theWindow->data; |
data_Ptr = theWindow->data; |