Exemplo n.º 1
0
        private void Awake()
        {
            DynamicGraph   droneGraph   = CreateDroneGraph();
            DynamicPlotter dronePlotter = CreateDronePlotter(droneGraph, "Drone Graph");

            DynamicGraph   sineGraph   = CreateSineGraph();
            DynamicPlotter sinePlotter = CreateSinePlotter(sineGraph, "Sine Graph");
        }
        private DynamicPlotter CreateDronePlotter(DynamicGraph graph, string name)
        {
            GameObject plot = new GameObject();

            DynamicPlotter plotter = plot.AddComponent <DynamicPlotter>();

            plotter.Graph       = graph;
            plotter.PointHolder = plot;

            // Set up plotting resources
            plotter.PointPrefab = PointPrefab.transform;

            plotter.Text = TextObject;

            plotter.XAxisName = "Latitude";
            plotter.YAxisName = "Altitude (m)";
            plotter.ZAxisName = "Longitude";

            plotter.PlotTitle = name;

            plotter.Init();

            return(plotter);
        }
Exemplo n.º 3
0
        private DynamicPlotter CreateSinePlotter(DynamicGraph graph, string title)
        {
            GameObject plot = new GameObject();

            DynamicPlotter plotter = plot.AddComponent <DynamicPlotter>();

            plotter.Graph       = graph;
            plotter.PointHolder = plot;

            // Set up plotting resources
            plotter.PointPrefab = SinePrefab.transform;

            plotter.Text = TextObject;

            plotter.XAxisName = "Radians (rad)";
            plotter.YAxisName = "Amplitude";
            plotter.ZAxisName = "";

            plotter.PlotTitle = title;

            plotter.Init();

            return(plotter);
        }
 void Awake()
 {
     DynamicGraph   droneGraph   = CreateDroneGraph();
     DynamicPlotter dronePlotter = CreateDronePlotter(droneGraph, "Drone Graph");
 }