//-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- bool DrawableVectors::rayIntersectCreateDetail(const Ray& ray, Vec3d* intersectionPoint, ref<HitDetail>* hitDetail) const { CVF_UNUSED(ray); CVF_UNUSED(intersectionPoint); CVF_UNUSED(hitDetail); return false; }
//-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- void Clipping::onPropertyChanged(Property* property, PostEventAction* postEventAction) { CVF_UNUSED(property); configureClipPlaneSetFromProperties(); *postEventAction = REDRAW; }
//-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- void QSRPropGuiBindingBool::updateWidget(UpdateAction action) { CVF_UNUSED(action); CVF_ASSERT(m_widget); m_widget->blockSignals(true); m_widget->setChecked(m_property->value()); m_widget->blockSignals(false); }
//-------------------------------------------------------------------------------------------------- /// Get font located on file. Load if needed. //-------------------------------------------------------------------------------------------------- ref<Font> FontManager::getFontFromFile(const String& path) { CVF_UNUSED(path); CVF_ASSERT(!path.isEmpty()); // Not supported in this class return NULL; }
//-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- void OverlayNavigationCube::renderCubeGeos(OpenGLContext* oglContext, bool software, const MatrixState& matrixState) { CVF_UNUSED(software); for (size_t i = 0; i < m_cubeGeos.size(); ++i) { m_cubeGeos[i]->render(oglContext, m_cubeGeoShader.p(), matrixState); } }
//-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- void Rendering::removeOverlayItem(const OverlayItem* overlayItem) { CVF_UNUSED(overlayItem); std::vector<OverlayItemLayout>::iterator it; for (it = m_overlayItems.begin(); it != m_overlayItems.end(); it++) { if (it->overlayItem == overlayItem) { m_overlayItems.erase(it); break; } } }
//-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- void OpenGL::clearOpenGLError(OpenGLContext* oglContext) { // glGetError will end up in an endless loop if no context is current CVF_ASSERT(oglContext); CVF_ASSERT(oglContext->isCurrent()); CVF_UNUSED(oglContext); cvfGLenum err = glGetError(); // Empty all error flags while (err != GL_NO_ERROR) { err = glGetError(); } }
//-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- bool OpenGL::hasOpenGLError(OpenGLContext* oglContext) { // glGetError will end up in an endless loop if no context is current CVF_ASSERT(oglContext); CVF_ASSERT(oglContext->isCurrent()); CVF_UNUSED(oglContext); cvfGLenum err = glGetError(); if (err == GL_NO_ERROR) { return false; } else { // Empty all error flags while (err != GL_NO_ERROR) { err = glGetError(); } return true; } }
//-------------------------------------------------------------------------------------------------- /// Draw the legend using immediate mode OpenGL //-------------------------------------------------------------------------------------------------- void OverlayColorLegend::renderLegendImmediateMode(OpenGLContext* oglContext, OverlayColorLegendLayoutInfo* layout) { #ifdef CVF_OPENGL_ES CVF_UNUSED(layout); CVF_FAIL_MSG("Not supported on OpenGL ES"); #else CVF_TIGHT_ASSERT(layout); CVF_TIGHT_ASSERT(layout->size.x() > 0); CVF_TIGHT_ASSERT(layout->size.y() > 0); Depth depth(false); depth.applyOpenGL(oglContext); Lighting_FF lighting(false); lighting.applyOpenGL(oglContext); // All vertices. Initialized here to set Z to zero once and for all. static float vertexArray[] = { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, }; // Per vector convenience pointers float* v0 = &vertexArray[0]; float* v1 = &vertexArray[3]; float* v2 = &vertexArray[6]; float* v3 = &vertexArray[9]; float* v4 = &vertexArray[12]; // Constant coordinates v0[0] = v3[0] = layout->x0; v1[0] = v4[0] = layout->x1; // Render color bar as one colored quad per pixel int legendHeightPixelCount = static_cast<int>(layout->tickPixelPos->get(m_tickValues.size() - 1) - layout->tickPixelPos->get(0) + 0.01); if (m_scalarMapper.notNull()) { int iPx; for (iPx = 0; iPx < legendHeightPixelCount; iPx++) { const Color3ub& clr = m_scalarMapper->mapToColor(m_scalarMapper->domainValue((iPx+0.5)/legendHeightPixelCount)); float y0 = static_cast<float>(layout->legendRect.min().y() + iPx); float y1 = static_cast<float>(layout->legendRect.min().y() + iPx + 1); // Dynamic coordinates for rectangle v0[1] = v1[1] = y0; v3[1] = v4[1] = y1; // Draw filled rectangle elements glColor3ubv(clr.ptr()); glBegin(GL_TRIANGLE_FAN); glVertex3fv(v0); glVertex3fv(v1); glVertex3fv(v4); glVertex3fv(v3); glEnd(); } } // Render frame // Dynamic coordinates for tickmarks-lines bool isRenderingFrame = true; if (isRenderingFrame) { v0[0] = v2[0] = layout->legendRect.min().x()-0.5f; v1[0] = v3[0] = layout->legendRect.max().x()-0.5f; v0[1] = v1[1] = layout->legendRect.min().y()-0.5f; v2[1] = v3[1] = layout->legendRect.max().y()-0.5f; glColor3fv(m_color.ptr()); glBegin(GL_LINES); glVertex3fv(v0); glVertex3fv(v1); glVertex3fv(v1); glVertex3fv(v3); glVertex3fv(v3); glVertex3fv(v2); glVertex3fv(v2); glVertex3fv(v0); glEnd(); } // Render tickmarks bool isRenderingTicks = true; if (isRenderingTicks) { // Constant coordinates v0[0] = layout->x0; v1[0] = layout->x1 - 0.5f*(layout->tickX - layout->x1) - 0.5f; v2[0] = layout->x1; v3[0] = layout->tickX - 0.5f*(layout->tickX - layout->x1) - 0.5f; v4[0] = layout->tickX; size_t ic; for (ic = 0; ic < m_tickValues.size(); ic++) { float y0 = static_cast<float>(layout->legendRect.min().y() + layout->tickPixelPos->get(ic) - 0.5f); // Dynamic coordinates for tickmarks-lines v0[1] = v1[1] = v2[1] = v3[1] = v4[1] = y0; glColor3fv(m_color.ptr()); glBegin(GL_LINES); if ( m_visibleTickLabels[ic]) { glVertex3fv(v0); glVertex3fv(v4); } else { glVertex3fv(v2); glVertex3fv(v3); } glEnd(); } } // Reset render states Lighting_FF resetLighting; resetLighting.applyOpenGL(oglContext); Depth resetDepth; resetDepth.applyOpenGL(oglContext); CVF_CHECK_OGL(oglContext); #endif // CVF_OPENGL_ES }
//-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- void GeometryBuilder::setTotalVertexCountHint(size_t totalVertexCountHint) { CVF_UNUSED(totalVertexCountHint); // Nothing here, may be used in derived classes }
//-------------------------------------------------------------------------------------------------- /// Get embedded font. Load if needed //-------------------------------------------------------------------------------------------------- ref<Font> FontManager::getEmbeddedFont(EmbeddedFont font) { CVF_UNUSED(font); return NULL; }
//-------------------------------------------------------------------------------------------------- /// Get already loaded font //-------------------------------------------------------------------------------------------------- ref<Font> FontManager::getFontById(uint id) { CVF_UNUSED(id); return NULL; }