Esempio n. 1
0
 /// <summary>
 /// Creates a new scene hints object with the specified source hintable.
 /// </summary>
 /// <param name="source">Source hintable</param>
 public SceneHints(IHintable source)
 {
     _source     = source;
     _cullHint   = CullHint.Inherit;
     _lightHint  = LightCombineHint.Inherit;
     _transHint  = TransparencyType.Default;
     _pickHint   = PickingHint.Inherit;
     _orthoOrder = 0;
 }
Esempio n. 2
0
 /// <summary>
 /// Deserializes this SceneHints.
 /// </summary>
 /// <param name="input">Input to read from</param>
 public void Read(ISavableReader input)
 {
     _cullHint   = input.ReadEnum <CullHint>();
     _pickHint   = input.ReadEnum <PickingHint>();
     _lightHint  = input.ReadEnum <LightCombineHint>();
     _transHint  = input.ReadEnum <TransparencyType>();
     _bucketType = input.ReadEnum <RenderBucketType>();
     _orthoOrder = input.ReadInt();
 }
Esempio n. 3
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);
        }