Example #1
0
        public void HighlightNodes(ICollection <int> nodeIndices, Color color)
        {
            if (!(nodeIndices.Count > 0))
            {
                return;
            }
            StructuredBuffer buf = new StructuredBuffer(
                Game.GraphicsDevice,
                typeof(int),
                nodeIndices.Count,
                StructuredBufferFlags.Counter
                );

            HighlightParams hParam = new HighlightParams {
                color = color, number = nodeIndices.Count
            };

            buf.SetData(nodeIndices.ToArray());
            highlightNodesList.Add(new Tuple <StructuredBuffer, HighlightParams>
                                       (buf, hParam)
                                   );
        }
Example #2
0
        public void HighlightNodes(ICollection<int> nodeIndices, Color color)
        {
            if (!(nodeIndices.Count > 0))
            {
                return;
            }
            StructuredBuffer buf = new StructuredBuffer(
                Game.GraphicsDevice,
                typeof(int),
                nodeIndices.Count,
                StructuredBufferFlags.Counter
            );

            HighlightParams hParam = new HighlightParams{ color = color, number = nodeIndices.Count };
            buf.SetData(nodeIndices.ToArray());
            highlightNodesList.Add( new Tuple<StructuredBuffer,HighlightParams>
                (buf, hParam)
            );
        }