コード例 #1
0
        public void Clear()
        {
            TriangleVertices.Clear();
            LineVertices.Clear();

            dirty       = false;
            ContentSize = CCSize.Zero;
        }
コード例 #2
0
        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));
        }
コード例 #3
0
ファイル: FlatBatch3D.cs プロジェクト: Suceru/sc2.2mobile
        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));
        }
コード例 #4
0
        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));
            }
        }
コード例 #5
0
        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);
        }
コード例 #6
0
 public void AddLineVertex(CCV3F_C4B lineVertex)
 {
     LineVertices.Add(lineVertex);
     dirty = true;
 }