123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157 |
- using System.Drawing;
- namespace PaintDotNet.Data.SurfacePlot
- {
- public class Point3D
- {
- /**
- * Draws a point as a dot. Size information has no effect.
- */
- public static int DOT = 0;
- /**
- * Draws a point as a (2D) circle.
- */
- public static int CIRCLE = 1;
- /**
- * Draws a point as a sphere (slowest).
- */
- public static int SPHERE = 2;
- /**
- * x-coordinate
- */
- public double x;
- /**
- * y-coordinate
- */
- public double y;
- /**
- * z-coordinate
- */
- public double z;
- /**
- * color of point
- */
- public int rgb;
- /**
- * size of point
- */
- public double size = 1;
- public int drawMode = DOT;
- public Point3D()
- {
- }
- /**
- * Creates a new Point3D object. No parameters except of size (set to 1) are set.
- *
- */
- public Point3D(double x, double y, double z, int c)
- {
- this.x = x;
- this.y = y;
- this.z = z;
- this.rgb = c;
- }
- public Point3D(double x, double y, double z, Color c)
- {
- this.x = x;
- this.y = y;
- this.z = z;
- this.rgb = c.ToArgb();
- }
- /**
- * Creates a new Point3D object with given x, y, and z coordinates, size and color.
- *
- * @param x the x-coordinate
- * @param y the y-coordinate
- * @param z the z-coordinate
- * @param size the size of the point
- * @param rgb the rgb-value of the point (like 0xFF00FFFF)
- */
- public Point3D(double x, double y, double z, double size, int rgb)
- {
- this.x = x;
- this.y = y;
- this.z = z;
- this.rgb = rgb;
- this.size = size;
- }
- /**
- * Creates a new Point3D object with given x, y, and z coordinates, size and color.
- *
- * @param x the x-coordinate
- * @param y the y-coordinate
- * @param z the z-coordinate
- * @param size the size of the point
- * @param rgb the rgb-value of the point (like 0xFF00FFFF)
- * @param drawMode mode of drawing the point
- */
- public Point3D(double x, double y, double z, double size, int rgb, int drawMode)
- {
- this.x = x;
- this.y = y;
- this.z = z;
- this.rgb = rgb;
- this.size = size;
- this.drawMode = drawMode;
- }
- /**
- * Creates a new Point3D object with given x, y, and z coordinates, size and color.
- *
- * @param x the x-coordinate
- * @param y the y-coordinate
- * @param z the z-coordinate
- * @param size the size of the point
- * @param color the color of the point (like Color.RED)
- */
- public Point3D(double x, double y, double z, double size, Color color)
- {
- this.x = x;
- this.y = y;
- this.z = z;
- this.rgb = color.ToArgb();
- this.size = size;
- }
- /**
- * Creates a new Point3D object with given x, y, and z coordinates, size and color.
- *
- * @param x the x-coordinate
- * @param y the y-coordinate
- * @param z the z-coordinate
- * @param size the size of the point
- * @param color the color of the point (like Color.RED)
- * @param drawMode mode of drawing the point
- */
- public Point3D(double x, double y, double z, double size, Color color, int drawMode)
- {
- this.x = x;
- this.y = y;
- this.z = z;
- this.rgb = color.ToArgb();
- this.size = size;
- this.drawMode = drawMode;
- }
- }
- }
|