| 169 | void vtkUnstructuredGridVolumeRayCastMapper::ReleaseGraphicsResources(vtkWindow*) {} |
| 170 | |
| 171 | void vtkUnstructuredGridVolumeRayCastMapper::Render(vtkRenderer* ren, vtkVolume* vol) |
| 172 | { |
| 173 | int i; |
| 174 | |
| 175 | // Check for input |
| 176 | if (this->GetInput() == nullptr) |
| 177 | { |
| 178 | vtkErrorMacro(<< "No Input!"); |
| 179 | return; |
| 180 | } |
| 181 | |
| 182 | int inputAlgPort; |
| 183 | vtkAlgorithm* inputAlg = this->GetInputAlgorithm(0, 0, inputAlgPort); |
| 184 | inputAlg->UpdateWholeExtent(); |
| 185 | |
| 186 | this->Scalars = vtkUnstructuredGridVolumeRayCastMapper::GetScalars(this->GetInput(), |
| 187 | this->ScalarMode, this->ArrayAccessMode, this->ArrayId, this->ArrayName, this->CellScalars); |
| 188 | |
| 189 | if (this->Scalars == nullptr) |
| 190 | { |
| 191 | vtkErrorMacro("Can't use the ray cast mapper without scalars!"); |
| 192 | return; |
| 193 | } |
| 194 | |
| 195 | // Check to make sure we have an appropriate integrator. |
| 196 | if (this->RayIntegrator) |
| 197 | { |
| 198 | if (this->RealRayIntegrator != this->RayIntegrator) |
| 199 | { |
| 200 | if (this->RealRayIntegrator) |
| 201 | { |
| 202 | this->RealRayIntegrator->UnRegister(this); |
| 203 | } |
| 204 | this->RealRayIntegrator = this->RayIntegrator; |
| 205 | this->RealRayIntegrator->Register(this); |
| 206 | } |
| 207 | } |
| 208 | else |
| 209 | { |
| 210 | |
| 211 | #define ESTABLISH_INTEGRATOR(classname) \ |
| 212 | do \ |
| 213 | { \ |
| 214 | if (!this->RealRayIntegrator || (!this->RealRayIntegrator->IsA(#classname))) \ |
| 215 | { \ |
| 216 | if (this->RealRayIntegrator) \ |
| 217 | this->RealRayIntegrator->UnRegister(this); \ |
| 218 | this->RealRayIntegrator = classname::New(); \ |
| 219 | this->RealRayIntegrator->Register(this); \ |
| 220 | this->RealRayIntegrator->Delete(); \ |
| 221 | } \ |
| 222 | } while (false) |
| 223 | |
| 224 | if (this->CellScalars) |
| 225 | { |
| 226 | ESTABLISH_INTEGRATOR(vtkUnstructuredGridHomogeneousRayIntegrator); |
| 227 | } |
| 228 | else |
nothing calls this directly
no test coverage detected