コード例 #1
0
ファイル: Form1.cs プロジェクト: arviecarpio/SE702_Project
 public TangibleObject(ArrayList outlinePoints, TRTangibleObject patternPoints, Matrix transformation, TangibleType type)
 {
     this.outlinePoints = outlinePoints;
     this.TRObject = patternPoints;
     this.transformation = transformation;
     this.type = type;
 }
コード例 #2
0
ファイル: Form1.cs プロジェクト: arviecarpio/SE702_Project
 private void RulerButton_Click(object sender, EventArgs e)
 {
     if (tangiblePattern.Count < 2) { return; } //LET THEM KNOW IT DIDNT ADD
     ArrayList outlinePoints = new ArrayList();
     outlinePoints.Add(new Point(leftLineX,topLineY));
     outlinePoints.Add(new Point(rightLineX,topLineY));
     outlinePoints.Add(new Point(rightLineX,bottomLineY));
     outlinePoints.Add(new Point(leftLineX,bottomLineY));
     VectorTRPoint patternPoints = new VectorTRPoint();
     foreach (int i in tangiblePattern.Keys)
     {
         patternPoints.Add((TRPoint)tangiblePattern[i]);
     }
     label1.Text = "b " + tangiblePattern.Count.ToString();
     tangiblePattern.Clear();
     Matrix m = new Matrix();
     TRGraph graph = new TRGraph(patternPoints);
     TRTangibleObject tObj = new TRTangibleObject(TangibleArrayIndex, graph);
     recognizer.addTangibleObject(tObj);
     TangibleObject tangibleObj = new TangibleObject(outlinePoints, tObj, m, TangibleType.Ruler);
     arrayOfTangibleObjects.Add(tangibleObj);
     TangibleArrayIndex++;
 }