History

renamed "bodyPosition" to "position". (This corresponds to the position of the avatar on the ground, where y=0). I will next add a new "getBodyPosition" which returns the avatar's center of gravity - is useful for certain purposes, such as setting collision volumes, etc.

Jeffrey Ventrella committed 13 years ago

Commit eb631e21 parent a73ea8c6 files · +29 −29Browse files

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

Unified · Split

interface/src/main.cpp+7−7
@@ -304,7 +304,7 @@ void displayStats(void) · 303 unmodified lines
304304 char legend2[] = "* - toggle stars, & - toggle paint mode, '-' - send erase all, '%' - send add scene";
305305 drawtext(10, statsVerticalOffset + 32, 0.10f, 0, 1.0, 0, legend2);
306306
307− glm::vec3 avatarPos = myAvatar.getBodyPosition();
307+ glm::vec3 avatarPos = myAvatar.getPosition();
308308
309309 char stats[200];
310310 sprintf(stats, "FPS = %3.0f Pkts/s = %d Bytes/s = %d Head(x,y,z)= %4.2f, %4.2f, %4.2f ",
@@ -396,8 +396,8 @@ void init(void) · 85 unmodified lines
396396 if (noiseOn) {
397397 myAvatar.setNoise(noise);
398398 }
399− myAvatar.setBodyPosition(start_location);
400− myCamera.setPosition( start_location );
399+ myAvatar.setPosition(start_location);
400+ myCamera.setPosition(start_location);
401401
402402
403403 #ifdef MARKER_CAPTURE
@@ -438,7 +438,7 @@ void reset_sensors() · 34 unmodified lines
438438
439439 renderYawRate = 0;
440440 renderPitchRate = 0;
441− myAvatar.setBodyPosition(start_location);
441+ myAvatar.setPosition(start_location);
442442 headMouseX = WIDTH/2;
443443 headMouseY = HEIGHT/2;
444444
@@ -551,7 +551,7 @@ void updateAvatar(float frametime) · 106 unmodified lines
551551 // If I'm in paint mode, send a voxel out to VOXEL server agents.
552552 if (::paintOn) {
553553
554− glm::vec3 avatarPos = myAvatar.getBodyPosition();
554+ glm::vec3 avatarPos = myAvatar.getPosition();
555555
556556 // For some reason, we don't want to flip X and Z here.
557557 ::paintingVoxel.x = avatarPos.x/10.0;
@@ -833,7 +833,7 @@ void display(void) · 275 unmodified lines
833833 //----------------------------------------------------
834834 // set the camera to third-person view behind my av
835835 //----------------------------------------------------
836− myCamera.setTargetPosition ( myAvatar.getBodyPosition() );
836+ myCamera.setTargetPosition ( myAvatar.getPosition() );
837837 myCamera.setYaw ( 180.0 - myAvatar.getBodyYaw() );
838838 myCamera.setPitch ( 0.0 ); // temporarily, this must be 0.0 or else bad juju
839839 myCamera.setRoll ( 0.0 );
@@ -1265,7 +1265,7 @@ void shiftPaintingColor() · 425 unmodified lines
12651265 }
12661266
12671267 void setupPaintingVoxel() {
1268− glm::vec3 avatarPos = myAvatar.getBodyPosition();
1268+ glm::vec3 avatarPos = myAvatar.getPosition();
12691269
12701270 ::paintingVoxel.x = avatarPos.z/-10.0; // voxel space x is negative z head space
12711271 ::paintingVoxel.y = avatarPos.y/-10.0; // voxel space y is negative y head space

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