Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/proxy/src/lib/network/network_monitor.cc @ 9263

Last change on this file since 9263 was 9263, checked in by patrick, 18 years ago

added the new network monitor class and some minor changes

File size: 7.7 KB
Line 
1/*
2   orxonox - the future of 3D-vertical-scrollers
3
4   Copyright (C) 2004 orx
5
6   This program is free software; you can redistribute it and/or modify
7   it under the terms of the GNU General Public License as published by
8   the Free Software Foundation; either version 2, or (at your option)
9   any later version.
10
11### File Specific:
12   main-programmer: Patrick Boenzli
13*/
14
15#include "glgui.h"
16#include "shell_command.h"
17
18#include "network_stream.h"
19
20#include "network_monitor.h"
21
22// SHELL_COMMAND(gui, MappedWater, toggleGui);
23// SHELL_COMMAND(output, MappedWater, saveParams);
24
25
26
27/**
28 * starts a network monitor
29 */
30NetworkMonitor::NetworkMonitor(NetworkStream* networkStream)
31{
32
33}
34
35
36
37
38
39
40#if 0
41  if (this->box == NULL)
42{
43  this->box = new OrxGui::GLGuiBox(OrxGui::Vertical);
44  {
45    OrxGui::GLGuiBox* waterColorBox = new OrxGui::GLGuiBox(OrxGui::Horizontal);
46    {
47      OrxGui::GLGuiText* waterColorText = new OrxGui::GLGuiText();
48      waterColorText->setText("WaterColor");
49      waterColorBox->pack(waterColorText);
50
51      OrxGui::GLGuiSlider* waterColorR = new OrxGui::GLGuiSlider();
52      waterColorR->setRange(0, 1.0f);
53      waterColorR->setValue(this->waterColor.x);
54      waterColorR->setStep(0.1f);
55      waterColorR->connect(SIGNAL(waterColorR, valueChanged), this, SLOT(MappedWater, resetWaterColorR));
56      waterColorBox->pack(waterColorR);
57
58      OrxGui::GLGuiSlider* waterColorG = new OrxGui::GLGuiSlider();
59      waterColorG->setRange(0, 1.0f);
60      waterColorG->setStep(0.1f);
61      waterColorG->setValue(this->waterColor.y);
62      waterColorG->connect(SIGNAL(waterColorG, valueChanged), this, SLOT(MappedWater, resetWaterColorG));
63      waterColorBox->pack(waterColorG);
64
65      OrxGui::GLGuiSlider* waterColorB = new OrxGui::GLGuiSlider();
66      waterColorB->setRange(0, 1.0f);
67      waterColorB->setStep(0.1f);
68      waterColorB->setValue(this->waterColor.z);
69      waterColorB->connect(SIGNAL(waterColorB, valueChanged), this, SLOT(MappedWater, resetWaterColorB));
70      waterColorBox->pack(waterColorB);
71    }
72    this->box->pack(waterColorBox);
73
74    OrxGui::GLGuiBox* waterUVBox = new OrxGui::GLGuiBox(OrxGui::Horizontal);
75    {
76      OrxGui::GLGuiText* waterUVText = new OrxGui::GLGuiText();
77      waterUVText->setText("WaterUV");
78      waterUVBox->pack(waterUVText);
79
80      OrxGui::GLGuiSlider* waterUV = new OrxGui::GLGuiSlider();
81      waterUV->setRange(1, 20);
82      waterUV->setValue(this->waterUV);
83      waterUV->setStep(1);
84      waterUV->connect(SIGNAL(waterUV, valueChanged), this, SLOT(MappedWater, setWaterUV));
85      waterUVBox->pack(waterUV);
86    }
87    this->box->pack(waterUVBox);
88
89    OrxGui::GLGuiBox* waterFlowBox = new OrxGui::GLGuiBox(OrxGui::Horizontal);
90    {
91      OrxGui::GLGuiText* waterFlowText = new OrxGui::GLGuiText();
92      waterFlowText->setText("WaterFlow");
93      waterFlowBox->pack(waterFlowText);
94
95      OrxGui::GLGuiSlider* waterFlow = new OrxGui::GLGuiSlider();
96      waterFlow->setRange(0.01f, 2);
97      waterFlow->setValue(this->waterFlow);
98      waterFlow->setStep(0.02f);
99      waterFlow->connect(SIGNAL(waterFlow, valueChanged), this, SLOT(MappedWater, setWaterFlow));
100      waterFlowBox->pack(waterFlow);
101    }
102    this->box->pack(waterFlowBox);
103
104    OrxGui::GLGuiBox* shineSizeBox = new OrxGui::GLGuiBox(OrxGui::Horizontal);
105    {
106      OrxGui::GLGuiText* shineSizeText = new OrxGui::GLGuiText();
107      shineSizeText->setText("ShineSize");
108      shineSizeBox->pack(shineSizeText);
109
110      OrxGui::GLGuiSlider* shineSize = new OrxGui::GLGuiSlider();
111      shineSize->setRange(1, 128);
112      shineSize->setValue(this->shineSize);
113      shineSize->setStep(1);
114      shineSize->connect(SIGNAL(shineSize, valueChanged), this, SLOT(MappedWater, resetShineSize));
115      shineSizeBox->pack(shineSize);
116    }
117    this->box->pack(shineSizeBox);
118
119    OrxGui::GLGuiBox* shineStrengthBox = new OrxGui::GLGuiBox(OrxGui::Horizontal);
120    {
121      OrxGui::GLGuiText* shineStrengthText = new OrxGui::GLGuiText();
122      shineStrengthText->setText("ShineStrength");
123      shineStrengthBox->pack(shineStrengthText);
124
125      OrxGui::GLGuiSlider* shineStrength = new OrxGui::GLGuiSlider();
126      shineStrength->setRange(0, 1);
127      shineStrength->setValue(this->shineStrength);
128      shineStrength->setStep(0.1f);
129      shineStrength->connect(SIGNAL(shineStrength, valueChanged), this, SLOT(MappedWater, resetShineStrength));
130      shineStrengthBox->pack(shineStrength);
131    }
132    this->box->pack(shineStrengthBox);
133
134    OrxGui::GLGuiBox* reflStrengthBox = new OrxGui::GLGuiBox(OrxGui::Horizontal);
135    {
136      OrxGui::GLGuiText* reflStrengthText = new OrxGui::GLGuiText();
137      reflStrengthText->setText("ReflStrength");
138      reflStrengthBox->pack(reflStrengthText);
139
140      OrxGui::GLGuiSlider* reflStrength = new OrxGui::GLGuiSlider();
141      reflStrength->setRange(0, 1);
142      reflStrength->setValue(this->reflStrength);
143      reflStrength->setStep(0.1f);
144      reflStrength->connect(SIGNAL(reflStrength, valueChanged), this, SLOT(MappedWater, resetReflStrength));
145      reflStrengthBox->pack(reflStrength);
146    }
147    this->box->pack(reflStrengthBox);
148
149    OrxGui::GLGuiBox* refractionBox = new OrxGui::GLGuiBox(OrxGui::Horizontal);
150    {
151      OrxGui::GLGuiText* refractionText = new OrxGui::GLGuiText();
152      refractionText->setText("Refraction");
153      refractionBox->pack(refractionText);
154
155      OrxGui::GLGuiSlider* refraction = new OrxGui::GLGuiSlider();
156      refraction->setRange(0.001f, 0.1f);
157      refraction->setValue(this->refraction);
158      refraction->setStep(0.004f);
159      refraction->connect(SIGNAL(refraction, valueChanged), this, SLOT(MappedWater, resetRefraction));
160      refractionBox->pack(refraction);
161    }
162    this->box->pack(refractionBox);
163
164    OrxGui::GLGuiBox* lightPosBox = new OrxGui::GLGuiBox(OrxGui::Horizontal);
165    {
166      OrxGui::GLGuiText* lightPosText = new OrxGui::GLGuiText();
167      lightPosText->setText("LightPos");
168      lightPosBox->pack(lightPosText);
169
170      OrxGui::GLGuiSlider* lightPosX = new OrxGui::GLGuiSlider();
171      lightPosX->setRange(-4000, 4000);
172      lightPosX->setValue(this->lightPos.x);
173      lightPosX->setStep(15);
174      lightPosX->connect(SIGNAL(lightPosX, valueChanged), this, SLOT(MappedWater, resetLightPosX));
175      lightPosBox->pack(lightPosX);
176
177      OrxGui::GLGuiSlider* lightPosY = new OrxGui::GLGuiSlider();
178      lightPosY->setRange(-4000, 4000);
179      lightPosY->setStep(15);
180      lightPosY->setValue(this->lightPos.y);
181      lightPosY->connect(SIGNAL(lightPosY, valueChanged), this, SLOT(MappedWater, resetLightPosY));
182      lightPosBox->pack(lightPosY);
183
184      OrxGui::GLGuiSlider* lightPosZ = new OrxGui::GLGuiSlider();
185      lightPosZ->setRange(-4000, 4000);
186      lightPosZ->setStep(15);
187      lightPosZ->setValue(this->lightPos.z);
188      lightPosZ->connect(SIGNAL(lightPosZ, valueChanged), this, SLOT(MappedWater, resetLightPosZ));
189      lightPosBox->pack(lightPosZ);
190    }
191    this->box->pack(lightPosBox);
192
193    OrxGui::GLGuiBox* waterHeightBox = new OrxGui::GLGuiBox(OrxGui::Horizontal);
194    {
195      OrxGui::GLGuiText* waterHeightText = new OrxGui::GLGuiText();
196      waterHeightText->setText("WaterHeight");
197      waterHeightBox->pack(waterHeightText);
198
199      OrxGui::GLGuiSlider* waterHeight = new OrxGui::GLGuiSlider();
200      waterHeight->setRange(100, 370);
201      waterHeight->setValue(this->waterHeight);
202      waterHeight->setStep(4);
203      waterHeight->connect(SIGNAL(waterHeight, valueChanged), this, SLOT(MappedWater, setWaterHeight));
204      waterHeightBox->pack(waterHeight);
205    }
206    this->box->pack(waterHeightBox);
207  }
208
209  this->box->showAll();
210  this->box->setAbsCoor2D(300, 40);
211  OrxGui::GLGuiHandler::getInstance()->activate();
212  OrxGui::GLGuiHandler::getInstance()->activateCursor();
213}
214  else
215{
216  OrxGui::GLGuiHandler::getInstance()->deactivate();
217  OrxGui::GLGuiHandler::getInstance()->deactivateCursor();
218  delete this->box;
219  this->box = NULL;
220}
221#endif
Note: See TracBrowser for help on using the repository browser.