예제 #1
0
        /// <summary>
        /// Updates world lights.
        /// </summary>
        /// <param name="recurse">True if children should be updated</param>
        public override void UpdateWorldLights(bool recurse)
        {
            _worldLights.Clear();

            LightCombineHint hint = base.SceneHints.LightCombineHint;

            if (hint == LightCombineHint.Local)
            {
                _worldLights.Set(base.Lights);
                _worldLights.SortLights(this);
            }
            else if (hint == LightCombineHint.CombineClosest)
            {
                //Ensure we're up to date with the local list's other parameters
                _worldLights.Set(base.Lights, false);

                //Collect all lights that can influence us, then sort
                CollectLights(_worldLights);
                _worldLights.SortLights(this);
            }

            ClearDirty(DirtyMark.Lighting);
        }
예제 #2
0
 /// <summary>
 /// Removes all lights from the Spatial's light collection.
 /// </summary>
 public void RemoveAllLights()
 {
     //Note: LightCollection will propagate the lighting dirty mark down for us
     _localLights.Clear();
 }