Esempio n. 1
0
 public Axis(Orientation orient)
 {
     if (orient == Orientation.horizontal)
     {
         d = DrawAxisHor;
     }
     else
     {
         d = DrawAxisVert;
     }
 }
Esempio n. 2
0
        public Face3D Line(int tag, float x0, float y0, float x1, float y1, float z, DrawAxis axis)
        {
            switch (axis)
            {
            case DrawAxis.Z:
                return(this.Line(tag, x0, y0, z, x1, y1, z));

            case DrawAxis.Y:
                return(this.Line(tag, x0, z, y0, x1, z, y1));

            case DrawAxis.X:
                return(this.Line(tag, z, x0, y0, z, x1, y1));
            }
            return(null);
        }
Esempio n. 3
0
        private static void DrawScale(Space3D faces, float scaleSize, DrawAxis axis)
        {
            faces.Line(100, 0, 0, 0, scaleSize, axis);
            faces.Line(100, 0, scaleSize, scaleSize, scaleSize, axis);
            faces.Line(100, scaleSize, scaleSize, scaleSize, 0, axis);
            faces.Line(100, scaleSize, 0, 0, 0, axis);

            int steps = 10;

            float step = scaleSize / (float)steps;

            float x = step;

            for (int i = 1; i <= 9; i++)
            {
                faces.Line(100, x, 0, x, scaleSize, axis);
                faces.Line(100, 0, x, scaleSize, x, axis);
                x += step;
            }
        }
Esempio n. 4
0
 public Face3D Line(int tag, float x0, float y0, float x1, float y1, DrawAxis axis)
 {
     return(this.Line(tag, x0, y0, x1, y1, 0f, axis));
 }