Пример #1
0
        public LightDialog(Light lightToShow)
        {
            type = lightToShow.Type;

            light           = lightToShow;
            lightParameters = light.Parameters;

            // Set GUI
            InitializeComponent();
            originalHeight = Height;
            InitializeDialog(type);
        }
Пример #2
0
        public Light(ref vec3 position, ref vec3 direction, LightType type, string name = "") : base(name)
        {
            s_Counters[(int)type]++;
            Type = type;

            if (name == "")
            {
                InitName();
            }

            Position          = position;
            Direction         = direction;
            originalDirection = Direction;
            Parameters        = new LightParameters();

            Translate(ref position);

            InitOpenGl();
        }
Пример #3
0
        public Light(ref vec3 position, LightType type, LightParameters parameters, string name = "")
            : base(name)
        {
            s_Counters[(int)type]++;
            Type = type;

            if (name == "")
            {
                InitName();
            }

            Position          = position;
            Direction         = new vec3(0.0f, -1.0f, 0.0f);
            originalDirection = Direction;
            Parameters        = parameters;

            Translate(ref position);

            InitOpenGl();
        }
Пример #4
0
        public LightDialog(LightType type)
        {
            this.type = type;

            // Create Initial Light and add it to the scene
            vec3 pos       = new vec3(0.0f, 2.0f, 0.0f);
            vec3 direction = new vec3(0.0f, -1.0f, 0.0f);

            lightParameters = new LightParameters();
            light           = new Light(ref pos, ref direction, type, lightParameters);
            Scene.Instance.AddLight(light);

            // Disable Main Light
            Scene.Instance.GetMainLight().IsVisible = false;

            // Set GUI
            InitializeComponent();
            originalHeight = Height;
            InitializeDialog(type);
        }
Пример #5
0
        public void AddLight(ref vec3 position, LightType type, LightParameters parameters, bool replace = false)
        {
            Light light = new Light(ref position, type, parameters);

            AddLight(light, replace);
        }