mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 16:10:40 +02:00
Put the indices for our extra triangles into the spatial hash.
This commit is contained in:
parent
8bd944e32e
commit
0d8380a288
1 changed files with 9 additions and 3 deletions
|
@ -1532,6 +1532,12 @@ static inline void appendTriangle(const EdgeCrossing& e0, const EdgeCrossing& e1
|
|||
indices.append(firstIndex + 1);
|
||||
indices.append(firstIndex + 2);
|
||||
indices.append(firstIndex + 2);
|
||||
|
||||
int minimumY = qMin((int)e0.point.y, qMin((int)e1.point.y, (int)e2.point.y));
|
||||
int maximumY = qMax((int)e0.point.y, qMax((int)e1.point.y, (int)e2.point.y));
|
||||
for (int y = minimumY; y <= maximumY; y++) {
|
||||
quadIndices.insert(qRgb(clampedX, y, clampedZ), firstIndex);
|
||||
}
|
||||
}
|
||||
|
||||
void HeightfieldNodeRenderer::render(const HeightfieldNodePointer& node, const glm::vec3& translation,
|
||||
|
|
Loading…
Reference in a new issue