Neodroid  0.2.0
Machine Learning Environment Prototyping Tool
QuadCellDisplayer.cs
Go to the documentation of this file.
1 using System;
4 using UnityEngine;
5 
6 namespace droid.Runtime.Prototyping.Displayers.Cells {
10  [ExecuteInEditMode]
11  [AddComponentMenu(DisplayerComponentMenuPath._ComponentMenuPath
12  + "VectorField"
13  + DisplayerComponentMenuPath._Postfix)]
14  public class QuadCellDisplayer : Displayer {
17  protected override void Setup() { }
18 
23  public override void Display(Double value) { }
24 
25  public override void Display(float[] values) { }
26 
27  public override void Display(String values) { }
28 
29  public override void Display(Vector3 value) { throw new NotImplementedException(); }
30  public override void Display(Vector3[] value) { this.ScatterPlot(value); }
31 
32  public override void Display(Points.ValuePoint points) { this.PlotSeries(new[] {points}); }
33 
34  public override void Display(Points.ValuePoint[] points) { }
35 
36  public override void Display(Points.StringPoint point) { throw new NotImplementedException(); }
37  public override void Display(Points.StringPoint[] points) { throw new NotImplementedException(); }
38 
39  //public override void Display(Object o) { throw new NotImplementedException(); }
40  public override void Display(float values) { }
41 
45  public void ScatterPlot(Vector3[] points) { }
46 
47  /*public override void PlotSeries(float[] points) {
48 
49  }*/
50 
54  public override void PlotSeries(Points.ValuePoint[] points) {
55  #if NEODROID_DEBUG
56  if (this.Debugging) {
57  Debug.Log("Plotting value points");
58  }
59  #endif
60 
61  this._Values = points;
62 
63  foreach (var point in points) {
64  //point._Size
65  switch ((int)point._Val) {
66  case 0:
67  NeodroidDrawingUtilities.ForDebug(point._Pos, Vector3.forward, Color.cyan);
68  break;
69  case 1:
70  NeodroidDrawingUtilities.ForDebug(point._Pos, Vector3.back, Color.cyan);
71  break;
72  case 2:
73  NeodroidDrawingUtilities.ForDebug(point._Pos, Vector3.up, Color.cyan);
74  break;
75  case 3:
76  NeodroidDrawingUtilities.ForDebug(point._Pos, Vector3.down, Color.cyan);
77  break;
78  case 4:
79  NeodroidDrawingUtilities.ForDebug(point._Pos, Vector3.left, Color.cyan);
80  break;
81  case 5:
82  NeodroidDrawingUtilities.ForDebug(point._Pos, Vector3.right, Color.cyan);
83  break;
84  }
85  }
86  }
87  }
88 }
override void Display(Points.StringPoint[] points)
override void PlotSeries(Points.ValuePoint[] points)
override void Display(Points.ValuePoint[] points)