TerrainDemo.CDLOD.Node.PreSelect C# (CSharp) Method

PreSelect() private method

private PreSelect ( Selection selection, bool parentCompletelyInFrustum ) : bool
selection Selection
parentCompletelyInFrustum bool
return bool
        bool PreSelect(Selection selection, bool parentCompletelyInFrustum)
        {
            BoundingBox boundingBox;
            GetBoundingBox(ref selection.TerrainOffset, selection.PatchScale, selection.HeightScale, out boundingBox);

            // do not check the intersection between AABB and the view frustum.

            BoundingSphere sphere;
            selection.GetVisibilitySphere(level, out sphere);
            if (!boundingBox.Intersects(sphere))
                return false;

            return true;
        }