public bool BoundingVolumeIsInView(BoundingSphere sphere) { return (Frustum.Contains(sphere) != ContainmentType.Disjoint); }
// Called when the game should draw itself protected override void Draw(GameTime gameTime) { GraphicsDevice.Clear(Color.Black); foreach (CModel model in models) { if (camera.BoundingVolumeIsInView(model.BoundingSphere)) { model.Draw(camera.View, camera.Projection, ((FreeCamera)camera).Position); } } base.Draw(gameTime); }