Example #1
0
        public static void DrawLine(Vector3 from, Vector3 to, System.Drawing.Color color)
        {
            var vertices = new PositionColored[2];

            vertices[0] = new PositionColored(Vector3.Zero, color.ToArgb());
            from        = from.LSSwitchYZ();
            to          = to.LSSwitchYZ();
            vertices[1] = new PositionColored(to - from, color.ToArgb());

            InternalRender(from);

            Drawing.Direct3DDevice.DrawUserPrimitives(PrimitiveType.LineList, vertices.Length / 2, vertices);
        }