public void QueueLine(Vector2 p1, Vector2 p2, float depth, Color color) { int count = LineVertices.Count; LineVertices.Add(new VertexPositionColor(new Vector3(p1, depth), color)); LineVertices.Add(new VertexPositionColor(new Vector3(p2, depth), color)); LineIndices.Add((ushort)count); LineIndices.Add((ushort)(count + 1)); }
public void QueueLine(Vector3 p1, Vector3 p2, Color color) { int count = LineVertices.Count; LineVertices.Add(new VertexPositionColor(p1, color)); LineVertices.Add(new VertexPositionColor(p2, color)); LineIndices.Add((ushort)count); LineIndices.Add((ushort)(count + 1)); }
public void QueueLineStrip(IEnumerable <Vector2> points, float depth, Color color) { int count = LineVertices.Count; int num = 0; foreach (Vector2 point in points) { LineVertices.Add(new VertexPositionColor(new Vector3(point, depth), color)); num++; } for (int i = 0; i < num - 1; i++) { LineIndices.Add((ushort)(count + i)); LineIndices.Add((ushort)(count + i + 1)); } }
public void QueueRectangle(Vector2 corner1, Vector2 corner2, float depth, Color color) { int count = LineVertices.Count; LineVertices.Add(new VertexPositionColor(new Vector3(corner1.X, corner1.Y, depth), color)); LineVertices.Add(new VertexPositionColor(new Vector3(corner1.X, corner2.Y, depth), color)); LineVertices.Add(new VertexPositionColor(new Vector3(corner2.X, corner2.Y, depth), color)); LineVertices.Add(new VertexPositionColor(new Vector3(corner2.X, corner1.Y, depth), color)); LineIndices.Add((ushort)count); LineIndices.Add((ushort)(count + 1)); LineIndices.Add((ushort)(count + 1)); LineIndices.Add((ushort)(count + 2)); LineIndices.Add((ushort)(count + 2)); LineIndices.Add((ushort)(count + 3)); LineIndices.Add((ushort)(count + 3)); LineIndices.Add((ushort)count); }
public void AddLineVertex(CCV3F_C4B lineVertex) { LineVertices.Add(lineVertex); dirty = true; }