History

deleting old dead code

ZappoMan committed 13 years ago

Commit 4ea0de11 parent e7b3d412 files · +9 −87Browse files

Showing the changes to interface/src/Application.cpp (1 of 2 files). Show all

Unified · Split

interface/src/Application.cpp+9−80
@@ -205,8 +205,6 @@ Application::Application(int& argc, char** argv, timeval &startup_time) : · 204 unmodified lines
205205 _justEditedVoxel(false),
206206 _isLookingAtOtherAvatar(false),
207207 _lookatIndicatorScale(1.0f),
208− _paintOn(false),
209− _dominantColor(0),
210208 _perfStatsOn(false),
211209 _chatEntryOn(false),
212210 _oculusTextureID(0),
@@ -540,27 +538,20 @@ void Application::controlledBroadcastToNodes(unsigned char* broadcastData, size_ · 327 unmodified lines
540538 // Feed number of bytes to corresponding channel of the bandwidth meter, if any (done otherwise)
541539 BandwidthMeter::ChannelIndex channel;
542540 switch (nodeTypes[i]) {
543− case NODE_TYPE_AGENT:
544− case NODE_TYPE_AVATAR_MIXER:
545− channel = BandwidthMeter::AVATARS;
546− break;
547− case NODE_TYPE_VOXEL_SERVER:
548− channel = BandwidthMeter::VOXELS;
549− break;
550− default:
551− continue;
541+ case NODE_TYPE_AGENT:
542+ case NODE_TYPE_AVATAR_MIXER:
543+ channel = BandwidthMeter::AVATARS;
544+ break;
545+ case NODE_TYPE_VOXEL_SERVER:
546+ channel = BandwidthMeter::VOXELS;
547+ break;
548+ default:
549+ continue;
552550 }
553551 self->_bandwidthMeter.outputStream(channel).updateValue(nReceivingNodes * dataBytes);
554552 }
555553 }
556554
557−void Application::sendVoxelServerAddScene() {
558− char message[100];
559− sprintf(message,"%c%s",'Z',"add scene");
560− int messageSize = strlen(message) + 1;
561− controlledBroadcastToNodes((unsigned char*)message, messageSize, & NODE_TYPE_VOXEL_SERVER, 1);
562−}
563−
564555 void Application::keyPressEvent(QKeyEvent* event) {
565556 if (activeWindow() == _window) {
566557 if (_chatEntryOn) {
@@ -626,19 +617,6 @@ void Application::keyPressEvent(QKeyEvent* event) { · 59 unmodified lines
626617 _viewFrustumOffsetUp += 0.05;
627618 break;
628619
629− case Qt::Key_Ampersand:
630− _paintOn = !_paintOn;
631− setupPaintingVoxel();
632− break;
633−
634− case Qt::Key_AsciiCircum:
635− shiftPaintingColor();
636− break;
637−
638− case Qt::Key_Percent:
639− sendVoxelServerAddScene();
640− break;
641−
642620 case Qt::Key_Semicolon:
643621 _audio.ping();
644622 break;
@@ -2761,26 +2739,6 @@ void Application::updateAvatar(float deltaTime) { · 2116 unmodified lines
27612739 sendAvatarVoxelURLMessage(_myAvatar.getVoxels()->getVoxelURL());
27622740 }
27632741 }
2764−
2765− // If I'm in paint mode, send a voxel out to VOXEL server nodes.
2766− if (_paintOn) {
2767−
2768− glm::vec3 avatarPos = _myAvatar.getPosition();
2769−
2770− // For some reason, we don't want to flip X and Z here.
2771− _paintingVoxel.x = avatarPos.x / 10.0;
2772− _paintingVoxel.y = avatarPos.y / 10.0;
2773− _paintingVoxel.z = avatarPos.z / 10.0;
2774−
2775− if (_paintingVoxel.x >= 0.0 && _paintingVoxel.x <= 1.0 &&
2776− _paintingVoxel.y >= 0.0 && _paintingVoxel.y <= 1.0 &&
2777− _paintingVoxel.z >= 0.0 && _paintingVoxel.z <= 1.0) {
2778−
2779− PACKET_TYPE message = (_destructiveAddVoxel->isChecked() ?
2780− PACKET_TYPE_SET_VOXEL_DESTRUCTIVE : PACKET_TYPE_SET_VOXEL);
2781− sendVoxelEditMessage(message, _paintingVoxel);
2782− }
2783− }
27842742 }
27852743
27862744 /////////////////////////////////////////////////////////////////////////////////////
@@ -3268,15 +3226,6 @@ void Application::displayOverlay() { · 481 unmodified lines
32683226 sprintf(nodes, "Servers: %d, Avatars: %d\n", totalServers, totalAvatars);
32693227 drawtext(_glWidget->width() - 150, 20, 0.10, 0, 1.0, 0, nodes, 1, 0, 0);
32703228
3271− if (_paintOn) {
3272−
3273− char paintMessage[100];
3274− sprintf(paintMessage,"Painting (%.3f,%.3f,%.3f/%.3f/%d,%d,%d)",
3275− _paintingVoxel.x, _paintingVoxel.y, _paintingVoxel.z, _paintingVoxel.s,
3276− (unsigned int)_paintingVoxel.red, (unsigned int)_paintingVoxel.green, (unsigned int)_paintingVoxel.blue);
3277− drawtext(_glWidget->width() - 350, 50, 0.10, 0, 1.0, 0, paintMessage, 1, 1, 0);
3278− }
3279−
32803229 // render the webcam input frame
32813230 _webcam.renderPreview(_glWidget->width(), _glWidget->height());
32823231
@@ -3734,26 +3683,6 @@ void Application::renderViewFrustum(ViewFrustum& viewFrustum) { · 451 unmodified lines
37343683 }
37353684 }
37363685
3737−void Application::setupPaintingVoxel() {
3738− glm::vec3 avatarPos = _myAvatar.getPosition();
3739−
3740− _paintingVoxel.x = avatarPos.z/-10.0; // voxel space x is negative z head space
3741− _paintingVoxel.y = avatarPos.y/-10.0; // voxel space y is negative y head space
3742− _paintingVoxel.z = avatarPos.x/-10.0; // voxel space z is negative x head space
3743− _paintingVoxel.s = 1.0/256;
3744−
3745− shiftPaintingColor();
3746−}
3747−
3748−void Application::shiftPaintingColor() {
3749− // About the color of the paintbrush... first determine the dominant color
3750− _dominantColor = (_dominantColor + 1) % 3; // 0=red,1=green,2=blue
3751− _paintingVoxel.red = (_dominantColor == 0) ? randIntInRange(200, 255) : randIntInRange(40, 100);
3752− _paintingVoxel.green = (_dominantColor == 1) ? randIntInRange(200, 255) : randIntInRange(40, 100);
3753− _paintingVoxel.blue = (_dominantColor == 2) ? randIntInRange(200, 255) : randIntInRange(40, 100);
3754−}
3755−
3756−
37573686 void Application::injectVoxelAddedSoundEffect() {
37583687 AudioInjector* voxelInjector = AudioInjectionManager::injectorWithCapacity(11025);
37593688

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t