MCPcopy Create free account
hub / github.com/Kitware/VTK / Render

Method Render

Rendering/Volume/vtkUnstructuredGridVolumeRayCastMapper.cxx:171–465  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

169void vtkUnstructuredGridVolumeRayCastMapper::ReleaseGraphicsResources(vtkWindow*) {}
170
171void 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

Callers

nothing calls this directly

Calls 15

RetrieveRenderTimeMethod · 0.95
GetMinimumBoundsDepthMethod · 0.95
StoreRenderTimeMethod · 0.95
GetTiledSizeMethod · 0.80
GetViewportMethod · 0.80
RenderTextureMethod · 0.80
DeleteMethod · 0.65
GetScalarsClass · 0.50
sqrtFunction · 0.50
NewFunction · 0.50
CreateDataArrayFunction · 0.50

Tested by

no test coverage detected