public static ModelMeshPart m0002a7(c0001a1 p0) { Type type = typeof(ModelMeshPart); ConstructorInfo[] constructors = type.GetConstructors(BindingFlags.NonPublic | BindingFlags.Instance); object[] parameters = new object[] { p0.f000016, p0.f00000b, p0.f00000f, p0.f000011, p0.f000010, p0.f000095, p0.f0001c1, p0.f000098, p0.f00000e }; ModelMeshPart part = (ModelMeshPart) constructors[0].Invoke(parameters); FieldInfo field = type.GetField("effect", BindingFlags.NonPublic | BindingFlags.Instance); if (p0.f0000c1 != null) { field.SetValue(part, p0.f0000c1); } FieldInfo info2 = type.GetField("parent", BindingFlags.NonPublic | BindingFlags.Instance); type.GetField("vertexStride", BindingFlags.NonPublic | BindingFlags.Instance).SetValue(part, p0.f000020); return part; }
internal c000188(string p0, c000189 p1, BoundingSphere p2, VertexBuffer p3, IndexBuffer p4, c0001a1[] p5, object p6) { this.f000006 = p0; this.f000001 = p1; this.f0001c0 = p2; this.f000095 = p3; this.f0001c1 = p4; this.f00013c = new c00019f(p5); this.f00000e = p6; int length = p5.Length; for (int i = 0; i < length; i++) { c0001a1 ca = p5[i]; ca.f00008a = this; } this.f00006a = new c00019d(); }
public c000188 m000289(c000189 p0) { this.f00005b = this.m00028a(); this.f0001c2 = this.m00028b(this.f00005b); List<c0001a1> list = new List<c0001a1>(); for (int i = this.f0001c2.Count - 1; i >= 0; i--) { if (this.f0001c2[i].m00008a().Count == 0) { this.f0001c2.Remove(this.f0001c2[i]); } } int num2 = 0; int elementCount = 0; foreach (c00018b cb in this.f0001c2) { VertexBuffer buffer = new VertexBuffer(this.m0000d4(), cb.m00028c().Length * VertexPositionNormalTexture.SizeInBytes, BufferUsage.WriteOnly); buffer.SetData<VertexPositionNormalTexture>(cb.m00028c()); num2 += cb.m00028c().Length; IndexBuffer buffer2 = new IndexBuffer(this.m0000d4(), typeof(int), cb.m00000f().Length, BufferUsage.WriteOnly); buffer2.SetData<int>(cb.m00000f()); elementCount += cb.m00000f().Length; c0001a1 item = new c0001a1(0, 0, cb.m00008a().Count * 3, 0, cb.m00008a().Count, buffer, buffer2, new VertexDeclaration(this.m0000d4(), VertexPositionNormalTexture.VertexElements), null); item.m000101(new BasicEffect(this.m0000d4(), null)); (item.m000108() as BasicEffect).DiffuseColor = cb.m00004f().m000068().ToVector3(); (item.m000108() as BasicEffect).EmissiveColor = cb.m00004f().m000295().ToVector3(); (item.m000108() as BasicEffect).SpecularColor = cb.m00004f().m000293().ToVector3(); (item.m000108() as BasicEffect).SpecularPower = cb.m00004f().m000024(); if (cb.m00004f().m000064() != null) { (item.m000108() as BasicEffect).Texture = cb.m00004f().m000064(); (item.m000108() as BasicEffect).TextureEnabled = true; } (item.m000108() as BasicEffect).EnableDefaultLighting(); list.Add(item); } VertexBuffer buffer3 = new VertexBuffer(this.m0000d4(), num2 * VertexPositionNormalTexture.SizeInBytes, BufferUsage.WriteOnly); IndexBuffer buffer4 = new IndexBuffer(this.m0000d4(), typeof(int), elementCount, BufferUsage.WriteOnly); c000188 c = new c000188(p0.m000084(), p0, new BoundingSphere(), buffer3, buffer4, list.ToArray(), null); using (c00019f.struct01a0 structa = c.m000282().m00009d()) { while (structa.MoveNext()) { c0001a1 ca2 = structa.get_Current(); if (!c.f00006a.Contains(ca2.m000108())) { c.f00006a.m000101(ca2.m000108()); } } } return c; }