Showing the changes to interface/src/main.cpp (1 of 7 files). Show all
Unified · Split
| @@ -306,7 +306,7 @@ void displayStats(void) · 305 unmodified lines | ||
| 306 | 306 | char legend2[] = "* - toggle stars, & - toggle paint mode, '-' - send erase all, '%' - send add scene"; |
| 307 | 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 | 311 | char stats[200]; |
| 312 | 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 | 398 | if (noiseOn) { |
| 399 | 399 | myAvatar.setNoise(noise); |
| 400 | 400 | } |
| 401 | − myAvatar.setBodyPosition(start_location); | |
| 402 | − myCamera.setPosition( start_location ); | |
| 401 | + myAvatar.setPosition(start_location); | |
| 402 | + myCamera.setPosition(start_location); | |
| 403 | 403 | |
| 404 | 404 | |
| 405 | 405 | #ifdef MARKER_CAPTURE |
| @@ -440,7 +440,7 @@ void reset_sensors() · 34 unmodified lines | ||
| 440 | 440 | |
| 441 | 441 | renderYawRate = 0; |
| 442 | 442 | renderPitchRate = 0; |
| 443 | − myAvatar.setBodyPosition(start_location); | |
| 443 | + myAvatar.setPosition(start_location); | |
| 444 | 444 | headMouseX = WIDTH/2; |
| 445 | 445 | headMouseY = HEIGHT/2; |
| 446 | 446 | |
| @@ -540,7 +540,7 @@ void updateAvatar(float frametime) · 93 unmodified lines | ||
| 540 | 540 | // If I'm in paint mode, send a voxel out to VOXEL server agents. |
| 541 | 541 | if (::paintOn) { |
| 542 | 542 | |
| 543 | − glm::vec3 avatarPos = myAvatar.getBodyPosition(); | |
| 543 | + glm::vec3 avatarPos = myAvatar.getPosition(); | |
| 544 | 544 | |
| 545 | 545 | // For some reason, we don't want to flip X and Z here. |
| 546 | 546 | ::paintingVoxel.x = avatarPos.x/10.0; |
| @@ -822,7 +822,7 @@ void display(void) · 275 unmodified lines | ||
| 822 | 822 | //---------------------------------------------------- |
| 823 | 823 | // set the camera to third-person view behind my av |
| 824 | 824 | //---------------------------------------------------- |
| 825 | − myCamera.setTargetPosition ( myAvatar.getBodyPosition() ); | |
| 825 | + myCamera.setTargetPosition ( myAvatar.getPosition() ); | |
| 826 | 826 | myCamera.setYaw ( 180.0 - myAvatar.getBodyYaw() ); |
| 827 | 827 | myCamera.setPitch ( 0.0 ); // temporarily, this must be 0.0 or else bad juju |
| 828 | 828 | myCamera.setRoll ( 0.0 ); |
| @@ -1264,7 +1264,7 @@ void shiftPaintingColor() · 435 unmodified lines | ||
| 1264 | 1264 | } |
| 1265 | 1265 | |
| 1266 | 1266 | void setupPaintingVoxel() { |
| 1267 | − glm::vec3 avatarPos = myAvatar.getBodyPosition(); | |
| 1267 | + glm::vec3 avatarPos = myAvatar.getPosition(); | |
| 1268 | 1268 | |
| 1269 | 1269 | ::paintingVoxel.x = avatarPos.z/-10.0; // voxel space x is negative z head space |
| 1270 | 1270 | ::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 | 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 | 1497 | AgentList * agentList = AgentList::getInstance(); |
| 1498 | 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 | 1502 | Head *avatar = (Head *)agent->getLinkedData(); |
| 1503 | 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 | 1512 | glutPostRedisplay(); |
| 1516 | 1513 | lastTimeIdle = check; |
| 1517 | − | |
| 1518 | 1514 | } |
| 1519 | 1515 | |
| 1520 | 1516 | // Read serial data |