------------------------------------------------------------------------------
| 187 | |
| 188 | //------------------------------------------------------------------------------ |
| 189 | int vtkParallelCoordinatesActor::RenderOpaqueGeometry(vtkViewport* viewport) |
| 190 | { |
| 191 | int renderedSomething = 0; |
| 192 | |
| 193 | // Initialize |
| 194 | |
| 195 | vtkDebugMacro(<< "Plotting parallel coordinates"); |
| 196 | |
| 197 | // Make sure input is up to date, and that the data is the correct shape to |
| 198 | // plot. |
| 199 | |
| 200 | if (!this->GetInput()) |
| 201 | { |
| 202 | vtkErrorMacro(<< "Nothing to plot!"); |
| 203 | return renderedSomething; |
| 204 | } |
| 205 | |
| 206 | if (!this->TitleTextProperty) |
| 207 | { |
| 208 | vtkErrorMacro(<< "Need title text property to render plot"); |
| 209 | return renderedSomething; |
| 210 | } |
| 211 | |
| 212 | if (!this->LabelTextProperty) |
| 213 | { |
| 214 | vtkErrorMacro(<< "Need label text property to render plot"); |
| 215 | return renderedSomething; |
| 216 | } |
| 217 | |
| 218 | // Viewport change may not require rebuild |
| 219 | |
| 220 | int positionsHaveChanged = 0; |
| 221 | if (viewport->GetMTime() > this->BuildTime || |
| 222 | (viewport->GetVTKWindow() && viewport->GetVTKWindow()->GetMTime() > this->BuildTime)) |
| 223 | { |
| 224 | int* lastPosition = this->PositionCoordinate->GetComputedViewportValue(viewport); |
| 225 | int* lastPosition2 = this->Position2Coordinate->GetComputedViewportValue(viewport); |
| 226 | if (lastPosition[0] != this->LastPosition[0] || lastPosition[1] != this->LastPosition[1] || |
| 227 | lastPosition2[0] != this->LastPosition2[0] || lastPosition2[1] != this->LastPosition2[1]) |
| 228 | { |
| 229 | this->LastPosition[0] = lastPosition[0]; |
| 230 | this->LastPosition[1] = lastPosition[1]; |
| 231 | this->LastPosition2[0] = lastPosition2[0]; |
| 232 | this->LastPosition2[1] = lastPosition2[1]; |
| 233 | positionsHaveChanged = 1; |
| 234 | } |
| 235 | } |
| 236 | |
| 237 | // Check modified time to see whether we have to rebuild. |
| 238 | |
| 239 | this->ConnectionHolder->GetInputAlgorithm()->Update(); |
| 240 | |
| 241 | if (positionsHaveChanged || this->GetMTime() > this->BuildTime || |
| 242 | this->GetInput()->GetMTime() > this->BuildTime || |
| 243 | this->LabelTextProperty->GetMTime() > this->BuildTime || |
| 244 | this->TitleTextProperty->GetMTime() > this->BuildTime) |
| 245 | { |
| 246 | const int* size = viewport->GetSize(); |
nothing calls this directly
no test coverage detected