Пример #1
0
 private void drawtri(Otri2 t, SCENE scene, Pixelscreen pixelscreen)
 {
     if (pixelscreen.hasOwner(t))
     {
         t.update(scene);
     }
     else
     {
         t.cullframe(scene);
     }
 }
Пример #2
0
            public Zharrierbreakdown(int start, int stop)
            {
                this.start = start;
                this.stop  = stop;
                framedelta = 50;

                dot       = new Odot(Sprite.SPRITE_SQUARE_6_6, 0);
                harrpoint = v3(0f);

                points  = copy(harr.points);
                _points = new vec3[points.Length];
                dots    = new Odot[harr.points.Length];
                for (int i = 0; i < dots.Length; i++)
                {
                    dots[i] = new Odot(Sprite.SPRITE_SQUARE_6_6, 0);
                }
                lines = new Oline[harr.lines.Length];
                for (int i = 0; i < lines.Length; i++)
                {
                    lines[i] = new Oline(_points, harr.lines[i][0], harr.lines[i][1]);
                }
                int s = Orect.SETTING_SHADED;

                tris = new Otri2[harr.tris.Length];
                for (int i = 0; i < tris.Length; i++)
                {
                    tris[i] = new Otri2(new Tri(null,
                                                harr.cols[harr.tris[i][0]],
                                                _points,
                                                harr.tris[i][1],
                                                harr.tris[i][2],
                                                harr.tris[i][3]
                                                ), s);
                }
                move(points, Zcamera.mid);

                sizetext = new Odot[8 /*charwidth*/ * 8 /*charheight*/ * 10];
                for (int i = 0; i < sizetext.Length; i++)
                {
                    sizetext[i] = new Odot(Sprite.SPRITE_SQUARE_2_2, 0);
                }
                sizetextloc = new vec4[sizetext.Length];
                for (int i = 0; i < sizetextloc.Length; i++)
                {
                    sizetextloc[i]    = v4(500f, 450f, 1f, 1f);
                    sizetextloc[i].x += (i % 80) * TEXTSPACING;
                    sizetextloc[i].y += (i / 80 - 6) * TEXTSPACING - 2;
                }

                inittext();
            }
Пример #3
0
            public void create()
            {
                points  = copy(harr.points);
                _points = new vec3[points.Length];
                dots    = new Odot[harr.points.Length];
                for (int i = 0; i < dots.Length; i++)
                {
                    dots[i] = new Odot(Sprite.SPRITE_SQUARE_6_6, 0);
                }
                lines = new Oline[harr.lines.Length];
                for (int i = 0; i < lines.Length; i++)
                {
                    lines[i] = new Oline(_points, harr.lines[i][0], harr.lines[i][1]);
                }
                int s = Orect.SETTING_SHADED;

                tris = new Otri2[harr.tris.Length];
                for (int i = 0; i < tris.Length; i++)
                {
                    tris[i] = new Otri2(new Tri(null,
                                                harr.cols[harr.tris[i][0]],
                                                _points,
                                                harr.tris[i][1],
                                                harr.tris[i][2],
                                                harr.tris[i][3]
                                                ), s);
                }
                move(points, v3(15f, 0f, 0f));
                spectrumdots  = new Odot[SPECTRUM_HEIGHT][];
                spectrumdots2 = new Odot[SPECTRUM_HEIGHT][];
                for (int i = 0; i < SPECTRUM_HEIGHT; i++)
                {
                    spectrumdots[i]  = new Odot[SPECTRUM_WIDTH];
                    spectrumdots2[i] = new Odot[SPECTRUM_WIDTH];
                    for (int j = 0; j < SPECTRUM_WIDTH; j++)
                    {
                        spectrumdots[i][j]  = new Odot(Sprite.SPRITE_SQUARE_6_6, 0);
                        spectrumdots2[i][j] = new Odot(Sprite.SPRITE_SQUARE_6_6, 0);
                    }
                }
            }