Просмотр исходного кода

Merge branch 'master' of https://git.tk.informatik.tu-darmstadt.de/etri-smartspaces

Alexander Hendrich 11 лет назад
Родитель
Сommit
9c5c7ba6c5
1 измененных файлов с 14 добавлено и 9 удалено
  1. 14 9
      bbiwarg/Test/Triangle.cs

+ 14 - 9
bbiwarg/Test/Triangle.cs

@@ -12,11 +12,12 @@ namespace bbiwarg.Test
 {
     class Triangle
     {
-        public Vector a;
-        public Vector b;
-        public Vector c;
+        public Pixel3D a;
+        public Pixel3D b;
+        public Pixel3D c;
+        public Color color = Color.Red;
 
-        public Triangle(Vector a, Vector b, Vector c)
+        public Triangle(Pixel3D a, Pixel3D b, Pixel3D c)
 	    {
             this.a = a;
             this.b = b;
@@ -25,16 +26,20 @@ namespace bbiwarg.Test
 
         public void draw()
         {
-            GL.Color3(1.0f,0.0f,0.0f);
+            a.draw();
+            b.draw();
+            c.draw();
+
+            GL.Color3(color);
 
             GL.Begin(BeginMode.Triangles);
-            GL.Vertex3(a[0], a[1], a[2]);
-            GL.Vertex3(b[0], b[1], b[2]);
-            GL.Vertex3(c[0], c[1], c[2]);
+            GL.Vertex3(a.x, a.y, a.depth);
+            GL.Vertex3(b.x, b.y, b.depth);
+            GL.Vertex3(c.x, c.y, c.depth);
             GL.End();
         }
 
-        public void setVectors(Vector a, Vector b, Vector c)
+        public void setPixel(Pixel3D a, Pixel3D b, Pixel3D c)
         {
             this.a = a;
             this.b = b;