public QuadList(QuadList t) { verts.AddRange(t.verts); textureEnabled = t.textureEnabled; textureName = t.textureName; GenerateIndices(); }
public void AddCone(string name, Color c) { QuadList modl = new QuadList(); List <VertexPositionColorTexture> vptc = new List <VertexPositionColorTexture>(); vptc.Add(new VertexPositionColorTexture(new Vector3(10, 50, -10), MGConverter.Blend(Color.LightGray, c), new Vector2(0, 0))); vptc.Add(new VertexPositionColorTexture(new Vector3(-10, 50, -10), MGConverter.Blend(Color.LightGray, c), new Vector2(0, 0))); vptc.Add(new VertexPositionColorTexture(new Vector3(0, 0, 0), MGConverter.Blend(Color.Black, c), new Vector2(0, 0))); vptc.Add(new VertexPositionColorTexture(new Vector3(-10, 50, 10), MGConverter.Blend(Color.LightGray, c), new Vector2(0, 0))); modl.PushQuad(vptc); vptc.Add(new VertexPositionColorTexture(new Vector3(-10, 50, 10), MGConverter.Blend(Color.LightGray, c), new Vector2(0, 0))); vptc.Add(new VertexPositionColorTexture(new Vector3(10, 50, 10), MGConverter.Blend(Color.LightGray, c), new Vector2(0, 0))); vptc.Add(new VertexPositionColorTexture(new Vector3(0, 0, 0), MGConverter.Blend(Color.Black, c), new Vector2(0, 0))); vptc.Add(new VertexPositionColorTexture(new Vector3(10, 50, -10), MGConverter.Blend(Color.LightGray, c), new Vector2(0, 0))); modl.PushQuad(vptc); vptc.Add(new VertexPositionColorTexture(new Vector3(10, 50, -10), MGConverter.Blend(Color.LightGray, c), new Vector2(0, 0))); vptc.Add(new VertexPositionColorTexture(new Vector3(10, 50, 10), MGConverter.Blend(Color.LightGray, c), new Vector2(0, 0))); vptc.Add(new VertexPositionColorTexture(new Vector3(-10, 50, -10), MGConverter.Blend(Color.LightGray, c), new Vector2(0, 0))); vptc.Add(new VertexPositionColorTexture(new Vector3(-10, 50, 10), MGConverter.Blend(Color.LightGray, c), new Vector2(0, 0))); modl.PushQuad(vptc); modl.Seal(); instmodels.Add(name, modl); }
public void Push(Dictionary <string, QuadList> dict, string name, List <VertexPositionColorTexture> monolist, string custTex = "") { if (dict.ContainsKey(name)) { dict[name].PushQuad(monolist); } else { QuadList ql = new QuadList(monolist, true, (custTex != "" ? custTex : name)); dict.Add(name, ql); } }