using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using VisimBox;
using VisimBox.Scene;

namespace VisimBuilder
{
    public partial class VisibilitySettings : UserControl
    {
        public VisibilitySettings()
        {
            InitializeComponent();
        }
        

        private void VisObjectChanged(object sender, EventArgs e)
        {
            //calc flags

            RenderFlags rflags = RenderFlags.None;

            if (cbVisual.Checked)
                rflags |= RenderFlags.Normal;
            if (cbHierarchy.Checked)
                rflags |= RenderFlags.HierarchyNode;
            if (cbLinks.Checked)
                rflags |= RenderFlags.HierarchyNode;
            if (cbRigids.Checked)
                rflags |= RenderFlags.PhysicalBody;
            if (cbStaticCol.Checked)
                rflags |= RenderFlags.PhysicalCollision;
            if (cbPhysCol.Checked)
                rflags |= RenderFlags.PhysicalObject;
            if (cbCameras.Checked)
                rflags |= RenderFlags.Camera;
            if (cbLights.Checked)
                rflags |= RenderFlags.Light;
            if (cbAreas.Checked)
                rflags |= RenderFlags.AreaOfEfect;
            if (cbUser.Checked)
                rflags |= RenderFlags.DataObject;
            if (cbBound.Checked)
                rflags |= RenderFlags.BoundingObject;

            UInt64 flags = (UInt64)rflags;
            VisimEngine.Instance.Renderer.MainContext.RenderFlags = flags;
        }

        private void ViewDistChanged(object sender, EventArgs e)
        {
            //notimplemented
        }

        private void QualityChanged(object sender, EventArgs e)
        {
            //notimplemented
        }

        private void buttonAdvanced_Click(object sender, EventArgs e)
        {
            //notimplemented
        }
    }
}
