2008-08-06 18:36:30 +00:00
|
|
|
// This file is part of BOINC.
|
2005-01-20 23:22:22 +00:00
|
|
|
// http://boinc.berkeley.edu
|
2008-08-06 18:36:30 +00:00
|
|
|
// Copyright (C) 2008 University of California
|
2005-01-03 20:35:32 +00:00
|
|
|
//
|
2008-08-06 18:36:30 +00:00
|
|
|
// BOINC is free software; you can redistribute it and/or modify it
|
|
|
|
// under the terms of the GNU Lesser General Public License
|
|
|
|
// as published by the Free Software Foundation,
|
|
|
|
// either version 3 of the License, or (at your option) any later version.
|
2005-01-20 23:22:22 +00:00
|
|
|
//
|
2008-08-06 18:36:30 +00:00
|
|
|
// BOINC is distributed in the hope that it will be useful,
|
2005-01-20 23:22:22 +00:00
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
// See the GNU Lesser General Public License for more details.
|
|
|
|
//
|
2008-08-06 18:36:30 +00:00
|
|
|
// You should have received a copy of the GNU Lesser General Public License
|
|
|
|
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
|
2004-03-06 09:45:25 +00:00
|
|
|
|
2005-01-03 20:35:32 +00:00
|
|
|
// shared-library part of the implementation of REDUCE
|
2003-03-08 05:26:55 +00:00
|
|
|
|
2005-07-14 16:46:38 +00:00
|
|
|
#if defined(_WIN32) && !defined(__STDWX_H__) && !defined(_BOINC_WIN_) && !defined(_AFX_STDAFX_H_)
|
2005-02-09 19:02:11 +00:00
|
|
|
#include "boinc_win.h"
|
2005-11-21 18:34:44 +00:00
|
|
|
#else
|
|
|
|
#include "config.h"
|
2005-07-14 16:46:38 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef _WIN32
|
2004-07-15 21:54:48 +00:00
|
|
|
#include <GL/gl.h>
|
2003-03-08 05:26:55 +00:00
|
|
|
#endif
|
|
|
|
|
2004-12-07 16:37:18 +00:00
|
|
|
#include <algorithm>
|
2004-07-13 13:54:09 +00:00
|
|
|
|
2004-07-15 20:49:27 +00:00
|
|
|
#include "boinc_gl.h"
|
2003-01-29 21:13:15 +00:00
|
|
|
#include "gutil.h"
|
|
|
|
#include "reduce.h"
|
|
|
|
|
2007-10-22 23:12:42 +00:00
|
|
|
void REDUCED_ARRAY_RENDER::init_display(
|
|
|
|
GRAPH_STYLE st, float* p, float* s, double h0, double dh, float trans,
|
|
|
|
char* xl, char* yl, char* zl
|
|
|
|
) {
|
|
|
|
memcpy(draw_pos, p, sizeof(draw_pos));
|
|
|
|
memcpy(draw_size, s, sizeof(draw_size));
|
|
|
|
hue0 = h0;
|
|
|
|
dhue = dh;
|
|
|
|
alpha = trans;
|
|
|
|
draw_style = st;
|
|
|
|
xlabel=xl;
|
|
|
|
ylabel=yl;
|
|
|
|
zlabel=zl;
|
|
|
|
}
|
|
|
|
|
2007-11-27 19:28:57 +00:00
|
|
|
void REDUCED_ARRAY_RENDER::new_array() {
|
|
|
|
draw_deltax = draw_size[0]/rdimx;
|
|
|
|
draw_deltaz = draw_size[2]/rdimy;
|
|
|
|
}
|
|
|
|
|
2007-10-22 23:12:42 +00:00
|
|
|
void REDUCED_ARRAY_RENDER::draw_row_quad(int row) {
|
2003-01-29 21:13:15 +00:00
|
|
|
float z0 = draw_pos[2] + (draw_size[2]*row)/rdimy;
|
|
|
|
float z1 = z0 + draw_deltaz;
|
|
|
|
float x0, x1, y00, y01, y10, y11;
|
|
|
|
float* row0 = rrow(row);
|
|
|
|
float* row1 = rrow(row+1);
|
|
|
|
int i;
|
|
|
|
|
|
|
|
glBegin(GL_QUADS); // TODO: use GL_QUADSTRIP
|
|
|
|
for (i=0; i<rdimx-1; i++) {
|
|
|
|
x0 = draw_pos[0] + (draw_size[0]*i)/rdimx;
|
|
|
|
x1 = x0 + draw_deltax;
|
2003-02-19 00:06:05 +00:00
|
|
|
float h00 = (row0[i]-rdata_min)/(rdata_max-rdata_min);
|
|
|
|
float h01 = (row0[i+1]-rdata_min)/(rdata_max-rdata_min);
|
|
|
|
float h10 = (row1[i]-rdata_min)/(rdata_max-rdata_min);
|
|
|
|
float h11 = (row1[i+1]-rdata_min)/(rdata_max-rdata_min);
|
2003-01-29 21:13:15 +00:00
|
|
|
|
|
|
|
y00 = draw_pos[1] + draw_size[1]*h00;
|
|
|
|
y01 = draw_pos[1] + draw_size[1]*h01;
|
|
|
|
y10 = draw_pos[1] + draw_size[1]*h10;
|
|
|
|
y11 = draw_pos[1] + draw_size[1]*h11;
|
|
|
|
|
2004-12-06 23:51:41 +00:00
|
|
|
float h = std::max(h00, std::max(h01, std::max(h10, h11)));
|
2003-01-29 21:13:15 +00:00
|
|
|
double hue = hue0 + (dhue*i)/rdimx;
|
|
|
|
if (hue > 1) hue -= 1;
|
|
|
|
double sat = 1.;
|
|
|
|
double lum = .5 + h/2;
|
|
|
|
COLOR color;
|
|
|
|
HLStoRGB(hue, lum, sat, color);
|
2003-02-28 23:32:20 +00:00
|
|
|
glColor4f(color.r, color.g, color.b, alpha);
|
2003-01-29 21:13:15 +00:00
|
|
|
|
|
|
|
glVertex3f(x0, y00, z0);
|
|
|
|
glVertex3f(x1, y01, z0);
|
|
|
|
glVertex3f(x1, y11, z1);
|
|
|
|
glVertex3f(x0, y10, z1);
|
|
|
|
}
|
|
|
|
glEnd();
|
|
|
|
#if 0
|
|
|
|
// draw a black line on front and right edge of each quad
|
|
|
|
//
|
2003-09-25 18:04:47 +00:00
|
|
|
glLineWidth(4.0);
|
|
|
|
glDisable(GL_LINE_SMOOTH);
|
2003-01-29 21:13:15 +00:00
|
|
|
glBegin(GL_LINES);
|
2003-03-04 23:57:25 +00:00
|
|
|
glColor4f(0., 0., 0., 1.0);
|
2003-01-29 21:13:15 +00:00
|
|
|
for (i=0; i<rdimx-1; i++) {
|
|
|
|
x0 = draw_pos[0] + (draw_size[0]*i)/rdimx;
|
|
|
|
x1 = x0 + draw_deltax;
|
|
|
|
float eps=.03f;
|
2003-02-19 00:06:05 +00:00
|
|
|
y00 = draw_pos[1] + draw_size[1]*(row0[i]-rdata_min)/rdata_max+eps;
|
|
|
|
y01 = draw_pos[1] + draw_size[1]*(row0[i+1]-rdata_min)/rdata_max+eps;
|
|
|
|
y10 = draw_pos[1] + draw_size[1]*(row1[i]-rdata_min)/rdata_max+eps;
|
|
|
|
y11 = draw_pos[1] + draw_size[1]*(row1[i+1]-rdata_min)/rdata_max+eps;
|
2003-01-29 21:13:15 +00:00
|
|
|
glVertex3f(x0, y00, z0);
|
|
|
|
glVertex3f(x1, y01, z0);
|
|
|
|
glVertex3f(x1, y01, z0);
|
|
|
|
glVertex3f(x1, y11, z1);
|
|
|
|
}
|
|
|
|
glEnd();
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2007-10-22 23:12:42 +00:00
|
|
|
void REDUCED_ARRAY_RENDER::draw_row_rect_x(int row) {
|
2003-10-10 23:36:19 +00:00
|
|
|
float z0=0,z1=0,x0=0,x1=0,y0=0,y1=0,h=0,xm=0;
|
2004-07-13 13:54:09 +00:00
|
|
|
int i=0;
|
2003-09-26 20:10:45 +00:00
|
|
|
float* row0=0;
|
|
|
|
int trow=row-1;
|
|
|
|
float* trow0=0;
|
2004-07-13 13:54:09 +00:00
|
|
|
double hue,sat,lum;
|
2003-10-09 00:21:49 +00:00
|
|
|
COLOR color;
|
|
|
|
|
2003-10-06 16:10:33 +00:00
|
|
|
switch(draw_style) {
|
2003-10-09 00:55:38 +00:00
|
|
|
case GRAPH_STYLE_RECTANGLES:
|
2003-10-05 06:03:08 +00:00
|
|
|
z0 = draw_pos[2] + (draw_size[2]*row)/rdimy;
|
2004-07-13 13:54:09 +00:00
|
|
|
z1 = z0+.14f;
|
2003-10-05 06:03:08 +00:00
|
|
|
row0 = rrow(row);
|
2004-07-13 13:54:09 +00:00
|
|
|
|
2003-10-05 06:03:08 +00:00
|
|
|
glBegin(GL_QUADS);
|
|
|
|
for (i=0; i<rdimx; i++) {
|
|
|
|
x0 = draw_pos[0] + (draw_size[0]*i)/rdimx;
|
|
|
|
x1 = x0 + draw_deltax*.95f;
|
|
|
|
h = (row0[i]-rdata_min)/(rdata_max-rdata_min);
|
|
|
|
|
|
|
|
y0 = draw_pos[1];
|
|
|
|
y1 = draw_pos[1] + draw_size[1]*h;
|
|
|
|
|
2005-02-16 23:30:29 +00:00
|
|
|
hue = hue0 + (dhue*i)/rdimx;
|
2003-10-05 06:03:08 +00:00
|
|
|
if (hue > 1) hue -= 1;
|
2005-02-16 23:30:29 +00:00
|
|
|
sat = 1.;
|
|
|
|
lum = .5 + h/2;
|
2003-10-05 06:03:08 +00:00
|
|
|
HLStoRGB(hue, lum, sat, color);
|
|
|
|
glColor4f(color.r, color.g, color.b, alpha);
|
|
|
|
|
|
|
|
//front
|
2004-07-13 13:54:09 +00:00
|
|
|
|
2003-10-05 06:03:08 +00:00
|
|
|
glVertex3f(x0, y0, z0);
|
|
|
|
glVertex3f(x1, y0, z0);
|
|
|
|
glVertex3f(x1, y1, z0);
|
|
|
|
glVertex3f(x0, y1, z0);
|
|
|
|
/*
|
|
|
|
//back
|
|
|
|
glVertex3f(x0, y0, z1);
|
|
|
|
glVertex3f(x1, y0, z1);
|
|
|
|
glVertex3f(x1, y1, z1);
|
|
|
|
glVertex3f(x0, y1, z1);
|
|
|
|
|
|
|
|
//left
|
|
|
|
glVertex3f(x0, y0, z0);
|
|
|
|
glVertex3f(x0, y0, z1);
|
|
|
|
glVertex3f(x0, y1, z1);
|
|
|
|
glVertex3f(x0, y1, z0);
|
|
|
|
|
|
|
|
//right
|
|
|
|
glVertex3f(x1, y0, z0);
|
|
|
|
glVertex3f(x1, y0, z1);
|
|
|
|
glVertex3f(x1, y1, z1);
|
|
|
|
glVertex3f(x1, y1, z0);
|
|
|
|
|
|
|
|
//top
|
|
|
|
glVertex3f(x0, y1, z0);
|
|
|
|
glVertex3f(x0, y1, z1);
|
|
|
|
glVertex3f(x1, y1, z1);
|
|
|
|
glVertex3f(x1, y1, z0);
|
|
|
|
*/
|
|
|
|
}
|
|
|
|
glEnd();
|
2004-07-13 13:54:09 +00:00
|
|
|
|
2003-10-05 06:03:08 +00:00
|
|
|
|
2004-10-13 22:52:37 +00:00
|
|
|
#if 0
|
2003-10-05 06:03:08 +00:00
|
|
|
//draw lines
|
2004-07-13 13:54:09 +00:00
|
|
|
mode_unshaded();
|
|
|
|
glLineWidth(.5f);
|
2003-10-05 06:03:08 +00:00
|
|
|
glBegin(GL_LINES);
|
|
|
|
glColor4f(0,0,0,1);
|
|
|
|
for (i=0; i<rdimx; i++) {
|
|
|
|
x0 = draw_pos[0] + (draw_size[0]*i)/rdimx;
|
|
|
|
x1 = x0 + draw_deltax*.8f;
|
|
|
|
float h = (row0[i]-rdata_min)/(rdata_max-rdata_min);
|
|
|
|
|
|
|
|
y1 = draw_pos[1] + draw_size[1]*h;
|
|
|
|
|
|
|
|
//front
|
2004-07-13 13:54:09 +00:00
|
|
|
|
2003-10-05 06:03:08 +00:00
|
|
|
glVertex3f(x0, y0, z0);
|
|
|
|
glVertex3f(x0, y1, z0);
|
2003-09-18 23:55:11 +00:00
|
|
|
|
2003-10-05 06:03:08 +00:00
|
|
|
glVertex3f(x0, y0, z0);
|
|
|
|
glVertex3f(x1, y0, z0);
|
2003-09-18 23:55:11 +00:00
|
|
|
|
2003-10-05 06:03:08 +00:00
|
|
|
glVertex3f(x1, y0, z0);
|
|
|
|
glVertex3f(x1, y1, z0);
|
2003-01-29 21:13:15 +00:00
|
|
|
|
2003-10-05 06:03:08 +00:00
|
|
|
glVertex3f(x0, y1, z0);
|
|
|
|
glVertex3f(x1, y1, z0);
|
|
|
|
//back
|
|
|
|
glVertex3f(x0, y0, z1);
|
|
|
|
glVertex3f(x0, y1, z1);
|
2003-09-15 23:53:11 +00:00
|
|
|
|
2003-10-05 06:03:08 +00:00
|
|
|
glVertex3f(x0, y0, z1);
|
|
|
|
glVertex3f(x1, y0, z1);
|
2003-09-15 23:53:11 +00:00
|
|
|
|
2003-10-05 06:03:08 +00:00
|
|
|
glVertex3f(x1, y0, z1);
|
|
|
|
glVertex3f(x1, y1, z1);
|
2003-09-15 23:53:11 +00:00
|
|
|
|
2003-10-05 06:03:08 +00:00
|
|
|
glVertex3f(x0, y1, z1);
|
|
|
|
glVertex3f(x1, y1, z1);
|
|
|
|
//right
|
|
|
|
glVertex3f(x0, y0, z0);
|
|
|
|
glVertex3f(x0, y1, z0);
|
2003-09-15 23:53:11 +00:00
|
|
|
|
2003-10-05 06:03:08 +00:00
|
|
|
glVertex3f(x0, y1, z0);
|
|
|
|
glVertex3f(x0, y1, z1);
|
2003-09-15 23:53:11 +00:00
|
|
|
|
2003-10-05 06:03:08 +00:00
|
|
|
glVertex3f(x0, y1, z1);
|
|
|
|
glVertex3f(x0, y0, z1);
|
2003-09-15 23:53:11 +00:00
|
|
|
|
2003-10-05 06:03:08 +00:00
|
|
|
glVertex3f(x0, y0, z1);
|
|
|
|
glVertex3f(x0, y0, z0);
|
|
|
|
//left
|
|
|
|
glVertex3f(x1, y0, z0);
|
|
|
|
glVertex3f(x1, y1, z0);
|
2003-09-15 23:53:11 +00:00
|
|
|
|
2003-10-05 06:03:08 +00:00
|
|
|
glVertex3f(x1, y1, z0);
|
|
|
|
glVertex3f(x1, y1, z1);
|
2003-09-15 23:53:11 +00:00
|
|
|
|
2003-10-05 06:03:08 +00:00
|
|
|
glVertex3f(x1, y1, z1);
|
|
|
|
glVertex3f(x1, y0, z1);
|
2003-09-15 23:53:11 +00:00
|
|
|
|
2003-10-05 06:03:08 +00:00
|
|
|
glVertex3f(x1, y0, z1);
|
|
|
|
glVertex3f(x1, y0, z0);
|
2004-10-13 22:52:37 +00:00
|
|
|
}
|
|
|
|
#endif
|
2004-07-13 13:54:09 +00:00
|
|
|
glEnd();
|
2003-10-31 22:37:46 +00:00
|
|
|
break;
|
2003-10-09 00:55:38 +00:00
|
|
|
case GRAPH_STYLE_SURFACE:
|
2003-10-10 23:36:19 +00:00
|
|
|
glBegin(GL_TRIANGLE_STRIP);
|
2003-10-05 06:03:08 +00:00
|
|
|
|
|
|
|
z0 = draw_pos[2] + (draw_size[2]*row)/rdimy;
|
|
|
|
z1 = z0+.14f;
|
|
|
|
row0 = rrow(row);
|
|
|
|
trow=row-1;
|
|
|
|
if(row!=0) trow0 = rrow(trow);
|
2004-07-13 13:54:09 +00:00
|
|
|
|
2003-10-05 06:03:08 +00:00
|
|
|
for (i=0; i<rdimx; i++) {
|
|
|
|
x0 = draw_pos[0] + (draw_size[0]*i)/rdimx;
|
|
|
|
x1 = x0 + draw_deltax*.8f;
|
2003-10-10 23:36:19 +00:00
|
|
|
xm = x0+((x1-x0)/2.0f);
|
2003-10-05 06:03:08 +00:00
|
|
|
h = (row0[i]-rdata_min)/(rdata_max-rdata_min);
|
2003-09-18 23:55:11 +00:00
|
|
|
|
2003-10-05 06:03:08 +00:00
|
|
|
y0 = draw_pos[1];
|
|
|
|
y1 = draw_pos[1] + draw_size[1]*h;
|
2003-09-18 23:55:11 +00:00
|
|
|
|
2003-10-09 00:21:49 +00:00
|
|
|
hue = hue0 + (dhue*i)/rdimx;
|
2003-10-05 06:03:08 +00:00
|
|
|
if (hue > 1) hue -= 1;
|
2003-10-09 00:21:49 +00:00
|
|
|
sat = 1.;
|
2004-07-13 13:54:09 +00:00
|
|
|
lum = .5 + h/2;
|
2003-10-05 06:03:08 +00:00
|
|
|
HLStoRGB(hue, lum, sat, color);
|
2004-07-13 13:54:09 +00:00
|
|
|
glColor4f(color.r, color.g, color.b, alpha);
|
|
|
|
|
2003-10-09 00:21:49 +00:00
|
|
|
if(row!=0) {
|
2004-07-13 13:54:09 +00:00
|
|
|
float lh = (trow0[i]-rdata_min)/(rdata_max-rdata_min);
|
|
|
|
float ly = draw_pos[1] + draw_size[1]*lh;
|
|
|
|
float lz = draw_pos[2] + (draw_size[2]*trow)/rdimy + .14f;
|
2003-10-10 23:36:19 +00:00
|
|
|
glVertex3f(xm,ly,lz);
|
|
|
|
glVertex3f(xm,y1,z1);
|
2003-09-19 22:40:32 +00:00
|
|
|
}
|
2004-07-13 13:54:09 +00:00
|
|
|
}
|
2003-10-05 06:03:08 +00:00
|
|
|
glEnd();
|
2003-10-31 22:37:46 +00:00
|
|
|
break;
|
2003-10-09 00:55:38 +00:00
|
|
|
case GRAPH_STYLE_WIREFRAME:
|
2003-10-05 06:03:08 +00:00
|
|
|
glLineWidth(1.0f);
|
|
|
|
z0 = draw_pos[2] + (draw_size[2]*row)/rdimy;
|
2004-07-13 13:54:09 +00:00
|
|
|
z1 = z0+.14f;
|
|
|
|
row0 = rrow(row);
|
|
|
|
if(row!=0) trow0 = rrow(trow);
|
|
|
|
|
2003-10-05 06:03:08 +00:00
|
|
|
glEnable(GL_LINE_SMOOTH);
|
2004-07-13 13:54:09 +00:00
|
|
|
glBegin(GL_LINES);
|
2003-10-09 00:21:49 +00:00
|
|
|
|
2003-10-05 06:03:08 +00:00
|
|
|
for (i=0; i<rdimx; i++) {
|
|
|
|
x0 = draw_pos[0] + (draw_size[0]*i)/rdimx;
|
|
|
|
x1 = x0 + draw_deltax*.8f;
|
|
|
|
h = (row0[i]-rdata_min)/(rdata_max-rdata_min);
|
|
|
|
|
|
|
|
y0 = draw_pos[1];
|
|
|
|
y1 = draw_pos[1] + draw_size[1]*h;
|
|
|
|
|
2003-10-09 00:21:49 +00:00
|
|
|
hue = hue0 + (dhue*i)/rdimx;
|
2003-10-05 06:03:08 +00:00
|
|
|
if (hue > 1) hue -= 1;
|
2003-10-09 00:21:49 +00:00
|
|
|
sat = 1.;
|
2004-07-13 13:54:09 +00:00
|
|
|
lum = .5 + h/2;
|
2003-10-05 06:03:08 +00:00
|
|
|
HLStoRGB(hue, lum, sat, color);
|
2004-07-13 13:54:09 +00:00
|
|
|
glColor4f(color.r, color.g, color.b, alpha);
|
|
|
|
|
|
|
|
if(i!=rdimx-1) glVertex3f(x0+((x1-x0)/2.0f), y1, z0);
|
2003-10-05 06:03:08 +00:00
|
|
|
if(row!=0)
|
|
|
|
{
|
|
|
|
float h2 = (trow0[i]-rdata_min)/(rdata_max-rdata_min);
|
|
|
|
float z2 = draw_pos[2] + (draw_size[2]*trow)/rdimy;
|
|
|
|
float y2 = draw_pos[1] + draw_size[1]*h2;
|
2004-07-13 13:54:09 +00:00
|
|
|
glVertex3f(x0+((x1-x0)/2.0f), y1, z0);
|
|
|
|
glVertex3f(x0+((x1-x0)/2.0f), y2, z2);
|
2003-10-05 06:03:08 +00:00
|
|
|
}
|
2003-10-09 00:21:49 +00:00
|
|
|
if(i!=0) glVertex3f(x0+((x1-x0)/2.0f), y1, z0);
|
2004-07-13 13:54:09 +00:00
|
|
|
}
|
2003-10-05 06:03:08 +00:00
|
|
|
glEnd();
|
|
|
|
glDisable(GL_LINE_SMOOTH);
|
2003-10-31 22:37:46 +00:00
|
|
|
break;
|
2003-10-09 00:55:38 +00:00
|
|
|
case GRAPH_STYLE_PLANES:
|
2003-10-05 06:03:08 +00:00
|
|
|
z0 = draw_pos[2] + (draw_size[2]*row)/rdimy;
|
2004-07-13 13:54:09 +00:00
|
|
|
z1 = z0+.14f;
|
|
|
|
row0 = rrow(row);
|
|
|
|
i=0;
|
2003-10-05 06:03:08 +00:00
|
|
|
|
|
|
|
x0 = draw_pos[0] + (draw_size[0]*i)/rdimx;
|
|
|
|
x1 = x0 + draw_deltax*.8f;
|
|
|
|
h = (row0[i]-rdata_min)/(rdata_max-rdata_min);
|
|
|
|
|
|
|
|
y0 = draw_pos[1];
|
|
|
|
y1 = draw_pos[1] + draw_size[1]*h;
|
2003-09-18 23:55:11 +00:00
|
|
|
|
2003-10-09 00:21:49 +00:00
|
|
|
hue = hue0 + (dhue*i)/rdimx;
|
|
|
|
if (hue > 1) hue -= 1;
|
|
|
|
sat = 1.;
|
2004-07-13 13:54:09 +00:00
|
|
|
lum = .5 + h/2;
|
2003-10-09 00:21:49 +00:00
|
|
|
HLStoRGB(hue, lum, sat, color);
|
2004-07-13 13:54:09 +00:00
|
|
|
glColor4f(color.r, color.g, color.b, alpha);
|
2003-10-09 00:21:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
glVertex3f(draw_pos[0],draw_pos[1],z0);
|
|
|
|
glVertex3f(draw_pos[0],draw_pos[1],draw_pos[2] + (draw_size[2]*trow)/rdimy);
|
2003-10-05 06:03:08 +00:00
|
|
|
|
|
|
|
glBegin(GL_QUAD_STRIP);
|
|
|
|
for (i=0; i<rdimx; i++) {
|
2003-09-18 23:55:11 +00:00
|
|
|
x0 = draw_pos[0] + (draw_size[0]*i)/rdimx;
|
|
|
|
x1 = x0 + draw_deltax*.8f;
|
|
|
|
h = (row0[i]-rdata_min)/(rdata_max-rdata_min);
|
|
|
|
|
|
|
|
y0 = draw_pos[1];
|
|
|
|
y1 = draw_pos[1] + draw_size[1]*h;
|
|
|
|
|
2005-02-16 23:30:29 +00:00
|
|
|
hue = hue0 + (dhue*i)/rdimx;
|
2003-10-05 06:03:08 +00:00
|
|
|
if (hue > 1) hue -= 1;
|
2005-02-16 23:30:29 +00:00
|
|
|
sat = 1.;
|
|
|
|
lum = .5 + h/2;
|
2003-10-05 06:03:08 +00:00
|
|
|
HLStoRGB(hue, lum, sat, color);
|
|
|
|
glColor4f(color.r, color.g, color.b, alpha);
|
|
|
|
|
|
|
|
glVertex3d(x1,y0,z0);
|
|
|
|
glVertex3d(x1,y1,z0);
|
|
|
|
}
|
2004-07-13 13:54:09 +00:00
|
|
|
glEnd();
|
2003-09-18 23:55:11 +00:00
|
|
|
break;
|
2004-07-13 13:54:09 +00:00
|
|
|
default:
|
2003-09-18 23:55:11 +00:00
|
|
|
break;
|
|
|
|
}
|
2003-01-29 21:13:15 +00:00
|
|
|
}
|
|
|
|
|
2007-10-22 23:12:42 +00:00
|
|
|
void REDUCED_ARRAY_RENDER::draw_row_rect_y(int row) {
|
2003-01-29 21:13:15 +00:00
|
|
|
float z0 = draw_pos[2] + (draw_size[2]*row)/rdimy;
|
|
|
|
float z1 = z0 + draw_deltaz*.8f;
|
|
|
|
float x0, y0, y1;
|
|
|
|
float* row0 = rrow(row);
|
|
|
|
int i;
|
|
|
|
|
|
|
|
glBegin(GL_QUADS);
|
|
|
|
for (i=0; i<rdimx-1; i++) {
|
|
|
|
x0 = draw_pos[0] + (draw_size[0]*i)/rdimx;
|
2003-02-19 00:06:05 +00:00
|
|
|
float h = (row0[i]-rdata_min)/(rdata_max-rdata_min);
|
2003-01-29 21:13:15 +00:00
|
|
|
|
|
|
|
y0 = draw_pos[1];
|
|
|
|
y1 = draw_pos[1] + draw_size[1]*h;
|
|
|
|
|
|
|
|
double hue = hue0 + (dhue*i)/rdimx;
|
|
|
|
if (hue > 1) hue -= 1;
|
|
|
|
double sat = 1.;
|
|
|
|
double lum = .5 + h/2;
|
|
|
|
COLOR color;
|
|
|
|
HLStoRGB(hue, lum, sat, color);
|
2003-02-28 23:32:20 +00:00
|
|
|
glColor4f(color.r, color.g, color.b, alpha);
|
2003-01-29 21:13:15 +00:00
|
|
|
|
|
|
|
glVertex3f(x0, y0, z0);
|
|
|
|
glVertex3f(x0, y1, z0);
|
|
|
|
glVertex3f(x0, y1, z1);
|
|
|
|
glVertex3f(x0, y0, z1);
|
|
|
|
}
|
|
|
|
glEnd();
|
|
|
|
|
|
|
|
// draw a black line on top of rectangle
|
|
|
|
//
|
2004-10-13 22:52:37 +00:00
|
|
|
#if 0
|
2003-01-29 21:13:15 +00:00
|
|
|
glBegin(GL_LINES);
|
2003-03-04 23:57:25 +00:00
|
|
|
glColor4f(0., 0., 0., 1.0);
|
2003-01-29 21:13:15 +00:00
|
|
|
for (i=0; i<rdimx-1; i++) {
|
|
|
|
x0 = draw_pos[0] + (draw_size[0]*i)/rdimx;
|
2003-02-19 00:06:05 +00:00
|
|
|
float h = (row0[i]-rdata_min)/(rdata_max-rdata_min);
|
2003-01-29 21:13:15 +00:00
|
|
|
|
|
|
|
y1 = draw_pos[1] + draw_size[1]*h;
|
|
|
|
|
|
|
|
glVertex3f(x0, y1, z0);
|
|
|
|
glVertex3f(x0, y1, z1);
|
|
|
|
}
|
|
|
|
glEnd();
|
2004-10-13 22:52:37 +00:00
|
|
|
#endif
|
2003-01-29 21:13:15 +00:00
|
|
|
}
|
|
|
|
|
2003-09-18 23:55:11 +00:00
|
|
|
|
|
|
|
|
2007-10-22 23:12:42 +00:00
|
|
|
void REDUCED_ARRAY_RENDER::draw_row_line(int ) {
|
2003-01-29 21:13:15 +00:00
|
|
|
}
|
|
|
|
|
2007-10-22 23:12:42 +00:00
|
|
|
void REDUCED_ARRAY_RENDER::draw(int r0, int rn) {
|
2003-09-26 20:10:45 +00:00
|
|
|
int i;
|
|
|
|
mode_unshaded();
|
2007-10-22 23:12:42 +00:00
|
|
|
for (i=r0; i<rn; i++) {
|
|
|
|
draw_row_rect_x(i);
|
2003-09-26 20:10:45 +00:00
|
|
|
}
|
|
|
|
ndrawn_rows = rn;
|
|
|
|
}
|
|
|
|
|
2007-10-22 23:12:42 +00:00
|
|
|
void REDUCED_ARRAY_RENDER::draw_all() {
|
|
|
|
draw(0, rdimy);
|
2003-01-29 21:13:15 +00:00
|
|
|
}
|
|
|
|
|
2007-10-22 23:12:42 +00:00
|
|
|
void REDUCED_ARRAY_RENDER::draw_new() {
|
|
|
|
draw(ndrawn_rows, rdimy);
|
2003-02-06 00:24:30 +00:00
|
|
|
}
|
|
|
|
|
2007-10-22 23:12:42 +00:00
|
|
|
void REDUCED_ARRAY_RENDER::draw_part(double frac) {
|
|
|
|
int nr = (int)(rdimy*frac);
|
2003-09-26 20:10:45 +00:00
|
|
|
draw(0, nr);
|
|
|
|
}
|
|
|
|
|
2007-10-22 23:12:42 +00:00
|
|
|
void REDUCED_ARRAY_RENDER::draw_axis_labels() {
|
2003-09-10 23:44:46 +00:00
|
|
|
GLfloat char_height = .5f;
|
|
|
|
GLfloat line_width = 3.0f;
|
|
|
|
GLfloat spacing = 2.0f;
|
|
|
|
GLfloat rotation = -90;
|
|
|
|
GLfloat rotation_vector[3] = {0,0,0};
|
|
|
|
|
|
|
|
float w;
|
|
|
|
|
2005-02-16 23:30:29 +00:00
|
|
|
const char* x_label = "Time";
|
2004-10-13 22:52:37 +00:00
|
|
|
#if 0
|
2003-09-10 23:44:46 +00:00
|
|
|
char* y_label = "Frequency";
|
|
|
|
char* y_begin_label = "0";
|
|
|
|
char* y_end_label = "9 Khz";
|
2004-10-13 22:52:37 +00:00
|
|
|
#endif
|
2003-09-10 23:44:46 +00:00
|
|
|
|
|
|
|
float x_text_pos[3] = {0,0,0};
|
|
|
|
w = text_width(x_label);
|
2003-09-15 23:53:11 +00:00
|
|
|
x_text_pos[0]=draw_pos[0];//+draw_size[0];
|
2003-09-10 23:44:46 +00:00
|
|
|
x_text_pos[1]=draw_pos[1];//+draw_size[1];
|
|
|
|
x_text_pos[2]=draw_pos[2]+draw_size[2]-(w/2.0f);
|
|
|
|
|
|
|
|
rotation_vector[0]=0;
|
|
|
|
rotation_vector[1]=draw_size[1];
|
|
|
|
rotation_vector[2]=0;
|
|
|
|
|
|
|
|
draw_rotated_text(x_text_pos,char_height,line_width,spacing,x_label,rotation,rotation_vector);
|
|
|
|
//draw_text_line(x_text_pos,char_height,line_width,x_label,0);
|
2004-07-13 13:54:09 +00:00
|
|
|
|
2003-09-10 23:44:46 +00:00
|
|
|
}
|
|
|
|
|
2007-10-22 23:12:42 +00:00
|
|
|
void REDUCED_ARRAY_RENDER::draw_axes() {
|
2003-09-17 23:17:09 +00:00
|
|
|
|
2003-10-31 22:37:46 +00:00
|
|
|
// comment??
|
|
|
|
|
2003-10-16 21:06:10 +00:00
|
|
|
float adj2=0.0f;//-(draw_size[2]*1)/rdimy;
|
2003-09-19 22:40:32 +00:00
|
|
|
float adj=0.0f;
|
2003-10-14 22:30:52 +00:00
|
|
|
|
|
|
|
float adj3=0;
|
2003-09-17 23:17:09 +00:00
|
|
|
// box
|
2003-09-10 23:44:46 +00:00
|
|
|
mode_unshaded();
|
2004-07-13 13:54:09 +00:00
|
|
|
|
2003-09-17 23:17:09 +00:00
|
|
|
glLineWidth(.5);
|
2003-09-10 23:44:46 +00:00
|
|
|
glBegin(GL_LINES);
|
2004-07-13 13:54:09 +00:00
|
|
|
glColor4d(1,1,1,.5);
|
|
|
|
|
2003-09-24 22:36:57 +00:00
|
|
|
//back square
|
|
|
|
glVertex3f(draw_pos[0], draw_pos[1], draw_pos[2]+adj);
|
|
|
|
glVertex3f(draw_pos[0]+draw_size[0], draw_pos[1], draw_pos[2]+adj);
|
2003-09-10 23:44:46 +00:00
|
|
|
|
2003-09-24 22:36:57 +00:00
|
|
|
glVertex3f(draw_pos[0], draw_pos[1], draw_pos[2]+adj);
|
|
|
|
glVertex3f(draw_pos[0], draw_pos[1]+draw_size[1], draw_pos[2]+adj);
|
2003-09-10 23:44:46 +00:00
|
|
|
|
2003-09-24 22:36:57 +00:00
|
|
|
glVertex3f(draw_pos[0]+draw_size[0], draw_pos[1], draw_pos[2]+adj);
|
|
|
|
glVertex3f(draw_pos[0]+draw_size[0], draw_pos[1]+draw_size[1], draw_pos[2]+adj);
|
2003-09-10 23:44:46 +00:00
|
|
|
|
2003-09-24 22:36:57 +00:00
|
|
|
glVertex3f(draw_pos[0], draw_pos[1]+draw_size[1], draw_pos[2]+adj);
|
|
|
|
glVertex3f(draw_pos[0]+draw_size[0], draw_pos[1]+draw_size[1], draw_pos[2]+adj);
|
2003-09-10 23:44:46 +00:00
|
|
|
|
2003-09-24 22:36:57 +00:00
|
|
|
//front square
|
2003-09-19 22:40:32 +00:00
|
|
|
glVertex3f(draw_pos[0], draw_pos[1], draw_pos[2]+draw_size[2]+adj2);
|
|
|
|
glVertex3f(draw_pos[0]+draw_size[0], draw_pos[1], draw_pos[2]+draw_size[2]+adj2);
|
2003-09-10 23:44:46 +00:00
|
|
|
|
2003-09-19 22:40:32 +00:00
|
|
|
glVertex3f(draw_pos[0], draw_pos[1], draw_pos[2]+draw_size[2]+adj2);
|
|
|
|
glVertex3f(draw_pos[0], draw_pos[1]+draw_size[1], draw_pos[2]+draw_size[2]+adj2);
|
2003-09-10 23:44:46 +00:00
|
|
|
|
2003-09-19 22:40:32 +00:00
|
|
|
glVertex3f(draw_pos[0]+draw_size[0], draw_pos[1], draw_pos[2]+draw_size[2]+adj2);
|
|
|
|
glVertex3f(draw_pos[0]+draw_size[0], draw_pos[1]+draw_size[1], draw_pos[2]+draw_size[2]+adj2);
|
2003-09-10 23:44:46 +00:00
|
|
|
|
2003-09-19 22:40:32 +00:00
|
|
|
glVertex3f(draw_pos[0], draw_pos[1]+draw_size[1], draw_pos[2]+draw_size[2]+adj2);
|
|
|
|
glVertex3f(draw_pos[0]+draw_size[0], draw_pos[1]+draw_size[1], draw_pos[2]+draw_size[2]+adj2);
|
2004-07-13 13:54:09 +00:00
|
|
|
|
2003-09-10 23:44:46 +00:00
|
|
|
//connecting lines
|
2003-09-24 22:36:57 +00:00
|
|
|
glVertex3f(draw_pos[0], draw_pos[1], draw_pos[2]+adj);
|
2003-09-19 22:40:32 +00:00
|
|
|
glVertex3f(draw_pos[0], draw_pos[1], draw_pos[2]+draw_size[2]+adj2);
|
2003-09-10 23:44:46 +00:00
|
|
|
|
2003-09-24 22:36:57 +00:00
|
|
|
glVertex3f(draw_pos[0]+draw_size[0], draw_pos[1], draw_pos[2]+adj);
|
2003-09-19 22:40:32 +00:00
|
|
|
glVertex3f(draw_pos[0]+draw_size[0], draw_pos[1], draw_pos[2]+draw_size[2]+adj2);
|
2003-09-10 23:44:46 +00:00
|
|
|
|
2003-09-24 22:36:57 +00:00
|
|
|
glVertex3f(draw_pos[0], draw_pos[1]+draw_size[1], draw_pos[2]+adj);
|
2003-09-19 22:40:32 +00:00
|
|
|
glVertex3f(draw_pos[0], draw_pos[1]+draw_size[1], draw_pos[2]+draw_size[2]+adj2);
|
2003-09-10 23:44:46 +00:00
|
|
|
|
2003-09-24 22:36:57 +00:00
|
|
|
glVertex3f(draw_pos[0]+draw_size[0], draw_pos[1]+draw_size[1], draw_pos[2]+adj);
|
2003-09-19 22:40:32 +00:00
|
|
|
glVertex3f(draw_pos[0]+draw_size[0], draw_pos[1]+draw_size[1], draw_pos[2]+draw_size[2]+adj2);
|
2003-09-10 23:44:46 +00:00
|
|
|
glEnd();
|
|
|
|
|
2003-09-17 23:17:09 +00:00
|
|
|
|
2003-09-15 23:53:11 +00:00
|
|
|
mode_unshaded();
|
2004-07-13 13:54:09 +00:00
|
|
|
|
2003-09-15 23:53:11 +00:00
|
|
|
glLineWidth(1.0);
|
|
|
|
glEnable(GL_LINE_SMOOTH);
|
|
|
|
glBegin(GL_LINES);
|
2004-07-13 13:54:09 +00:00
|
|
|
glColor4d(1,1,1,1);
|
|
|
|
|
|
|
|
|
2003-09-24 22:36:57 +00:00
|
|
|
glVertex3f(draw_pos[0], draw_pos[1], draw_pos[2]+adj);
|
|
|
|
glVertex3f(draw_pos[0]+draw_size[0], draw_pos[1], draw_pos[2]+adj);
|
2003-09-15 23:53:11 +00:00
|
|
|
|
2003-09-24 22:36:57 +00:00
|
|
|
glVertex3f(draw_pos[0], draw_pos[1], draw_pos[2]+adj);
|
2003-09-19 22:40:32 +00:00
|
|
|
glVertex3f(draw_pos[0], draw_pos[1], draw_pos[2]+draw_size[2]+adj2);
|
2003-09-10 23:44:46 +00:00
|
|
|
|
2003-09-24 22:36:57 +00:00
|
|
|
glVertex3f(draw_pos[0]+draw_size[0], draw_pos[1], draw_pos[2]+adj);
|
2003-09-19 22:40:32 +00:00
|
|
|
glVertex3f(draw_pos[0]+draw_size[0], draw_pos[1], draw_pos[2]+draw_size[2]+adj2);
|
2003-09-10 23:44:46 +00:00
|
|
|
|
2003-09-19 22:40:32 +00:00
|
|
|
glVertex3f(draw_pos[0]+draw_size[0], draw_pos[1], draw_pos[2]+draw_size[2]+adj2);
|
|
|
|
glVertex3f(draw_pos[0], draw_pos[1], draw_pos[2]+draw_size[2]+adj2);
|
2003-09-10 23:44:46 +00:00
|
|
|
|
2004-07-13 13:54:09 +00:00
|
|
|
glEnd();
|
|
|
|
|
2003-10-14 22:30:52 +00:00
|
|
|
glColor4d(1,1,1,.2);
|
2004-07-13 13:54:09 +00:00
|
|
|
glBegin(GL_QUADS);
|
|
|
|
glVertex3f(draw_pos[0], draw_pos[1]-adj3, draw_pos[2]+draw_size[2]+adj2);
|
2003-10-14 22:30:52 +00:00
|
|
|
glVertex3f(draw_pos[0]+draw_size[0], draw_pos[1]-adj3, draw_pos[2]+draw_size[2]+adj2);
|
|
|
|
glVertex3f(draw_pos[0]+draw_size[0], draw_pos[1]-adj3, draw_pos[2]+adj);
|
2004-07-13 13:54:09 +00:00
|
|
|
glVertex3f(draw_pos[0], draw_pos[1]-adj3, draw_pos[2]+adj);
|
2003-01-29 21:13:15 +00:00
|
|
|
glEnd();
|
2003-10-14 22:30:52 +00:00
|
|
|
|
2003-09-16 23:45:29 +00:00
|
|
|
glDisable(GL_LINE_SMOOTH);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2007-10-22 23:12:42 +00:00
|
|
|
void REDUCED_ARRAY_RENDER::draw_labels() {
|
2004-07-13 13:54:09 +00:00
|
|
|
double model[16];
|
2003-09-17 23:17:09 +00:00
|
|
|
double proj[16];
|
|
|
|
double z_pos[3];
|
|
|
|
double x_pos[3];
|
2003-09-22 22:22:20 +00:00
|
|
|
double p_pos[3];
|
2003-09-17 23:17:09 +00:00
|
|
|
|
2003-09-22 22:22:20 +00:00
|
|
|
float arrowh = .35f;
|
|
|
|
float arroww = .05f;
|
|
|
|
|
2003-10-16 21:06:10 +00:00
|
|
|
float ch = .015f;
|
2004-07-13 13:54:09 +00:00
|
|
|
float lw = .02f;
|
2003-10-16 21:06:10 +00:00
|
|
|
float ls = 0;
|
|
|
|
|
2004-10-13 22:52:37 +00:00
|
|
|
#if 0
|
2003-10-16 21:06:10 +00:00
|
|
|
float wd=.015f;
|
|
|
|
float l=1.0f;
|
2003-10-31 22:37:46 +00:00
|
|
|
|
2003-10-16 21:06:10 +00:00
|
|
|
float left_of_z = -0.1f;
|
|
|
|
float left_of_z2 = -0.04f;
|
|
|
|
float below_x = -.03f;
|
|
|
|
float center_x = -.06f;
|
2004-10-13 22:52:37 +00:00
|
|
|
#endif
|
2003-10-16 21:06:10 +00:00
|
|
|
|
2003-09-22 22:22:20 +00:00
|
|
|
glLineWidth(1.4f);
|
|
|
|
glBegin(GL_LINES);
|
|
|
|
glColor3f(1,1,1);
|
|
|
|
glVertex3f(draw_pos[0]+draw_size[0]+.4f,draw_pos[1],draw_pos[2]+draw_size[2]-.5f);
|
|
|
|
glVertex3f(draw_pos[0]+draw_size[0]+.4f,draw_pos[1]+1.2f,draw_pos[2]+draw_size[2]-.5f);
|
|
|
|
glEnd();
|
|
|
|
|
|
|
|
glBegin(GL_TRIANGLE_FAN);
|
|
|
|
glVertex3f(draw_pos[0]+draw_size[0]+.4f,draw_pos[1]+1.2f+arrowh,draw_pos[2]+draw_size[2]-.5f);
|
|
|
|
|
|
|
|
glVertex3f(draw_pos[0]+draw_size[0]+.4f-arroww,draw_pos[1]+1.2f,draw_pos[2]+draw_size[2]-.5f-arroww);
|
|
|
|
glVertex3f(draw_pos[0]+draw_size[0]+.4f+arroww,draw_pos[1]+1.2f,draw_pos[2]+draw_size[2]-.5f-arroww);
|
|
|
|
glVertex3f(draw_pos[0]+draw_size[0]+.4f+arroww,draw_pos[1]+1.2f,draw_pos[2]+draw_size[2]-.5f+arroww);
|
|
|
|
glVertex3f(draw_pos[0]+draw_size[0]+.4f-arroww,draw_pos[1]+1.2f,draw_pos[2]+draw_size[2]-.5f+arroww);
|
|
|
|
glVertex3f(draw_pos[0]+draw_size[0]+.4f-arroww,draw_pos[1]+1.2f,draw_pos[2]+draw_size[2]-.5f-arroww);
|
|
|
|
glEnd();
|
|
|
|
|
2003-09-17 23:17:09 +00:00
|
|
|
int viewport[4];
|
2003-10-16 21:06:10 +00:00
|
|
|
get_matrix(model);
|
2004-07-13 13:54:09 +00:00
|
|
|
get_projection(proj);
|
2003-09-18 23:55:11 +00:00
|
|
|
get_viewport(viewport);
|
2003-10-16 21:06:10 +00:00
|
|
|
int w = viewport[2];
|
|
|
|
int h = viewport[3];
|
2003-09-17 23:17:09 +00:00
|
|
|
|
2003-10-16 21:06:10 +00:00
|
|
|
glPushMatrix();
|
|
|
|
//unscale modelview matrix
|
2004-07-13 13:54:09 +00:00
|
|
|
|
|
|
|
double aspect_ratio = 4.0/3.0;
|
2003-10-31 22:37:46 +00:00
|
|
|
if ((double)h*aspect_ratio > (double)w) {
|
2004-07-13 13:54:09 +00:00
|
|
|
model[1]*=1.0f/(((double)w/aspect_ratio)/(double)h);
|
2003-10-17 22:28:40 +00:00
|
|
|
model[5]*=1.0f/(((double)w/aspect_ratio)/(double)h);
|
|
|
|
model[9]*=1.0f/(((double)w/aspect_ratio)/(double)h);
|
2004-07-13 13:54:09 +00:00
|
|
|
} else {
|
|
|
|
model[0]*=1.0f/(((double)h*aspect_ratio)/(double)w);
|
2003-10-17 22:28:40 +00:00
|
|
|
model[4]*=1.0f/(((double)h*aspect_ratio)/(double)w);
|
|
|
|
model[8]*=1.0f/(((double)h*aspect_ratio)/(double)w);
|
2004-07-13 13:54:09 +00:00
|
|
|
}
|
2003-10-16 21:06:10 +00:00
|
|
|
|
2004-07-13 13:54:09 +00:00
|
|
|
//project to ortho coordinates
|
2003-10-16 21:06:10 +00:00
|
|
|
viewport[0]=0;
|
|
|
|
viewport[1]=0;
|
|
|
|
viewport[2]=1;
|
|
|
|
viewport[3]=1;
|
|
|
|
|
2003-09-17 23:17:09 +00:00
|
|
|
get_2d_positions(draw_pos[0],draw_pos[1],draw_pos[2]+(draw_size[2]/2.0f),
|
2003-10-05 06:03:08 +00:00
|
|
|
model, proj, viewport,z_pos
|
|
|
|
);
|
2004-07-13 13:54:09 +00:00
|
|
|
|
2003-09-17 23:17:09 +00:00
|
|
|
get_2d_positions(draw_pos[0]+draw_size[0]/2.0f,draw_pos[1],draw_pos[2]+draw_size[2],
|
2003-10-05 06:03:08 +00:00
|
|
|
model, proj, viewport,x_pos
|
|
|
|
);
|
2003-09-16 23:45:29 +00:00
|
|
|
|
2003-10-17 22:28:40 +00:00
|
|
|
get_2d_positions(draw_pos[0]+draw_size[0]+.2f,draw_pos[1]+.6f,draw_pos[2]+draw_size[2]-.4f,
|
2003-10-05 06:03:08 +00:00
|
|
|
model, proj, viewport,p_pos
|
|
|
|
);
|
2003-10-16 21:06:10 +00:00
|
|
|
glPopMatrix();
|
2003-09-17 23:17:09 +00:00
|
|
|
|
2003-10-16 21:06:10 +00:00
|
|
|
mode_ortho();
|
2004-07-13 13:54:09 +00:00
|
|
|
mode_unshaded();
|
|
|
|
glColor3d(1,1,1);
|
2003-09-22 22:22:20 +00:00
|
|
|
|
2003-10-16 21:06:10 +00:00
|
|
|
float zpos[3]={(float)z_pos[0],(float)z_pos[1],(float)z_pos[2]};
|
|
|
|
float xpos[3]={(float)x_pos[0],(float)x_pos[1],(float)x_pos[2]};
|
2004-07-13 13:54:09 +00:00
|
|
|
float ppos[3]={(float)p_pos[0],(float)p_pos[1],(float)p_pos[2]};
|
2003-09-18 23:55:11 +00:00
|
|
|
|
2003-10-16 21:06:10 +00:00
|
|
|
draw_text_right(zpos,ch,lw,ls,zlabel);
|
|
|
|
draw_text(xpos,ch,lw,ls,xlabel);
|
2003-10-24 21:21:46 +00:00
|
|
|
draw_text(ppos,ch,lw,ls,ylabel);
|
2004-07-13 13:54:09 +00:00
|
|
|
|
|
|
|
ortho_done();
|
|
|
|
}
|
2004-12-08 00:40:19 +00:00
|
|
|
|
2005-02-11 04:46:01 +00:00
|
|
|
const char *BOINC_RCSID_f4749d0d37="$Id$";
|