#5380 Surface : Modification of depth

This commit is contained in:
Magne Sjaastad
2020-02-20 11:37:42 +01:00
parent c950f19a51
commit 699a3f9b34
4 changed files with 61 additions and 6 deletions

View File

@@ -155,6 +155,7 @@ void RivSurfaceIntersectionGeometryGenerator::calculateArrays()
const std::vector<cvf::Vec3d>& nativeVertices = m_usedSurfaceData->vertices();
const std::vector<unsigned>& nativeTriangleIndices = m_usedSurfaceData->triangleIndices();
cvf::Vec3d displayModelOffset = m_hexGrid->displayOffset();
double depthOffset = m_surfaceInView->depthOffset();
m_triVxToCellCornerWeights.reserve( nativeTriangleIndices.size() * 24 );
outputTriangleVertices.reserve( nativeTriangleIndices.size() * 24 );
@@ -187,6 +188,10 @@ void RivSurfaceIntersectionGeometryGenerator::calculateArrays()
cvf::Vec3d p1 = nativeVertices[nativeTriangleIndices[ntVxIdx + 1]];
cvf::Vec3d p2 = nativeVertices[nativeTriangleIndices[ntVxIdx + 2]];
p0.z() = p0.z() - depthOffset;
p1.z() = p1.z() - depthOffset;
p2.z() = p2.z() - depthOffset;
cvf::BoundingBox triangleBBox;
triangleBBox.add( p0 );
triangleBBox.add( p1 );