Example #1
0
        public DirectionalLight(Vector3 direction, RealColor colour, WorldBounds bounds, float _power)
        {
            this.Direction = direction;
            this.color     = colour.Copy();

            this.bounds = bounds;

            power = _power;
        }
Example #2
0
        /// <summary>
        /// Constructs a diffuse light.
        /// </summary>
        /// <param name="direction"></param>
        /// <param name="colour"></param>
        public RadiosityLight(Vector3 direction, RealColor colour, WorldBounds bounds, int pointCount)
        {
            this.m_randomNumberGen = new Random();
            this.m_direction       = direction;
            this.m_colour          = colour.Copy();

            // Create DX3D version:
            this.m_light      = new Light();
            this.m_light.Type = LightType.Directional;

            /*this.m_light.Diffuse = Color.FromArgb((int)(m_colour[0] * 255),
             *  (int)(m_colour[1] * 255),
             *  (int)(m_colour[2] * 255));*/
            this.m_light.Direction = this.m_direction;

            this.bounds     = bounds;
            this.pointCount = pointCount;
            width           = bounds.X.Upper - bounds.X.Lower;
            height          = bounds.Y.Upper - bounds.Y.Lower;
        }