Пример #1
0
        public DrawingBitmap(DrawingType drawingType, Mesh mesh, Mesh axis, Mesh grid)
        {
            DrawingType = drawingType;

            this.mesh = mesh;
            this.axis = axis;
            this.grid = grid;

            bmp = null;

            Default();
        }
Пример #2
0
        public static Mesh GetGrid()
        {
            Mesh mesh = new Mesh();

            for (int idx = 1; idx < 21; idx++)
            {
                Color color = mesh.ColorGridFine;
                if ((idx % 10) == 0)
                    color = mesh.ColorGrid;

                mesh.AddPoint(new Point3D(idx, -20, 0));
                mesh.AddPoint(new Point3D(idx, 20, 0));
                mesh.AddEdge(new Edge(mesh.PointList[mesh.PointList.Count - 2], mesh.PointList[mesh.PointList.Count - 1], color));
                mesh.AddPoint(new Point3D(-idx, -20, 0));
                mesh.AddPoint(new Point3D(-idx, 20, 0));
                mesh.AddEdge(new Edge(mesh.PointList[mesh.PointList.Count - 2], mesh.PointList[mesh.PointList.Count - 1], color));
                mesh.AddPoint(new Point3D(-20, idx, 0));
                mesh.AddPoint(new Point3D(20, idx, 0));
                mesh.AddEdge(new Edge(mesh.PointList[mesh.PointList.Count - 2], mesh.PointList[mesh.PointList.Count - 1], color));
                mesh.AddPoint(new Point3D(-20, -idx, 0));
                mesh.AddPoint(new Point3D(20, -idx, 0));
                mesh.AddEdge(new Edge(mesh.PointList[mesh.PointList.Count - 2], mesh.PointList[mesh.PointList.Count - 1], color));
            }

            return mesh;
        }
Пример #3
0
        public static Mesh GetAxis()
        {
            Mesh mesh = new Mesh();

            mesh.AddPoint(new Point3D(-20, 0, 0));
            mesh.AddPoint(new Point3D(20, 0, 0));
            mesh.AddPoint(new Point3D(0, -20, 0));
            mesh.AddPoint(new Point3D(0, 20, 0));
            mesh.AddPoint(new Point3D(0, 0, -20));
            mesh.AddPoint(new Point3D(0, 0, 20));

            mesh.AddEdge(new Edge(mesh.PointList[0], mesh.PointList[1], mesh.ColorAxisX));
            mesh.AddEdge(new Edge(mesh.PointList[2], mesh.PointList[3], mesh.ColorAxisY));
            mesh.AddEdge(new Edge(mesh.PointList[4], mesh.PointList[5], mesh.ColorAxisZ));

            return mesh;
        }