123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185 |
- using System.Drawing;
- namespace PaintDotNet.Data.SurfacePlot
- {
- class Line3D
- {
- /**
- * Creates a new lines3D object. No parameters are set.
- *
- */
- public Line3D() { }
- /**
- * Creates a new lines3D object with start point, end point and color of the line
- *
- * @param x1 - x coordinate of start point
- * @param y1 - y coordinate of start point
- * @param z1 - z coordinate of start point
- * @param x2 - x coordinate of end point
- * @param y2 - y coordinate of end point
- * @param z2 - z coordinate of end point
- * @param rgb - color of line (hex)
- */
- public Line3D(int x1, int y1, int z1, int x2, int y2, int z2, int rgb)
- {
- this.x1 = x1;
- this.y1 = y1;
- this.z1 = z1;
- // end coordinates
- this.x2 = x2;
- this.y2 = y2;
- this.z2 = z2;
- this.color = rgb;
- }
- /**
- * Creates a new lines3D object with start point, end point and color of the line
- *
- * @param x1 - x coordinate of start point
- * @param y1 - y coordinate of start point
- * @param z1 - z coordinate of start point
- * @param x2 - x coordinate of end point
- * @param y2 - y coordinate of end point
- * @param z2 - z coordinate of end point
- * @param color - color of line
- */
- public Line3D(int x1, int y1, int z1, int x2, int y2, int z2, Color color)
- {
- this.x1 = x1;
- this.y1 = y1;
- this.z1 = z1;
- // end coordinates
- this.x2 = x2;
- this.y2 = y2;
- this.z2 = z2;
- this.color = color.ToArgb();
- }
- public Line3D(double x1, double y1, double z1, double x2, double y2, double z2, Color color)
- {
- this.x1 = x1;
- this.y1 = y1;
- this.z1 = z1;
- // end coordinates
- this.x2 = x2;
- this.y2 = y2;
- this.z2 = z2;
- this.color = color.ToArgb();
- }
- public Line3D(double x1, double y1, double z1, double x2, double y2, double z2, Color color, bool isPair)
- {
- this.x1 = x1;
- this.y1 = y1;
- this.z1 = z1;
- // end coordinates
- this.x2 = x2;
- this.y2 = y2;
- this.z2 = z2;
- this.color = color.ToArgb();
- this.isPair = isPair;
- }
- /**
- * Creates a new lines3D object with start point, end point and color of the line
- *
- * @param p1 start point int[3]
- * @param p2 start point int[3]
- * @param rgb color of the line (int)
- */
- public Line3D(int[] p1, int[] p2, int rgb)
- {
- this.x1 = p1[0];
- this.y1 = p1[1];
- this.z1 = p1[2];
- // end coordinates
- this.x2 = p2[0];
- this.y2 = p2[1];
- this.z2 = p2[2];
- this.color = rgb;
- }
- /**
- * Creates a new lines3D object with start point, end point and color of the line
- *
- * @param p1 start point int[3]
- * @param p2 start point int[3]
- * @param color color of the line
- */
- public Line3D(int[] p1, int[] p2, Color color)
- {
- this.x1 = p1[0];
- this.y1 = p1[1];
- this.z1 = p1[2];
- // end coordinates
- this.x2 = p2[0];
- this.y2 = p2[1];
- this.z2 = p2[2];
- this.color = color.ToArgb();
- }
- /**
- * x coordinate of start point
- */
- public double x1;
- /**
- * y coordinate of start point
- */
- public double y1;
- /**
- * z coordinate of start point
- */
- public double z1;
- // end coordinates
- /**
- * x coordinate of end point
- */
- public double x2;
- /**
- * y coordinate of end point
- */
- public double y2;
- /**
- * z coordinate of end point
- */
- public double z2;
- /**
- * color of line (hex)
- */
- public int color;
- public bool isPair;
- }
- }
|