/// <summary>
        /// Creates a <see cref="T:PointsVertex[]"/>.
        /// </summary>
        private DynamoPointVertex[] CreateVertexArray()
        {
            var positions = Geometry.Positions.ToArray();
            var vertexCount = Geometry.Positions.Count;
            var color = Color;
            var result = new DynamoPointVertex[vertexCount];
            var colors = Geometry.Colors;

            for (var i = 0; i < vertexCount; i++)
            {
                Color4 finalColor;
                if (colors != null && colors.Any())
                {

                    finalColor = color * colors[i];
                }
                else
                {
                    finalColor = color;
                }

                result[i] = new DynamoPointVertex
                {
                    Position = new Vector4(positions[i], 1f),
                    Color = finalColor,
                    Parameters = new Vector4((bool)GetValue(AttachedProperties.ShowSelectedProperty) ? 1 : 0, 0, 0, 0)
                };
            }

            return result;
        }
        /// <summary>
        /// Creates a <see cref="T:PointsVertex[]"/>.
        /// </summary>
        private DynamoPointVertex[] CreateVertexArray()
        {
            var positions   = Geometry.Positions.ToArray();
            var vertexCount = Geometry.Positions.Count;
            var color       = Color;
            var result      = new DynamoPointVertex[vertexCount];
            var colors      = Geometry.Colors;

            for (var i = 0; i < vertexCount; i++)
            {
                Color4 finalColor;
                if (colors != null && colors.Any())
                {
                    finalColor = color * colors[i];
                }
                else
                {
                    finalColor = color;
                }

                result[i] = new DynamoPointVertex
                {
                    Position   = new Vector4(positions[i], 1f),
                    Color      = finalColor,
                    Parameters = new Vector4((bool)GetValue(AttachedProperties.ShowSelectedProperty) ? 1 : 0, 0, 0, 0)
                };
            }

            return(result);
        }