History

fix to LOD bug caused by flip-flopped X and Z, add color randomization to inserted voxels on server, added head position display to display_stats()

ZappoMan committed 13 years ago

Commit 57829781 parent b017f9a4 files · +66 −14Browse files

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

Unified · Split

interface/src/main.cpp+6−3
@@ -98,6 +98,7 @@ Head myHead; // The rendered head of oneself · 97 unmodified lines
9898
9999 char starFile[] = "https://s3-us-west-1.amazonaws.com/highfidelity/stars.txt";
100100 FieldOfView fov;
101+
101102 Stars stars;
102103 #ifdef STARFIELD_KEYS
103104 int starsTiles = 20;
@@ -255,10 +256,12 @@ void display_stats(void) · 151 unmodified lines
255256
256257 char legend2[] = "* - toggle stars, & - toggle paint mode";
257258 drawtext(10, 32, 0.10f, 0, 1.0, 0, legend2);
259+
260+ glm::vec3 headPos = myHead.getPos();
258261
259262 char stats[200];
260− sprintf(stats, "FPS = %3.0f Pkts/s = %d Bytes/s = %d ",
261− FPS, packets_per_second, bytes_per_second);
263+ sprintf(stats, "FPS = %3.0f Pkts/s = %d Bytes/s = %d Head(x,y,z)=( %f , %f , %f )",
264+ FPS, packets_per_second, bytes_per_second, headPos.x,headPos.y,headPos.z);
262265 drawtext(10, 49, 0.10f, 0, 1.0, 0, stats);
263266 if (serialPort.active) {
264267 sprintf(stats, "ADC samples = %d, LED = %d",
@@ -490,7 +493,7 @@ void simulateHead(float frametime) · 225 unmodified lines
490493 char broadcast_string[MAX_BROADCAST_STRING];
491494 int broadcast_bytes = myHead.getBroadcastData(broadcast_string);
492495 agentList.broadcastToAgents(broadcast_string, broadcast_bytes,AgentList::AGENTS_OF_TYPE_VOXEL_AND_INTERFACE);
493−
496+
494497 // If I'm in paint mode, send a voxel out to VOXEL server agents.
495498 if (::paintOn) {
496499