示例#1
0
        /// <summary>
        ///     Draws all Gizmos that are poly-lines.
        /// </summary>
        /// <param name="pass">The pass from an effect to draw the geometry with.</param>
        private void DrawPolyLines(EffectPass pass)
        {
            var count = 0;
            List <Vector3[]> positions;

            WorldViewProjectionParameter.SetValue(Matrix.Identity);
            foreach (var polyLineInstance in PolyLinesToDraw)
            {
                ColorParameter.SetValue(polyLineInstance.Key.ToVector3());

                positions = polyLineInstance.Value;
                count     = positions.Count;
                for (var index = 0; index < count; index++)
                {
                    pass.Apply();
                    PolyLine.Draw(positions[index]);
                }
            }
        }