Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

network monitor skeleton

File size: 7.8 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 * deconstructor
38 */
39NetworkMonitor::~NetworkMonitor()
40{}
41
42
43
44
45
46
47#if 0
48  if (this->box == NULL)
49{
50  this->box = new OrxGui::GLGuiBox(OrxGui::Vertical);
51  {
52    OrxGui::GLGuiBox* waterColorBox = new OrxGui::GLGuiBox(OrxGui::Horizontal);
53    {
54      OrxGui::GLGuiText* waterColorText = new OrxGui::GLGuiText();
55      waterColorText->setText("WaterColor");
56      waterColorBox->pack(waterColorText);
57
58      OrxGui::GLGuiSlider* waterColorR = new OrxGui::GLGuiSlider();
59      waterColorR->setRange(0, 1.0f);
60      waterColorR->setValue(this->waterColor.x);
61      waterColorR->setStep(0.1f);
62      waterColorR->connect(SIGNAL(waterColorR, valueChanged), this, SLOT(MappedWater, resetWaterColorR));
63      waterColorBox->pack(waterColorR);
64
65      OrxGui::GLGuiSlider* waterColorG = new OrxGui::GLGuiSlider();
66      waterColorG->setRange(0, 1.0f);
67      waterColorG->setStep(0.1f);
68      waterColorG->setValue(this->waterColor.y);
69      waterColorG->connect(SIGNAL(waterColorG, valueChanged), this, SLOT(MappedWater, resetWaterColorG));
70      waterColorBox->pack(waterColorG);
71
72      OrxGui::GLGuiSlider* waterColorB = new OrxGui::GLGuiSlider();
73      waterColorB->setRange(0, 1.0f);
74      waterColorB->setStep(0.1f);
75      waterColorB->setValue(this->waterColor.z);
76      waterColorB->connect(SIGNAL(waterColorB, valueChanged), this, SLOT(MappedWater, resetWaterColorB));
77      waterColorBox->pack(waterColorB);
78    }
79    this->box->pack(waterColorBox);
80
81    OrxGui::GLGuiBox* waterUVBox = new OrxGui::GLGuiBox(OrxGui::Horizontal);
82    {
83      OrxGui::GLGuiText* waterUVText = new OrxGui::GLGuiText();
84      waterUVText->setText("WaterUV");
85      waterUVBox->pack(waterUVText);
86
87      OrxGui::GLGuiSlider* waterUV = new OrxGui::GLGuiSlider();
88      waterUV->setRange(1, 20);
89      waterUV->setValue(this->waterUV);
90      waterUV->setStep(1);
91      waterUV->connect(SIGNAL(waterUV, valueChanged), this, SLOT(MappedWater, setWaterUV));
92      waterUVBox->pack(waterUV);
93    }
94    this->box->pack(waterUVBox);
95
96    OrxGui::GLGuiBox* waterFlowBox = new OrxGui::GLGuiBox(OrxGui::Horizontal);
97    {
98      OrxGui::GLGuiText* waterFlowText = new OrxGui::GLGuiText();
99      waterFlowText->setText("WaterFlow");
100      waterFlowBox->pack(waterFlowText);
101
102      OrxGui::GLGuiSlider* waterFlow = new OrxGui::GLGuiSlider();
103      waterFlow->setRange(0.01f, 2);
104      waterFlow->setValue(this->waterFlow);
105      waterFlow->setStep(0.02f);
106      waterFlow->connect(SIGNAL(waterFlow, valueChanged), this, SLOT(MappedWater, setWaterFlow));
107      waterFlowBox->pack(waterFlow);
108    }
109    this->box->pack(waterFlowBox);
110
111    OrxGui::GLGuiBox* shineSizeBox = new OrxGui::GLGuiBox(OrxGui::Horizontal);
112    {
113      OrxGui::GLGuiText* shineSizeText = new OrxGui::GLGuiText();
114      shineSizeText->setText("ShineSize");
115      shineSizeBox->pack(shineSizeText);
116
117      OrxGui::GLGuiSlider* shineSize = new OrxGui::GLGuiSlider();
118      shineSize->setRange(1, 128);
119      shineSize->setValue(this->shineSize);
120      shineSize->setStep(1);
121      shineSize->connect(SIGNAL(shineSize, valueChanged), this, SLOT(MappedWater, resetShineSize));
122      shineSizeBox->pack(shineSize);
123    }
124    this->box->pack(shineSizeBox);
125
126    OrxGui::GLGuiBox* shineStrengthBox = new OrxGui::GLGuiBox(OrxGui::Horizontal);
127    {
128      OrxGui::GLGuiText* shineStrengthText = new OrxGui::GLGuiText();
129      shineStrengthText->setText("ShineStrength");
130      shineStrengthBox->pack(shineStrengthText);
131
132      OrxGui::GLGuiSlider* shineStrength = new OrxGui::GLGuiSlider();
133      shineStrength->setRange(0, 1);
134      shineStrength->setValue(this->shineStrength);
135      shineStrength->setStep(0.1f);
136      shineStrength->connect(SIGNAL(shineStrength, valueChanged), this, SLOT(MappedWater, resetShineStrength));
137      shineStrengthBox->pack(shineStrength);
138    }
139    this->box->pack(shineStrengthBox);
140
141    OrxGui::GLGuiBox* reflStrengthBox = new OrxGui::GLGuiBox(OrxGui::Horizontal);
142    {
143      OrxGui::GLGuiText* reflStrengthText = new OrxGui::GLGuiText();
144      reflStrengthText->setText("ReflStrength");
145      reflStrengthBox->pack(reflStrengthText);
146
147      OrxGui::GLGuiSlider* reflStrength = new OrxGui::GLGuiSlider();
148      reflStrength->setRange(0, 1);
149      reflStrength->setValue(this->reflStrength);
150      reflStrength->setStep(0.1f);
151      reflStrength->connect(SIGNAL(reflStrength, valueChanged), this, SLOT(MappedWater, resetReflStrength));
152      reflStrengthBox->pack(reflStrength);
153    }
154    this->box->pack(reflStrengthBox);
155
156    OrxGui::GLGuiBox* refractionBox = new OrxGui::GLGuiBox(OrxGui::Horizontal);
157    {
158      OrxGui::GLGuiText* refractionText = new OrxGui::GLGuiText();
159      refractionText->setText("Refraction");
160      refractionBox->pack(refractionText);
161
162      OrxGui::GLGuiSlider* refraction = new OrxGui::GLGuiSlider();
163      refraction->setRange(0.001f, 0.1f);
164      refraction->setValue(this->refraction);
165      refraction->setStep(0.004f);
166      refraction->connect(SIGNAL(refraction, valueChanged), this, SLOT(MappedWater, resetRefraction));
167      refractionBox->pack(refraction);
168    }
169    this->box->pack(refractionBox);
170
171    OrxGui::GLGuiBox* lightPosBox = new OrxGui::GLGuiBox(OrxGui::Horizontal);
172    {
173      OrxGui::GLGuiText* lightPosText = new OrxGui::GLGuiText();
174      lightPosText->setText("LightPos");
175      lightPosBox->pack(lightPosText);
176
177      OrxGui::GLGuiSlider* lightPosX = new OrxGui::GLGuiSlider();
178      lightPosX->setRange(-4000, 4000);
179      lightPosX->setValue(this->lightPos.x);
180      lightPosX->setStep(15);
181      lightPosX->connect(SIGNAL(lightPosX, valueChanged), this, SLOT(MappedWater, resetLightPosX));
182      lightPosBox->pack(lightPosX);
183
184      OrxGui::GLGuiSlider* lightPosY = new OrxGui::GLGuiSlider();
185      lightPosY->setRange(-4000, 4000);
186      lightPosY->setStep(15);
187      lightPosY->setValue(this->lightPos.y);
188      lightPosY->connect(SIGNAL(lightPosY, valueChanged), this, SLOT(MappedWater, resetLightPosY));
189      lightPosBox->pack(lightPosY);
190
191      OrxGui::GLGuiSlider* lightPosZ = new OrxGui::GLGuiSlider();
192      lightPosZ->setRange(-4000, 4000);
193      lightPosZ->setStep(15);
194      lightPosZ->setValue(this->lightPos.z);
195      lightPosZ->connect(SIGNAL(lightPosZ, valueChanged), this, SLOT(MappedWater, resetLightPosZ));
196      lightPosBox->pack(lightPosZ);
197    }
198    this->box->pack(lightPosBox);
199
200    OrxGui::GLGuiBox* waterHeightBox = new OrxGui::GLGuiBox(OrxGui::Horizontal);
201    {
202      OrxGui::GLGuiText* waterHeightText = new OrxGui::GLGuiText();
203      waterHeightText->setText("WaterHeight");
204      waterHeightBox->pack(waterHeightText);
205
206      OrxGui::GLGuiSlider* waterHeight = new OrxGui::GLGuiSlider();
207      waterHeight->setRange(100, 370);
208      waterHeight->setValue(this->waterHeight);
209      waterHeight->setStep(4);
210      waterHeight->connect(SIGNAL(waterHeight, valueChanged), this, SLOT(MappedWater, setWaterHeight));
211      waterHeightBox->pack(waterHeight);
212    }
213    this->box->pack(waterHeightBox);
214  }
215
216  this->box->showAll();
217  this->box->setAbsCoor2D(300, 40);
218  OrxGui::GLGuiHandler::getInstance()->activate();
219  OrxGui::GLGuiHandler::getInstance()->activateCursor();
220}
221  else
222{
223  OrxGui::GLGuiHandler::getInstance()->deactivate();
224  OrxGui::GLGuiHandler::getInstance()->deactivateCursor();
225  delete this->box;
226  this->box = NULL;
227}
228#endif
Note: See TracBrowser for help on using the repository browser.