From 29e4a7a733547626f58ddd007d1b914c51b339a3 Mon Sep 17 00:00:00 2001 From: Alexander Munch-Hansen Date: Tue, 23 Apr 2019 14:25:46 +0200 Subject: [PATCH] Ready for 3D models yo --- AR-3/Assets/python_test.cs | 22 +++++++++++++--------- AR-3/packages.config | 3 +++ 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/AR-3/Assets/python_test.cs b/AR-3/Assets/python_test.cs index 36ab277..da860ec 100644 --- a/AR-3/Assets/python_test.cs +++ b/AR-3/Assets/python_test.cs @@ -134,18 +134,22 @@ public class python_test : MonoBehaviour //List points = new List(); MatOfPoint2f points = new MatOfPoint2f(); - points.alloc(16); + points.alloc(64); - - for (int i = 0; i < 64; i++) - { - int x = ((i+1) % 8) * 165; - int y = (int)(i/8); - - + var board = homographyAndState.board; + int indexer = 0; + for (int y = 1; y < 9; y++) + { + for (int x = 1; x < 9; x++) + { + var cur_pos = board[x - 1][y - 1]; + points.put(indexer, 0, (cur_pos != 6 ? 1 : 0) * y * 165, (cur_pos != 6 ? 1 : 0) * x * 165); + indexer += 1; + } } + /* int cur_level = 0; int index = 0; for (int x = 0; x < 8; x++) @@ -158,7 +162,7 @@ public class python_test : MonoBehaviour index += 1; //Imgproc.circle(outputMat, new Point(cur_level, y), 50, new Scalar(255, 0, 0), -1); } - } + }*/ MatOfPoint2f dstPoints = new MatOfPoint2f(); diff --git a/AR-3/packages.config b/AR-3/packages.config index db3382f..4aebb29 100644 --- a/AR-3/packages.config +++ b/AR-3/packages.config @@ -1,4 +1,7 @@  + + + \ No newline at end of file