Exemple #1
0
 public TriList(TriList t)
 {
     verts.AddRange(t.verts);
     textureEnabled = t.textureEnabled;
     textureName    = t.textureName;
     GenerateIndices();
 }
Exemple #2
0
        public void Push(Dictionary <string, TriList> dict, string name, List <VertexPositionColorTexture> monolist, string custTex = "")
        {
            if (!dict.ContainsKey(name))
            {
                TriList ql = new TriList(new List <VertexPositionColorTexture>()
                {
                }, true, (custTex != "" ? custTex : name));
                dict.Add(name, ql);
            }

            dict[name].PushQuad(monolist);
        }
Exemple #3
0
        public MGLevel(SkyBox sb)
        {
            normal.textureEnabled   = false;
            normal.scrollingEnabled = false;

            for (int i = 0; i < sb.faces.Count; i++)
            {
                List <VertexPositionColorTexture> tri = new List <VertexPositionColorTexture>();
                tri.Add(DataConverter.ToVptc(sb.verts[sb.faces[i].X], new CTRFramework.Shared.Vector2b(0, 0), 0.01f));
                tri.Add(DataConverter.ToVptc(sb.verts[sb.faces[i].Y], new CTRFramework.Shared.Vector2b(0, 0), 0.01f));
                tri.Add(DataConverter.ToVptc(sb.verts[sb.faces[i].Z], new CTRFramework.Shared.Vector2b(0, 0), 0.01f));

                normal.PushTri(tri);
            }

            normal.Seal();

            wire = new TriList(normal);
            wire.SetColor(Color.Red);
        }