예제 #1
0
        public LightDialog(Light lightToShow)
        {
            type = lightToShow.Type;

            light           = lightToShow;
            lightParameters = light.Parameters;

            // Set GUI
            InitializeComponent();
            originalHeight = Height;
            InitializeDialog(type);
        }
예제 #2
0
파일: Light.cs 프로젝트: MetalYos/OpenGlNet
        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
파일: Light.cs 프로젝트: MetalYos/OpenGlNet
        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
파일: Scene.cs 프로젝트: MetalYos/OpenGlNet
        public void AddLight(ref vec3 position, LightType type, LightParameters parameters, bool replace = false)
        {
            Light light = new Light(ref position, type, parameters);

            AddLight(light, replace);
        }