History

Merge remote-tracking branch 'upstream/master'

Philip Rosedale committed 13 years ago

Commit a4405702 parents 99a4d0f daa83507 files · +164 −139Browse files

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

Unified · Split

interface/src/main.cpp+8−12
@@ -306,7 +306,7 @@ void displayStats(void) · 305 unmodified lines
306 char legend2[] = "* - toggle stars, & - toggle paint mode, '-' - send erase all, '%' - send add scene";306 char legend2[] = "* - toggle stars, & - toggle paint mode, '-' - send erase all, '%' - send add scene";
307 drawtext(10, statsVerticalOffset + 32, 0.10f, 0, 1.0, 0, legend2);307 drawtext(10, statsVerticalOffset + 32, 0.10f, 0, 1.0, 0, legend2);
308 308
309 glm::vec3 avatarPos = myAvatar.getBodyPosition();309 glm::vec3 avatarPos = myAvatar.getPosition();
310 310
311 char stats[200];311 char stats[200];
312 sprintf(stats, "FPS = %3.0f Pkts/s = %d Bytes/s = %d Head(x,y,z)= %4.2f, %4.2f, %4.2f ", 312 sprintf(stats, "FPS = %3.0f Pkts/s = %d Bytes/s = %d Head(x,y,z)= %4.2f, %4.2f, %4.2f ",
@@ -398,8 +398,8 @@ void init(void) · 85 unmodified lines
398 if (noiseOn) { 398 if (noiseOn) {
399 myAvatar.setNoise(noise);399 myAvatar.setNoise(noise);
400 }400 }
401 myAvatar.setBodyPosition(start_location);401 myAvatar.setPosition(start_location);
402 myCamera.setPosition( start_location );402 myCamera.setPosition(start_location);
403 403
404 404
405#ifdef MARKER_CAPTURE405#ifdef MARKER_CAPTURE
@@ -440,7 +440,7 @@ void reset_sensors() · 34 unmodified lines
440 440
441 renderYawRate = 0; 441 renderYawRate = 0;
442 renderPitchRate = 0;442 renderPitchRate = 0;
443 myAvatar.setBodyPosition(start_location);443 myAvatar.setPosition(start_location);
444 headMouseX = WIDTH/2;444 headMouseX = WIDTH/2;
445 headMouseY = HEIGHT/2;445 headMouseY = HEIGHT/2;
446 446
@@ -540,7 +540,7 @@ void updateAvatar(float frametime) · 93 unmodified lines
540 // If I'm in paint mode, send a voxel out to VOXEL server agents.540 // If I'm in paint mode, send a voxel out to VOXEL server agents.
541 if (::paintOn) {541 if (::paintOn) {
542 542
543 glm::vec3 avatarPos = myAvatar.getBodyPosition();543 glm::vec3 avatarPos = myAvatar.getPosition();
544 544
545 // For some reason, we don't want to flip X and Z here.545 // For some reason, we don't want to flip X and Z here.
546 ::paintingVoxel.x = avatarPos.x/10.0; 546 ::paintingVoxel.x = avatarPos.x/10.0;
@@ -822,7 +822,7 @@ void display(void) · 275 unmodified lines
822 //----------------------------------------------------822 //----------------------------------------------------
823 // set the camera to third-person view behind my av823 // set the camera to third-person view behind my av
824 //---------------------------------------------------- 824 //----------------------------------------------------
825 myCamera.setTargetPosition ( myAvatar.getBodyPosition() );825 myCamera.setTargetPosition ( myAvatar.getPosition() );
826 myCamera.setYaw ( 180.0 - myAvatar.getBodyYaw() );826 myCamera.setYaw ( 180.0 - myAvatar.getBodyYaw() );
827 myCamera.setPitch ( 0.0 ); // temporarily, this must be 0.0 or else bad juju827 myCamera.setPitch ( 0.0 ); // temporarily, this must be 0.0 or else bad juju
828 myCamera.setRoll ( 0.0 );828 myCamera.setRoll ( 0.0 );
@@ -1264,7 +1264,7 @@ void shiftPaintingColor() · 435 unmodified lines
1264}1264}
1265 1265
1266void setupPaintingVoxel() {1266void setupPaintingVoxel() {
1267 glm::vec3 avatarPos = myAvatar.getBodyPosition();1267 glm::vec3 avatarPos = myAvatar.getPosition();
1268 1268
1269 ::paintingVoxel.x = avatarPos.z/-10.0; // voxel space x is negative z head space1269 ::paintingVoxel.x = avatarPos.z/-10.0; // voxel space x is negative z head space
1270 ::paintingVoxel.y = avatarPos.y/-10.0; // voxel space y is negative y head space1270 ::paintingVoxel.y = avatarPos.y/-10.0; // voxel space y is negative y head space
@@ -1493,7 +1493,7 @@ void idle(void) { · 222 unmodified lines
1493 //1493 //
1494 updateAvatar(deltaTime);1494 updateAvatar(deltaTime);
1495 1495
1496 //loop through all the other avatars and simulate them.1496 //loop through all the other avatars and simulate them...
1497 AgentList * agentList = AgentList::getInstance();1497 AgentList * agentList = AgentList::getInstance();
1498 for(std::vector<Agent>::iterator agent = agentList->getAgents().begin(); agent != agentList->getAgents().end(); agent++) 1498 for(std::vector<Agent>::iterator agent = agentList->getAgents().begin(); agent != agentList->getAgents().end(); agent++)
1499 {1499 {
@@ -1501,9 +1501,6 @@ void idle(void) { · 1 unmodified line
1501 {1501 {
1502 Head *avatar = (Head *)agent->getLinkedData();1502 Head *avatar = (Head *)agent->getLinkedData();
1503 avatar->simulate(deltaTime);1503 avatar->simulate(deltaTime);
1504
1505 //not ready yet...
1506 //myAvatar.testForCollision( avatar->getBodyPosition(), avatar->getGirth(), avatar->getHeight(), avatar->getBodyUpDirection() );
1507 }1504 }
1508 }1505 }
1509 1506
@@ -1514,7 +1511,6 @@ void idle(void) { · 4 unmodified lines
1514 1511
1515 glutPostRedisplay();1512 glutPostRedisplay();
1516 lastTimeIdle = check;1513 lastTimeIdle = check;
1517
1518 }1514 }
1519 1515
1520 // Read serial data 1516 // Read serial data

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