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

Method GetZBufferValue

Rendering/Volume/vtkUnstructuredGridVolumeZSweepMapper.cxx:4253–4264  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

4251
4252//------------------------------------------------------------------------------
4253double vtkUnstructuredGridVolumeZSweepMapper::GetZBufferValue(int x, int y)
4254{
4255 int xPos, yPos;
4256
4257 xPos = static_cast<int>(static_cast<float>(x) * this->ImageSampleDistance);
4258 yPos = static_cast<int>(static_cast<float>(y) * this->ImageSampleDistance);
4259
4260 xPos = (xPos >= this->ZBufferSize[0]) ? (this->ZBufferSize[0] - 1) : (xPos);
4261 yPos = (yPos >= this->ZBufferSize[1]) ? (this->ZBufferSize[1] - 1) : (yPos);
4262
4263 return *(this->ZBuffer + yPos * this->ZBufferSize[0] + xPos);
4264}
4265
4266//------------------------------------------------------------------------------
4267double vtkUnstructuredGridVolumeZSweepMapper::GetMinimumBoundsDepth(

Callers 1

CompositeFunctionMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected