Ejemplo n.º 1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="position">light's position.</param>
 /// <param name="target">Where this spot light looks at.</param>
 /// <param name="cutOff">Cos(angle). angle ranges in [0, 90]. Spot light's full angle ranges in [0, 180].</param>
 /// <param name="attenuation"></param>
 public SpotLight(vec3 position, vec3 target, float cutOff, Attenuation attenuation = null)
     : base(attenuation == null ? new Attenuation(1.0f, 0.0f, 0.0f) : attenuation)
 {
     this.Position = position;
     this.Target   = target;
     this.CutOff   = cutOff;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Point light.
 /// </summary>
 /// <param name="position">light's position.</param>
 /// <param name="attenuation"></param>
 public PointLight(vec3 position, Attenuation attenuation = null)
     : base(attenuation == null ? new Attenuation(1.0f, 0.0f, 0.0f) : attenuation)
 {
     this.Position = position;
 }
Ejemplo n.º 3
0
        /// <summary>
        ///
        /// </summary>

        /// <summary>
        /// Base type of all lights.
        /// </summary>
        /// <param name="attenuation"></param>
        public LightBase(Attenuation attenuation)
        {
            this.Attenuation = attenuation;
        }
Ejemplo n.º 4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="position">light's position.</param>
 /// <param name="direction">Direction to the light's position.</param>
 /// <param name="attenuation"></param>
 public TSpotLight(vec3 position, TSpotLightDirection direction, Attenuation attenuation = null)
     : base(attenuation == null ? new Attenuation(1.0f, 0.0f, 0.0f) : attenuation)
 {
     this.Position  = position;
     this.Direction = direction;
 }