Changeset 3844 for branches/1.3/packages/vizservers/vtkvis/Renderer.cpp
- Timestamp:
- Jul 26, 2013, 6:00:09 PM (11 years ago)
- Location:
- branches/1.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.3
-
branches/1.3/packages/vizservers/vtkvis/Renderer.cpp
r3683 r3844 17 17 #endif 18 18 19 #ifdef USE_FONT_CONFIG 20 #include <vtkFreeTypeTools.h> 21 #endif 19 22 #include <vtkMath.h> 20 23 #include <vtkCamera.h> … … 42 45 #include "ColorMap.h" 43 46 #include "Trace.h" 44 45 #define NEW_SCALAR_BAR46 47 47 48 #define MSECS_ELAPSED(t1, t2) \ … … 120 121 if (_cameraMode == IMAGE) 121 122 _activeClipPlanes->AddItem(_cameraClipPlanes[3]); 123 124 #ifdef USE_FONT_CONFIG 125 vtkFreeTypeTools *typeTools = vtkFreeTypeTools::GetInstance(); 126 typeTools->ForceCompiledFontsOff(); 127 TRACE("FreeTypeTools impl: %s", typeTools->GetClassName()); 128 #endif 129 122 130 _renderer = vtkSmartPointer<vtkRenderer>::New(); 123 131 … … 184 192 deleteAllGraphicsObjects<Group>(); 185 193 deleteAllGraphicsObjects<HeightMap>(); 194 deleteAllGraphicsObjects<Image>(); 186 195 deleteAllGraphicsObjects<LIC>(); 187 196 deleteAllGraphicsObjects<Line>(); … … 193 202 deleteAllGraphicsObjects<Sphere>(); 194 203 deleteAllGraphicsObjects<Streamlines>(); 204 deleteAllGraphicsObjects<Text3D>(); 195 205 deleteAllGraphicsObjects<Volume>(); 196 206 deleteAllGraphicsObjects<Warp>(); … … 264 274 deleteGraphicsObject<Glyphs>(itr->second->getName()); 265 275 deleteGraphicsObject<HeightMap>(itr->second->getName()); 276 deleteGraphicsObject<Image>(itr->second->getName()); 266 277 deleteGraphicsObject<LIC>(itr->second->getName()); 267 278 deleteGraphicsObject<Molecule>(itr->second->getName()); … … 1555 1566 updateGraphicsObjectColorMap<Glyphs>(cmap); 1556 1567 updateGraphicsObjectColorMap<HeightMap>(cmap); 1568 updateGraphicsObjectColorMap<Image>(cmap); 1557 1569 updateGraphicsObjectColorMap<LIC>(cmap); 1558 1570 updateGraphicsObjectColorMap<Molecule>(cmap); 1571 updateGraphicsObjectColorMap<PolyData>(cmap); 1559 1572 updateGraphicsObjectColorMap<PseudoColor>(cmap); 1560 1573 updateGraphicsObjectColorMap<Streamlines>(cmap); … … 1579 1592 if (graphicsObjectColorMapUsed<HeightMap>(cmap)) 1580 1593 return true; 1594 if (graphicsObjectColorMapUsed<Image>(cmap)) 1595 return true; 1581 1596 if (graphicsObjectColorMapUsed<LIC>(cmap)) 1582 1597 return true; 1583 1598 if (graphicsObjectColorMapUsed<Molecule>(cmap)) 1599 return true; 1600 if (graphicsObjectColorMapUsed<PolyData>(cmap)) 1584 1601 return true; 1585 1602 if (graphicsObjectColorMapUsed<PseudoColor>(cmap)) … … 1931 1948 #ifdef NEW_SCALAR_BAR 1932 1949 _scalarBarActor->SetBarRatio(1); 1950 _scalarBarActor->SetTitleRatio(0); 1933 1951 #endif 1934 1952 if (width > height) { … … 1958 1976 #ifdef NEW_SCALAR_BAR 1959 1977 _scalarBarActor->SetBarRatio(0.375); 1978 _scalarBarActor->SetTitleRatio(0.5); 1960 1979 _scalarBarActor->SetDisplayPosition(0, 0); 1961 1980 _scalarBarActor->GetPosition2Coordinate()->SetCoordinateSystemToDisplay(); … … 2125 2144 _scalarBarActor->GetLabelTextProperty()->ShadowOff(); 2126 2145 #ifdef NEW_SCALAR_BAR 2127 if ( title.empty()&& numLabels == 0) {2146 if (!drawTitle && numLabels == 0) { 2128 2147 _scalarBarActor->DrawAnnotationsOff(); 2129 2148 _scalarBarActor->SetAnnotationLeaderPadding(0); … … 2137 2156 2138 2157 _legendRenderWindow->Render(); 2158 int *sz = _legendRenderWindow->GetSize(); 2159 if (sz[0] != width || sz[1] != height) { 2160 ERROR("Window size: %dx%d, but expected %dx%d", sz[0], sz[1], width, height); 2161 } 2162 2163 #ifdef RENDER_TARGA 2164 _legendRenderWindow->MakeCurrent(); 2165 // Must clear previous errors first. 2166 while (glGetError() != GL_NO_ERROR){ 2167 ; 2168 } 2169 int bytesPerPixel = TARGA_BYTES_PER_PIXEL; 2170 int size = bytesPerPixel * width * height; 2171 2172 if (imgData->GetMaxId() + 1 != size) 2173 { 2174 imgData->SetNumberOfComponents(bytesPerPixel); 2175 imgData->SetNumberOfValues(size); 2176 } 2177 glDisable(GL_TEXTURE_2D); 2178 if (_legendRenderWindow->GetDoubleBuffer()) { 2179 glReadBuffer(static_cast<GLenum>(vtkOpenGLRenderWindow::SafeDownCast(_legendRenderWindow)->GetBackLeftBuffer())); 2180 } else { 2181 glReadBuffer(static_cast<GLenum>(vtkOpenGLRenderWindow::SafeDownCast(_legendRenderWindow)->GetFrontLeftBuffer())); 2182 } 2183 glPixelStorei(GL_PACK_ALIGNMENT, 1); 2184 if (bytesPerPixel == 4) { 2185 glReadPixels(0, 0, width, height, GL_BGRA, 2186 GL_UNSIGNED_BYTE, imgData->GetPointer(0)); 2187 } else { 2188 glReadPixels(0, 0, width, height, GL_BGR, 2189 GL_UNSIGNED_BYTE, imgData->GetPointer(0)); 2190 } 2191 if (glGetError() != GL_NO_ERROR) { 2192 ERROR("glReadPixels"); 2193 } 2194 #else 2195 _legendRenderWindow->GetPixelData(0, 0, width-1, height-1, 2196 !_legendRenderWindow->GetDoubleBuffer(), 2197 imgData); 2198 #endif 2199 TRACE("Leave"); 2200 return true; 2201 } 2202 2203 bool Renderer::renderColorMap(const ColorMapId& id, 2204 int width, int height, 2205 bool opaque, 2206 vtkUnsignedCharArray *imgData) 2207 { 2208 TRACE("Enter"); 2209 ColorMap *colorMap = getColorMap(id); 2210 if (colorMap == NULL) 2211 return false; 2212 2213 if (_legendRenderWindow == NULL) { 2214 _legendRenderWindow = vtkSmartPointer<vtkRenderWindow>::New(); 2215 _legendRenderWindow->SetMultiSamples(0); 2216 #ifdef USE_OFFSCREEN_RENDERING 2217 _legendRenderWindow->DoubleBufferOff(); 2218 _legendRenderWindow->OffScreenRenderingOn(); 2219 #else 2220 _legendRenderWindow->DoubleBufferOn(); 2221 _legendRenderWindow->SwapBuffersOff(); 2222 #endif 2223 } 2224 2225 _legendRenderWindow->SetSize(width, height); 2226 2227 if (_legendRenderer == NULL) { 2228 _legendRenderer = vtkSmartPointer<vtkRenderer>::New(); 2229 _legendRenderWindow->AddRenderer(_legendRenderer); 2230 } 2231 _legendRenderer->SetBackground(_bgColor[0], _bgColor[1], _bgColor[2]); 2232 2233 if (_scalarBarActor == NULL) { 2234 _scalarBarActor = vtkSmartPointer<vtkScalarBarActor>::New(); 2235 _scalarBarActor->DrawFrameOff(); 2236 _scalarBarActor->DrawBackgroundOff(); 2237 _scalarBarActor->DrawColorBarOn(); 2238 _legendRenderer->AddViewProp(_scalarBarActor); 2239 } 2240 2241 if (opaque) { 2242 _scalarBarActor->UseOpacityOff(); 2243 } else { 2244 _scalarBarActor->UseOpacityOn(); 2245 } 2246 2247 if (width > height) { 2248 _scalarBarActor->SetOrientationToHorizontal(); 2249 } else { 2250 _scalarBarActor->SetOrientationToVertical(); 2251 } 2252 2253 // Set viewport-relative width/height/pos 2254 #ifdef NEW_SCALAR_BAR 2255 _scalarBarActor->SetBarRatio(1); 2256 _scalarBarActor->SetTitleRatio(0); 2257 #endif 2258 if (width > height) { 2259 // horizontal 2260 #ifdef NEW_SCALAR_BAR 2261 _scalarBarActor->SetDisplayPosition(0, 0); 2262 _scalarBarActor->GetPosition2Coordinate()->SetCoordinateSystemToDisplay(); 2263 _scalarBarActor->GetPosition2Coordinate()->SetValue(width+4, height); 2264 #else 2265 _scalarBarActor->SetPosition(0, 0); 2266 _scalarBarActor->SetHeight((((double)height+1.5)/((double)height))/0.4); // VTK: floor(actorHeight * .4) 2267 _scalarBarActor->SetWidth(1); // VTK: actorWidth 2268 #endif 2269 } else { 2270 // vertical 2271 #ifdef NEW_SCALAR_BAR 2272 _scalarBarActor->SetDisplayPosition(0, -4); 2273 _scalarBarActor->GetPosition2Coordinate()->SetCoordinateSystemToDisplay(); 2274 _scalarBarActor->GetPosition2Coordinate()->SetValue(width+1, height+5); 2275 #else 2276 _scalarBarActor->SetPosition(0, 0); 2277 _scalarBarActor->SetHeight((((double)height+1.5)/((double)height))/0.86); // VTK: floor(actorHeight * .86) 2278 _scalarBarActor->SetWidth(((double)(width+5))/((double)width)); // VTK: actorWidth - 4 pixels 2279 #endif 2280 } 2281 2282 vtkSmartPointer<vtkLookupTable> lut = colorMap->getLookupTable(); 2283 2284 double range[2]; 2285 range[0] = 0.0; 2286 range[1] = 1.0; 2287 2288 lut->SetRange(range); 2289 2290 _scalarBarActor->SetLookupTable(lut); 2291 _scalarBarActor->SetMaximumNumberOfColors((width > height ? width : height)); 2292 _scalarBarActor->SetTitle(""); 2293 _scalarBarActor->SetNumberOfLabels(0); 2294 #ifdef NEW_SCALAR_BAR 2295 _scalarBarActor->DrawAnnotationsOff(); 2296 _scalarBarActor->SetAnnotationLeaderPadding(0); 2297 _scalarBarActor->SetTextPad(0); 2298 #endif 2299 2300 _legendRenderWindow->Render(); 2301 int *sz = _legendRenderWindow->GetSize(); 2302 if (sz[0] != width || sz[1] != height) { 2303 ERROR("Window size: %dx%d, but expected %dx%d", sz[0], sz[1], width, height); 2304 } 2139 2305 2140 2306 #ifdef RENDER_TARGA … … 2265 2431 setGraphicsObjectAspect<Glyphs>(aspectRatio); 2266 2432 setGraphicsObjectAspect<HeightMap>(aspectRatio); 2433 setGraphicsObjectAspect<Image>(aspectRatio); 2267 2434 setGraphicsObjectAspect<LIC>(aspectRatio); 2268 2435 setGraphicsObjectAspect<Line>(aspectRatio); … … 2274 2441 setGraphicsObjectAspect<Sphere>(aspectRatio); 2275 2442 setGraphicsObjectAspect<Streamlines>(aspectRatio); 2443 setGraphicsObjectAspect<Text3D>(aspectRatio); 2276 2444 setGraphicsObjectAspect<Volume>(aspectRatio); 2277 2445 setGraphicsObjectAspect<Warp>(aspectRatio); … … 3184 3352 mergeGraphicsObjectBounds<Group>(bounds, onlyVisible); 3185 3353 mergeGraphicsObjectBounds<HeightMap>(bounds, onlyVisible); 3354 mergeGraphicsObjectBounds<Image>(bounds, onlyVisible); 3186 3355 mergeGraphicsObjectBounds<LIC>(bounds, onlyVisible); 3187 3356 mergeGraphicsObjectBounds<Line>(bounds, onlyVisible); … … 3193 3362 mergeGraphicsObjectBounds<Sphere>(bounds, onlyVisible); 3194 3363 mergeGraphicsObjectBounds<Streamlines>(bounds, onlyVisible); 3364 mergeGraphicsObjectBounds<Text3D>(bounds, onlyVisible); 3195 3365 mergeGraphicsObjectBounds<Volume>(bounds, onlyVisible); 3196 3366 mergeGraphicsObjectBounds<Warp>(bounds, onlyVisible); … … 3253 3423 mergeGraphicsObjectUnscaledBounds<Glyphs>(bounds, onlyVisible); 3254 3424 mergeGraphicsObjectUnscaledBounds<HeightMap>(bounds, onlyVisible); 3425 mergeGraphicsObjectUnscaledBounds<Image>(bounds, onlyVisible); 3255 3426 mergeGraphicsObjectUnscaledBounds<LIC>(bounds, onlyVisible); 3256 3427 mergeGraphicsObjectUnscaledBounds<Line>(bounds, onlyVisible); … … 3262 3433 mergeGraphicsObjectUnscaledBounds<Sphere>(bounds, onlyVisible); 3263 3434 mergeGraphicsObjectUnscaledBounds<Streamlines>(bounds, onlyVisible); 3435 mergeGraphicsObjectUnscaledBounds<Text3D>(bounds, onlyVisible); 3264 3436 mergeGraphicsObjectUnscaledBounds<Volume>(bounds, onlyVisible); 3265 3437 mergeGraphicsObjectUnscaledBounds<Warp>(bounds, onlyVisible); … … 3308 3480 updateGraphicsObjectFieldRanges<Glyphs>(); 3309 3481 updateGraphicsObjectFieldRanges<HeightMap>(); 3482 updateGraphicsObjectFieldRanges<Image>(); 3310 3483 updateGraphicsObjectFieldRanges<LIC>(); 3311 3484 updateGraphicsObjectFieldRanges<Molecule>(); 3485 updateGraphicsObjectFieldRanges<PolyData>(); 3312 3486 updateGraphicsObjectFieldRanges<PseudoColor>(); 3313 3487 updateGraphicsObjectFieldRanges<Streamlines>(); … … 3368 3542 } 3369 3543 _scalarCellDataRange.clear(); 3544 for (FieldRangeHashmap::iterator itr = _scalarFieldDataRange.begin(); 3545 itr != _scalarFieldDataRange.end(); ++itr) { 3546 delete [] itr->second; 3547 } 3548 _scalarFieldDataRange.clear(); 3370 3549 for (FieldRangeHashmap::iterator itr = _vectorPointDataRange.begin(); 3371 3550 itr != _vectorPointDataRange.end(); ++itr) { … … 3392 3571 _vectorCompCellDataRange[i].clear(); 3393 3572 } 3573 for (FieldRangeHashmap::iterator itr = _vectorFieldDataRange.begin(); 3574 itr != _vectorFieldDataRange.end(); ++itr) { 3575 delete [] itr->second; 3576 } 3577 _vectorFieldDataRange.clear(); 3578 for (int i = 0; i < 3; i++) { 3579 for (FieldRangeHashmap::iterator itr = _vectorCompFieldDataRange[i].begin(); 3580 itr != _vectorCompFieldDataRange[i].end(); ++itr) { 3581 delete [] itr->second; 3582 } 3583 _vectorCompFieldDataRange[i].clear(); 3584 } 3394 3585 } 3395 3586 … … 3410 3601 } 3411 3602 _userScalarCellDataRange.clear(); 3603 for (FieldRangeHashmap::iterator itr = _userScalarFieldDataRange.begin(); 3604 itr != _userScalarFieldDataRange.end(); ++itr) { 3605 delete [] itr->second; 3606 } 3607 _userScalarFieldDataRange.clear(); 3412 3608 for (FieldRangeHashmap::iterator itr = _userVectorPointDataRange.begin(); 3413 3609 itr != _userVectorPointDataRange.end(); ++itr) { … … 3433 3629 } 3434 3630 _userVectorCompCellDataRange[i].clear(); 3631 } 3632 for (FieldRangeHashmap::iterator itr = _userVectorFieldDataRange.begin(); 3633 itr != _userVectorFieldDataRange.end(); ++itr) { 3634 delete [] itr->second; 3635 } 3636 _userVectorFieldDataRange.clear(); 3637 for (int i = 0; i < 3; i++) { 3638 for (FieldRangeHashmap::iterator itr = _userVectorCompFieldDataRange[i].begin(); 3639 itr != _userVectorCompFieldDataRange[i].end(); ++itr) { 3640 delete [] itr->second; 3641 } 3642 _userVectorCompFieldDataRange[i].clear(); 3435 3643 } 3436 3644 } … … 3472 3680 _scalarCellDataRange[*itr][0] = 0; 3473 3681 _scalarCellDataRange[*itr][1] = 1; 3682 } 3683 } 3684 names.clear(); 3685 ds->getFieldNames(names, DataSet::FIELD_DATA, 1); 3686 for (std::vector<std::string>::iterator itr = names.begin(); 3687 itr != names.end(); ++itr) { 3688 FieldRangeHashmap::iterator fritr = 3689 _scalarFieldDataRange.find(*itr); 3690 if (fritr == _scalarFieldDataRange.end()) { 3691 _scalarFieldDataRange[*itr] = new double[2]; 3692 _scalarFieldDataRange[*itr][0] = 0; 3693 _scalarFieldDataRange[*itr][1] = 1; 3474 3694 } 3475 3695 } … … 3511 3731 _vectorCompCellDataRange[i][*itr][0] = 0; 3512 3732 _vectorCompCellDataRange[i][*itr][1] = 1; 3733 } 3734 } 3735 } 3736 names.clear(); 3737 ds->getFieldNames(names, DataSet::FIELD_DATA, 3); 3738 for (std::vector<std::string>::iterator itr = names.begin(); 3739 itr != names.end(); ++itr) { 3740 FieldRangeHashmap::iterator fritr = 3741 _vectorFieldDataRange.find(*itr); 3742 if (fritr == _vectorFieldDataRange.end()) { 3743 _vectorFieldDataRange[*itr] = new double[2]; 3744 _vectorFieldDataRange[*itr][0] = 0; 3745 _vectorFieldDataRange[*itr][1] = 1; 3746 } 3747 for (int i = 0; i < 3; i++) { 3748 fritr = _vectorCompFieldDataRange[i].find(*itr); 3749 if (fritr == _vectorCompFieldDataRange[i].end()) { 3750 _vectorCompFieldDataRange[i][*itr] = new double[2]; 3751 _vectorCompFieldDataRange[i][*itr][0] = 0; 3752 _vectorCompFieldDataRange[i][*itr][1] = 1; 3513 3753 } 3514 3754 } … … 3610 3850 } 3611 3851 break; 3852 case DataSet::FIELD_DATA: { 3853 FieldRangeHashmap::iterator itr; 3854 if (numComponents == 1) { 3855 itr = _userScalarFieldDataRange.find(name); 3856 if (itr == _userScalarFieldDataRange.end()) { 3857 _userScalarFieldDataRange[name] = new double[2]; 3858 memcpy(_userScalarFieldDataRange[name], range, sizeof(double)*2); 3859 } else { 3860 found = true; 3861 memcpy(itr->second, range, sizeof(double)*2); 3862 } 3863 } else if (numComponents == 3) { 3864 if (component == -1) { 3865 itr = _userVectorFieldDataRange.find(name); 3866 if (itr == _userVectorFieldDataRange.end()) { 3867 _userVectorFieldDataRange[name] = new double[2]; 3868 memcpy(_userVectorFieldDataRange[name], range, sizeof(double)*2); 3869 } else { 3870 found = true; 3871 memcpy(itr->second, range, sizeof(double)*2); 3872 } 3873 } else if (component >= 0 && component <= 3) { 3874 itr = _userVectorCompFieldDataRange[component].find(name); 3875 if (itr == _userVectorCompFieldDataRange[component].end()) { 3876 _userVectorCompFieldDataRange[component][name] = new double[2]; 3877 memcpy(_userVectorCompFieldDataRange[component][name], range, sizeof(double)*2); 3878 } else { 3879 found = true; 3880 memcpy(itr->second, range, sizeof(double)*2); 3881 } 3882 } 3883 } 3884 } 3885 break; 3612 3886 default: 3613 3887 ERROR("Bad Field Type"); … … 3626 3900 /** 3627 3901 * \brief Get the cumulative range across all DataSets for a point 3628 * data field if it exists, otherwise a cell data field if it exists 3902 * data field if it exists, otherwise a cell data field if it exists, 3903 * otherwise a field data field if it exists 3629 3904 * 3630 3905 * \param[out] range Pointer to an array of 2 doubles … … 3639 3914 { 3640 3915 bool ret; 3641 if (!(ret = getCumulativeDataRange(range, name, DataSet::POINT_DATA, 3642 numComponents, component))) 3643 ret = getCumulativeDataRange(range, name, DataSet::CELL_DATA, 3916 if ((ret = getCumulativeDataRange(range, name, DataSet::POINT_DATA, 3917 numComponents, component))) { 3918 ; // Found point data 3919 } else if ((ret = getCumulativeDataRange(range, name, DataSet::CELL_DATA, 3920 numComponents, component))) { 3921 ; // Found cell data 3922 3923 } else { 3924 ret = getCumulativeDataRange(range, name, DataSet::FIELD_DATA, 3644 3925 numComponents, component); 3926 } 3645 3927 return ret; 3646 3928 } … … 3739 4021 } 3740 4022 break; 4023 case DataSet::FIELD_DATA: { 4024 FieldRangeHashmap::iterator itr; 4025 if (numComponents == 1) { 4026 itr = _userScalarFieldDataRange.find(name); 4027 if (itr == _userScalarFieldDataRange.end()) { 4028 itr = _scalarFieldDataRange.find(name); 4029 if (itr == _scalarFieldDataRange.end()) { 4030 return false; 4031 } 4032 } 4033 memcpy(range, itr->second, sizeof(double)*2); 4034 return true; 4035 } else if (numComponents == 3) { 4036 if (component == -1) { 4037 itr = _userVectorFieldDataRange.find(name); 4038 if (itr == _userVectorFieldDataRange.end()) { 4039 itr = _vectorFieldDataRange.find(name); 4040 if (itr == _vectorFieldDataRange.end()) { 4041 return false; 4042 } 4043 } 4044 memcpy(range, itr->second, sizeof(double)*2); 4045 return true; 4046 } else if (component >= 0 && component <= 3) { 4047 itr = _userVectorCompFieldDataRange[component].find(name); 4048 if (itr == _userVectorCompFieldDataRange[component].end()) { 4049 itr = _vectorCompFieldDataRange[component].find(name); 4050 if (itr == _vectorCompFieldDataRange[component].end()) { 4051 return false; 4052 } 4053 } 4054 memcpy(range, itr->second, sizeof(double)*2); 4055 return true; 4056 } 4057 } 4058 } 4059 break; 3741 4060 default: 3742 4061 break; … … 3757 4076 collectDataRanges(itr->second, itr->first.c_str(), 3758 4077 DataSet::CELL_DATA, -1, 4078 _cumulativeRangeOnlyVisible); 4079 } 4080 for (FieldRangeHashmap::iterator itr = _scalarFieldDataRange.begin(); 4081 itr != _scalarFieldDataRange.end(); ++itr) { 4082 collectDataRanges(itr->second, itr->first.c_str(), 4083 DataSet::FIELD_DATA, -1, 3759 4084 _cumulativeRangeOnlyVisible); 3760 4085 } … … 3784 4109 collectDataRanges(itr->second, itr->first.c_str(), 3785 4110 DataSet::CELL_DATA, i, 4111 _cumulativeRangeOnlyVisible); 4112 } 4113 } 4114 for (FieldRangeHashmap::iterator itr = _vectorFieldDataRange.begin(); 4115 itr != _vectorFieldDataRange.end(); ++itr) { 4116 collectDataRanges(itr->second, itr->first.c_str(), 4117 DataSet::FIELD_DATA, -1, 4118 _cumulativeRangeOnlyVisible); 4119 } 4120 for (int i = 0; i < 3; i++) { 4121 for (FieldRangeHashmap::iterator itr = _vectorCompFieldDataRange[i].begin(); 4122 itr != _vectorCompFieldDataRange[i].end(); ++itr) { 4123 collectDataRanges(itr->second, itr->first.c_str(), 4124 DataSet::FIELD_DATA, i, 3786 4125 _cumulativeRangeOnlyVisible); 3787 4126 } … … 4024 4363 if (id.compare("all") == 0 || getGraphicsObject<HeightMap>(id) != NULL) 4025 4364 setGraphicsObjectOpacity<HeightMap>(id, opacity); 4365 if (id.compare("all") == 0 || getGraphicsObject<Image>(id) != NULL) 4366 setGraphicsObjectOpacity<Image>(id, opacity); 4026 4367 if (id.compare("all") == 0 || getGraphicsObject<LIC>(id) != NULL) 4027 4368 setGraphicsObjectOpacity<LIC>(id, opacity); … … 4080 4421 if (id.compare("all") == 0 || getGraphicsObject<HeightMap>(id) != NULL) 4081 4422 setGraphicsObjectVisibility<HeightMap>(id, state); 4423 if (id.compare("all") == 0 || getGraphicsObject<Image>(id) != NULL) 4424 setGraphicsObjectVisibility<Image>(id, state); 4082 4425 if (id.compare("all") == 0 || getGraphicsObject<LIC>(id) != NULL) 4083 4426 setGraphicsObjectVisibility<LIC>(id, state); … … 4229 4572 setGraphicsObjectClippingPlanes<Group>(_activeClipPlanes); 4230 4573 setGraphicsObjectClippingPlanes<HeightMap>(_activeClipPlanes); 4574 setGraphicsObjectClippingPlanes<Image>(_activeClipPlanes); 4231 4575 setGraphicsObjectClippingPlanes<LIC>(_activeClipPlanes); 4232 4576 setGraphicsObjectClippingPlanes<Line>(_activeClipPlanes); … … 4238 4582 setGraphicsObjectClippingPlanes<Sphere>(_activeClipPlanes); 4239 4583 setGraphicsObjectClippingPlanes<Streamlines>(_activeClipPlanes); 4584 setGraphicsObjectClippingPlanes<Text3D>(_activeClipPlanes); 4240 4585 setGraphicsObjectClippingPlanes<Volume>(_activeClipPlanes); 4241 4586 setGraphicsObjectClippingPlanes<Warp>(_activeClipPlanes); … … 4293 4638 setCameraClippingPlanes(); 4294 4639 _renderWindow->Render(); 4640 int *sz = _renderWindow->GetSize(); 4641 if (sz[0] != _windowWidth || sz[1] != _windowHeight) { 4642 ERROR("Window size: %dx%d, but expected %dx%d", sz[0], sz[1], _windowWidth, _windowHeight); 4643 } 4295 4644 _needsRedraw = false; 4296 4645 return true;
Note: See TracChangeset
for help on using the changeset viewer.