public virtual void DrawLines(Bitmap btm, ref int[] zbuffer) { for (int i = 0; i < m.Row - 1; i += 2) { Vec3i A = new Vec3i((int)m.matrix[i, 0], (int)m.matrix[i, 1], (int)m.matrix[i, 2]); Vec3i B = new Vec3i((int)m.matrix[i + 1, 0], (int)m.matrix[i + 1, 1], (int)m.matrix[i + 1, 2]); DrawMethods.line(A, B, ref zbuffer, btm, color); } }
public override void DrawLines(Bitmap btm, ref int[] zbuffer) { for (int i = 0; i < m.Row; i++) { Vec3i A = new Vec3i((int)m.matrix[i, 0], (int)m.matrix[i, 1], (int)m.matrix[i, 2]); Vec3i B = new Vec3i((int)m.matrix[(i + 1) % m.Row, 0], (int)m.matrix[(i + 1) % m.Row, 1], (int)m.matrix[(i + 1) % m.Row, 2]); DrawMethods.line(A, B, ref zbuffer, btm, Color.Black); Vec3i A1 = new Vec3i((int)m1.matrix[i, 0], (int)m1.matrix[i, 1], (int)m1.matrix[i, 2]); Vec3i B1 = new Vec3i((int)m1.matrix[(i + 1) % m.Row, 0], (int)m1.matrix[(i + 1) % m.Row, 1], (int)m1.matrix[(i + 1) % m.Row, 2]); DrawMethods.line(A1, B1, ref zbuffer, btm, Color.Black); } for (int i = 0; i < m.Row; i++) { Vec3i A = new Vec3i((int)m.matrix[i, 0], (int)m.matrix[i, 1], (int)m.matrix[i, 2]); Vec3i A1 = new Vec3i((int)m1.matrix[i, 0], (int)m1.matrix[i, 1], (int)m1.matrix[i, 2]); DrawMethods.line(A, A1, ref zbuffer, btm, Color.Black); } }