public void RemoveLight(ILight lightToRemove)
 {
     if (lightToRemove.GetLightType() == ELightType.Directional)
     {
         CDirectionalLight directionalLight = (CDirectionalLight)lightToRemove;
         m_directionalLights.Remove(directionalLight);
     }
     else if (lightToRemove.GetLightType() == ELightType.Ambient)
     {
         CAmbientLight ambLight = (CAmbientLight)lightToRemove;
         m_ambientLights.Remove(ambLight);
     }
     else
     {
         CPositionalLight positionalLight = (CPositionalLight)lightToRemove;
         positionalLight.Dispose();
         m_positionalLights.Remove(positionalLight);
     }
 }
 public int AddLight(ILight newLight)
 {
     if (newLight.GetLightType() == ELightType.Directional)
     {
         CDirectionalLight newDirectionalLight = (CDirectionalLight)newLight;
         m_directionalLights.Add(newDirectionalLight);
         return(m_directionalLights.Count - 1);
     }
     else if (newLight.GetLightType() == ELightType.Ambient)
     {
         CAmbientLight ambLight = (CAmbientLight)newLight;
         m_ambientLights.Add(ambLight);
         return(m_ambientLights.Count - 1);
     }
     else
     {
         CPositionalLight newPositionalLight = (CPositionalLight)newLight;
         m_positionalLights.Add(newPositionalLight);
         return(m_positionalLights.Count - 1);
     }
 }