Exemplo n.º 1
0
        private bool FrustumContains(SimpleModel simpleModel)
        {
            bool inFrustum = false;

            foreach (var go in gameObjects)
            {
                if (mainCamera.Frustum.Contains(simpleModel.AABB) != ContainmentType.Disjoint)
                {
                    inFrustum = true;
                }
            }

            return(inFrustum);
        }
Exemplo n.º 2
0
        private bool IsOccluded(SimpleModel go)
        {
            bool value = true;

            occQuery.Begin();
            shapeDrawer.DrawBoundingBox(go.AABB, mainCamera);
            occQuery.End();

            while (!occQuery.IsComplete)
            {
            }

            if (occQuery.IsComplete && occQuery.PixelCount > 0)
            {
                value = false;
            }

            time.Stop();

            totalTime += time.ElapsedMilliseconds;

            return(value);
        }