Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
LightingGroupInfo.cs
Go to the documentation of this file.
1 // Copyright (c) 2014 Silicon Studio Corp. (http://siliconstudio.co.jp)
2 // This file is distributed under GPL v3. See LICENSE.md for details.
3 
4 using System;
5 using System.Collections.Generic;
6 
7 using SiliconStudio.Core;
8 using SiliconStudio.Paradox.Graphics;
9 
10 namespace SiliconStudio.Paradox.Effects.Modules.Renderers
11 {
12  public class LightingGroupInfo
13  {
14  public static readonly PropertyKey<LightingGroupInfo> Key = new PropertyKey<LightingGroupInfo>("LightingGroupInfoKey", typeof(LightingGroupInfo));
15 
16  // TODO: Remove this from this class
17  /// <summary>
18  /// The lighting parameters of this effect.
19  /// </summary>
20  public List<LightingUpdateInfo> LightingParameters { get; set; }
21 
22  // TODO: Remove this from this class
23  /// <summary>
24  /// The shadow parameters of this effect
25  /// </summary>
26  public List<ShadowUpdateInfo> ShadowParameters { get; set; }
27 
28  // TODO: Remove this from this class
29  /// <summary>
30  /// A flag stating if the LightingParameters should be updated.
31  /// </summary>
32  public bool IsLightingSetup { get; set; }
33 
34 
35  public static LightingGroupInfo GetOrCreate(Effect effect)
36  {
37  if (effect == null) throw new ArgumentNullException("effect");
38  LightingGroupInfo value;
39  if (!effect.Tags.TryGetValue(Key, out value))
40  {
41  value = new LightingGroupInfo();
42  effect.Tags.Add(Key, value);
43  }
44  return value;
45  }
46  }
47 }
PropertyContainer Tags
Gets the attached properties to this component.
bool TryGetValue(PropertyKey propertyKey, out object value)
Tries to get a tag value.
A class that represents a tag propety.
Definition: PropertyKey.cs:17