| 121 | } |
| 122 | |
| 123 | void Plot3DOpenGLCanvas::renderText_(double x, double y, double z, const QString & text) |
| 124 | { |
| 125 | // project to screen coordinates |
| 126 | GLdouble textPosX = 0, textPosY = 0; |
| 127 | project_(x, y, z, &textPosX, &textPosY); |
| 128 | const int height = this->height(); |
| 129 | textPosY = height - textPosY; // y is inverted |
| 130 | |
| 131 | // cout << x << " " << y << " " << z << " : " << textPosX << " " << textPosY << " " << textPosZ << endl; |
| 132 | |
| 133 | // render text using the current font and color |
| 134 | painter_->drawText(textPosX, textPosY, text); |
| 135 | } |
| 136 | |
| 137 | void Plot3DOpenGLCanvas::qglColor_(const QColor& color) |
| 138 | { |