Exemple #1
0
        public void read(ref BinaryReader br)
        {
            this.boundingsphere_radius = br.ReadInt32();
            this.boundingsphere_x      = br.ReadInt32();
            this.boundingsphere_y      = br.ReadInt32();
            short num = br.ReadInt16();

            if (num > 0)
            {
                for (int num2 = 0; num2 != (int)num; num2++)
                {
                    Object.Mesh mesh = new Object.Mesh();
                    mesh.read(ref br);
                    this.list_mesh.Add(mesh);
                }
                short num3 = br.ReadInt16();
                for (int num2 = 0; num2 != (int)num3; num2++)
                {
                    Object.Effect effect = new Object.Effect();
                    effect.read(ref br);
                    this.list_effect.Add(effect);
                }
                this.minbounds.X = br.ReadSingle();
                this.minbounds.Y = br.ReadSingle();
                this.minbounds.Z = br.ReadSingle();
                this.maxbounds.X = br.ReadSingle();
                this.maxbounds.Y = br.ReadSingle();
                this.maxbounds.Z = br.ReadSingle();
            }
        }
Exemple #2
0
 private void propertyGrid_PropertyValueChanged(object s, PropertyValueChangedEventArgs e)
 {
     if (this.propertyGrid.SelectedObject.GetType() == typeof(Mesh))
     {
         Mesh mesh = (Mesh)this.propertyGrid.SelectedObject;
         this.treeView.SelectedNode.Text = string.Concat(new object[]
         {
             "[",
             this.treeView.SelectedNode.Index,
             "]",
             mesh.path
         });
     }
     else if (this.propertyGrid.SelectedObject.GetType() == typeof(Materiel))
     {
         Materiel materiel = (Materiel)this.propertyGrid.SelectedObject;
         this.treeView.SelectedNode.Text = string.Concat(new object[]
         {
             "[",
             this.treeView.SelectedNode.Index,
             "]",
             materiel.path
         });
     }
     else if (this.propertyGrid.SelectedObject.GetType() == typeof(Effect))
     {
         Effect effect = (Effect)this.propertyGrid.SelectedObject;
         this.treeView.SelectedNode.Text = string.Concat(new object[]
         {
             "[",
             this.treeView.SelectedNode.Index,
             "]",
             effect.path
         });
     }
     else if (this.propertyGrid.SelectedObject.GetType() == typeof(Object.Mesh))
     {
         Object.Mesh mesh2 = (Object.Mesh) this.propertyGrid.SelectedObject;
         this.treeViewObject.SelectedNode.Text = string.Concat(new object[]
         {
             "Model [",
             mesh2.mesh_id,
             "] with Texture [",
             mesh2.material_id,
             "]"
         });
     }
     else if (this.propertyGrid.SelectedObject.GetType() == typeof(Object.Effect))
     {
         Object.Effect effect2 = (Object.Effect) this.propertyGrid.SelectedObject;
         this.treeViewObject.SelectedNode.Text = "Effect [" + effect2.effect_id + "]";
     }
 }
Exemple #3
0
 private void addToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (this.treeViewObject.SelectedNode.Level == 1)
     {
         TreeNode parent = this.treeViewObject.SelectedNode.Parent;
         if (this.treeViewObject.SelectedNode.Index == 0)
         {
             Object.Mesh item = new Object.Mesh();
             this.list_object[parent.Index].list_mesh.Add(item);
             this.treeViewObject.SelectedNode.Text = "Meshs [" + this.list_object[parent.Index].list_mesh.Count + "]";
             this.treeViewObject.SelectedNode.Nodes.Add("Model [0] with Texture [0]");
         }
         else if (this.treeViewObject.SelectedNode.Index == 1)
         {
             Object.Effect item2 = new Object.Effect();
             this.list_object[parent.Index].list_effect.Add(item2);
             this.treeViewObject.SelectedNode.Text = "Effects [" + this.list_object[parent.Index].list_effect.Count + "]";
             this.treeViewObject.SelectedNode.Nodes.Add("Effect [0]");
         }
     }
     if (this.treeViewObject.SelectedNode.Level == 2)
     {
         TreeNode parent2 = this.treeViewObject.SelectedNode.Parent;
         TreeNode parent  = parent2.Parent;
         if (parent2.Index == 0)
         {
             Object.Mesh item = new Object.Mesh();
             this.list_object[parent.Index].list_mesh.Add(item);
             parent2.Text = "Meshs [" + this.list_object[parent.Index].list_mesh.Count + "]";
             parent2.Nodes.Add("Model [0] with Texture [0]");
         }
         else if (parent2.Index == 1)
         {
             Object.Effect item2 = new Object.Effect();
             this.list_object[parent.Index].list_effect.Add(item2);
             parent2.Text = "Effects [" + this.list_object[parent.Index].list_effect.Count + "]";
             parent2.Nodes.Add("Effect [0]");
         }
     }
 }
Exemple #4
0
 private void addToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (this.treeViewObject.SelectedNode.Level == 1)
     {
         TreeNode parent = this.treeViewObject.SelectedNode.Parent;
         if (this.treeViewObject.SelectedNode.Index == 0)
         {
             Object.Mesh item = new Object.Mesh();
             this.list_object[parent.Index].list_mesh.Add(item);
             this.treeViewObject.SelectedNode.Text = "Meshs [" + this.list_object[parent.Index].list_mesh.Count + "]";
             this.treeViewObject.SelectedNode.Nodes.Add("Model [0] with Texture [0]");
         }
         else if (this.treeViewObject.SelectedNode.Index == 1)
         {
             Object.Effect item2 = new Object.Effect();
             this.list_object[parent.Index].list_effect.Add(item2);
             this.treeViewObject.SelectedNode.Text = "Effects [" + this.list_object[parent.Index].list_effect.Count + "]";
             this.treeViewObject.SelectedNode.Nodes.Add("Effect [0]");
         }
     }
     if (this.treeViewObject.SelectedNode.Level == 2)
     {
         TreeNode parent2 = this.treeViewObject.SelectedNode.Parent;
         TreeNode parent = parent2.Parent;
         if (parent2.Index == 0)
         {
             Object.Mesh item = new Object.Mesh();
             this.list_object[parent.Index].list_mesh.Add(item);
             parent2.Text = "Meshs [" + this.list_object[parent.Index].list_mesh.Count + "]";
             parent2.Nodes.Add("Model [0] with Texture [0]");
         }
         else if (parent2.Index == 1)
         {
             Object.Effect item2 = new Object.Effect();
             this.list_object[parent.Index].list_effect.Add(item2);
             parent2.Text = "Effects [" + this.list_object[parent.Index].list_effect.Count + "]";
             parent2.Nodes.Add("Effect [0]");
         }
     }
 }
Exemple #5
0
 public void read(ref BinaryReader br)
 {
     this.boundingsphere_radius = br.ReadInt32();
     this.boundingsphere_x = br.ReadInt32();
     this.boundingsphere_y = br.ReadInt32();
     short num = br.ReadInt16();
     if (num > 0)
     {
         for (int num2 = 0; num2 != (int)num; num2++)
         {
             Object.Mesh mesh = new Object.Mesh();
             mesh.read(ref br);
             this.list_mesh.Add(mesh);
         }
         short num3 = br.ReadInt16();
         for (int num2 = 0; num2 != (int)num3; num2++)
         {
             Object.Effect effect = new Object.Effect();
             effect.read(ref br);
             this.list_effect.Add(effect);
         }
         this.minbounds.X = br.ReadSingle();
         this.minbounds.Y = br.ReadSingle();
         this.minbounds.Z = br.ReadSingle();
         this.maxbounds.X = br.ReadSingle();
         this.maxbounds.Y = br.ReadSingle();
         this.maxbounds.Z = br.ReadSingle();
     }
 }