예제 #1
0
 /// <summary>
 /// Creates a light state with the specified parameters.
 /// </summary>
 /// <param name="maxLights">Maximum active lights</param>
 /// <param name="globalAmbient">Global ambient color</param>
 public LightCollection(int maxLights, Color globalAmbient)
 {
     _maxLights     = maxLights;
     _lights        = new Light[maxLights];
     _isEnabled     = true;
     _refreshShader = true;
     _globalAmbient = globalAmbient;
     _comparer      = new LightComparer();
 }
예제 #2
0
 /// <summary>
 /// Creates a default light state with black global ambient
 /// color and a maximum of 4 lights.
 /// </summary>
 public LightCollection()
 {
     _maxLights     = 4;
     _lightCount    = 0;
     _lights        = new Light[4];
     _isEnabled     = true;
     _refreshShader = true;
     _globalAmbient = new Color(0.0f, 0.0f, 0.0f);
     _comparer      = new LightComparer();
 }
예제 #3
0
 /// <summary>
 /// Creates a default light state with black global ambient
 /// color and a maximum of 4 lights. Used internally as
 /// a reference to the spatial that created it is passed to ensure
 /// if the collection changes, the spatial is updated.
 /// </summary>
 /// <param name="spatial"></param>
 internal LightCollection(Spatial spatial)
 {
     _maxLights     = 4;
     _lightCount    = 0;
     _lights        = new Light[4];
     _isEnabled     = true;
     _refreshShader = true;
     _globalAmbient = new Color(0.0f, 0.0f, 0.0f);
     _comparer      = new LightComparer();
     _spatial       = spatial;
 }