From fb646145e85b34410bf30aa2bb0f0092814bee35 Mon Sep 17 00:00:00 2001 From: Kai Ninomiya Date: Thu, 18 Jun 2015 17:26:14 -0400 Subject: [PATCH] Add a comment about excluding skirts from OBBs --- Source/Core/CesiumTerrainProvider.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Source/Core/CesiumTerrainProvider.js b/Source/Core/CesiumTerrainProvider.js index fb4cdddcf01f..0b15c98a3ee4 100644 --- a/Source/Core/CesiumTerrainProvider.js +++ b/Source/Core/CesiumTerrainProvider.js @@ -428,6 +428,12 @@ define([ if (rectangle.width < CesiumMath.PI_OVER_TWO + CesiumMath.EPSILON5) { // Here, rectangle.width < pi/2, and rectangle.height < pi // (though it would still work with rectangle.width up to pi) + + // The skirt is not included in the OBB computation. If this ever + // causes any rendering artifacts (cracks), they are expected to be + // minor and in the corners of the screen. It's possible that this + // might need to be changed - just change to `minimumHeight - skirtHeight` + // A similar change might also be needed in `upsampleQuantizedTerrainMesh.js`. orientedBoundingBox = OrientedBoundingBox.fromRectangle(rectangle, minimumHeight, maximumHeight, provider._tilingScheme.ellipsoid); }