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

Method EndPicking

Rendering/VolumeOpenGL2/vtkOpenGLGPUVolumeRayCastMapper.cxx:1473–1500  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

1471
1472//------------------------------------------------------------------------------
1473void vtkOpenGLGPUVolumeRayCastMapper::vtkInternal::EndPicking(vtkRenderer* ren)
1474{
1475 vtkHardwareSelector* selector = ren->GetSelector();
1476 if (selector && this->IsPicking)
1477 {
1478 if (this->CurrentSelectionPass >= vtkHardwareSelector::POINT_ID_LOW24)
1479 {
1480 // Only supported on single-input
1481 int extents[6];
1482 auto dataSet = this->Parent->GetTransformedInput(0);
1483 if (auto imData = vtkImageData::SafeDownCast(dataSet))
1484 {
1485 imData->GetExtent(extents);
1486 }
1487 else if (auto rectGrid = vtkRectilinearGrid::SafeDownCast(dataSet))
1488 {
1489 rectGrid->GetExtent(extents);
1490 }
1491
1492 // Tell the selector the maximum number of cells that the mapper could render
1493 unsigned int const numVoxels = (extents[1] - extents[0] + 1) * (extents[3] - extents[2] + 1) *
1494 (extents[5] - extents[4] + 1);
1495 selector->UpdateMaximumPointId(numVoxels);
1496 selector->UpdateMaximumCellId(numVoxels);
1497 }
1498 selector->EndRenderProp();
1499 }
1500}
1501
1502//------------------------------------------------------------------------------
1503void vtkOpenGLGPUVolumeRayCastMapper::vtkInternal::UpdateSamplingDistance(

Callers 2

RenderWithDepthPassMethod · 0.95
GPURenderMethod · 0.80

Calls 6

GetTransformedInputMethod · 0.80
UpdateMaximumPointIdMethod · 0.80
UpdateMaximumCellIdMethod · 0.80
GetSelectorMethod · 0.45
GetExtentMethod · 0.45
EndRenderPropMethod · 0.45

Tested by

no test coverage detected