Esempio n. 1
0
        public MaterialInfo(Control parent, string meshPartName,
                            EonDictionary <string, string> materials, string rootPath)
        {
            this.meshPartName = meshPartName;
            this.materials    = materials;
            this.rootPath     = rootPath;

            panel        = new TableLayoutPanel();
            panel.Parent = parent;

            panel.BackColor = System.Drawing.Color.Transparent;
            panel.AutoSize  = true;
            panel.Dock      = DockStyle.Top | DockStyle.Left;

            CreateEndLabel("MeshName: ", 0);
            CreateEndLabel(meshPartName, 1);

            CreateEndLabel("Render Type", 2);
            AddComboBox(2, materials.Keys);

            maxRow++;
            CreateEndLabel("", maxRow);
            CreateEndLabel("", maxRow);

            startingRow = maxRow;
        }
Esempio n. 2
0
        public DefaultScene(Crosswalk.Message message)
            : base("DefaultScene")
        {
            this.message = message;

            try
            {
                Type[] extraTypes = new Type[]
                {
                    typeof(ObjectListing),
                    typeof(FrameworkCreation)
                };

                ProjectFile project =
                    SerializationHelper.Deserialize <ProjectFile>(
                        message.Messages[2], false, "", extraTypes);

                materials = project.CreatableObjects.Shaders;
            }
            catch
            {
                materials = new EonDictionary <string, string>();

                materials.Add("Eon.Rendering3D.Framework.Shaders.AnimatedTextureMaterial", "Eon.Rendering3D.dll");
                materials.Add("Eon.Rendering3D.Framework.Shaders.BasicLPPMaterial", "Eon.Rendering3D.dll");
                materials.Add("Eon.Rendering3D.Framework.Shaders.BasicMaterial", "Eon.Rendering3D.dll");
                materials.Add("Eon.Rendering3D.Framework.Shaders.DTLPPMaterial", "Eon.Rendering3D.dll");
            }
        }
Esempio n. 3
0
        internal void Update()
        {
            foreach (Block b in blocks)
            {
                b.ClearBlock();
            }

            AddBlockContents();

            EonDictionary <string, string> collidesWith =
                new EonDictionary <string, string>();

            foreach (Block b in blocks)
            {
                if (b.ObjectIDs.Count > 1)
                {
                    string instagator = b.ObjectIDs[0];

                    for (int i = 1; i < b.ObjectIDs.Count; i++)
                    {
                        collidesWith.Add(instagator, b.ObjectIDs[i]);
                    }
                }
            }

            BroadPhase.SetCollidables(collidesWith);
        }
Esempio n. 4
0
        public Form1()
        {
            InitializeComponent();

            cboStatic.SelectedIndex = 1;

            string filter = ".FBX File (*.FBX)|*.FBX";

            openDia.InitialDirectory = @"C:\";
            openDia.Filter           = filter;

            saveDia.InitialDirectory = @"C:\";
            saveDia.Filter           = "Model Shader File (*.Shader)|*.Shader";

            try
            {
                temp = SerializationHelper.Deserialize <Crosswalk.Message>("Temp", false, ".temp");

                Type[] extraTypes = new Type[]
                {
                    typeof(ObjectListing),
                    typeof(FrameworkCreation)
                };

                ProjectFile project =
                    SerializationHelper.Deserialize <ProjectFile>(
                        temp.Messages[0], false, "", extraTypes);

                materials = project.CreatableObjects.Shaders;

                for (int i = 0; i < materials.Count; i++)
                {
                    if (!materials[i].Value.Contains("Eon."))
                    {
                        if (!coppiedDlls.Contains(materials[i].Value))
                        {
                            coppiedDlls.Add(materials[i].Value);

                            string path = temp.Messages[1] + "Libraries\\" + materials[i].Value;

                            File.Copy(path, materials[i].Value);
                        }
                    }
                }
            }
            catch { }

            SetDefaults();
        }
Esempio n. 5
0
        public static void SetCollidables(EonDictionary <string, string> collidables)
        {
            EonDictionary <string, string> collides = collidables;

            //Set the objects for collision for the narrow phase.
        }