-
Notifications
You must be signed in to change notification settings - Fork 5
/
MetricsPanel.cs
106 lines (89 loc) · 3.27 KB
/
MetricsPanel.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using las;
using las.datamanager;
namespace TerraForm.MetricsPanel
{
public partial class MetricsPanel : Form
{
public MetricsPanel()
{
InitializeComponent();
indexing.Text = "";
indexingNoDisk.Text = "";
avgLoad.Text = "";
avgLoadNoDisk.Text = "";
avgPPL.Text = "";
avgPPLactual.Text = "";
numberOfNonEmptyLeafs.Text = "";
numberOfPoints.Text = "";
FPS.Text = "";
pointsDrawn.Text = "";
frameDrawTime.Text = "";
lblNumPointsInVBOs.Text = "";
lblNumVBOs.Text = "";
lblPointsInsideView.Text = "";
}
private void timer1_Tick(object sender, EventArgs e)
{
indexing.Text = LasMetrics.GetInstance().indexing.ToString();
indexingNoDisk.Text = LasMetrics.GetInstance().indexingNoDisk.ToString();
avgLoad.Text = LasMetrics.GetInstance().avgLoad.ToString();
avgLoadNoDisk.Text = LasMetrics.GetInstance().avgLoadNoDisk.ToString();
avgPPL.Text = LasMetrics.GetInstance().avgPointsPerLeaf.ToString();
avgPPLactual.Text = LasMetrics.GetInstance().avgPointsPerLeafActual.ToString();
numberOfNonEmptyLeafs.Text = LasMetrics.GetInstance().numberOfNonEmptyLeafs.ToString();
numberOfPoints.Text = LasMetrics.GetInstance().numberOfPoints.ToString();
lblNumPointsInVBOs.Text = LasMetrics.GetInstance().numberOfPointsLoadedIntoExistingVBOs.ToString();
lblNumVBOs.Text = LasMetrics.GetInstance().numberOfExistingVBOs.ToString();
lblPointsInsideView.Text = ((double)LasMetrics.GetInstance().pointsInsideViewMilis.TotalMilliseconds / LasMetrics.GetInstance().pointsInsideViewCounted).ToString();
if (RenderMetrics.getInstance() != null)
{
FPS.Text = RenderMetrics.getInstance().FPS.ToString();
frameDrawTime.Text = RenderMetrics.getInstance().frameRenderTime.ToString();
if (LasMetrics.GetInstance().pointsDrawn > 0)
{
pointsDrawn.Text = LasMetrics.GetInstance().pointsDrawn.ToString();
}
double copiedToGPU = (double)LasMetrics.GetInstance().bytesTransferedToGPU/(1024.0*1024.0);
lblRAM2GPU.Text = copiedToGPU.ToString();
}
tabControl1.SelectedTab.Refresh();
}
private void btnRefresh_Click(object sender, EventArgs e)
{
lblMemory.Text = ((float)GC.GetTotalMemory(true)/(1024*1024)).ToString();
}
private void btnRenderToggle_Click(object sender, EventArgs e)
{
if (btnRenderToggle.Text == "Start")
{
btnRenderToggle.Text = "Stop";
LasMetrics.GetInstance().renderToggle = true;
}
else
{
LasMetrics.GetInstance().renderToggle = false;
btnRenderToggle.Text = "Start";
}
}
private void btnLeafLoading_toggle_Click(object sender, EventArgs e)
{
if (btnLeafLoading_toggle.Text == "Start")
{
btnLeafLoading_toggle.Text = "Stop";
LasMetrics.GetInstance().leafLoadToggle = true;
}
else
{
LasMetrics.GetInstance().leafLoadToggle = false;
btnLeafLoading_toggle.Text = "Start";
}
}
}
}