History

changed some spacing formatting things

Jeffrey Ventrella committed 13 years ago

Commit 65181cb1 parent ef76c6b5 files · +54 −88Browse files

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

Unified · Split

interface/src/main.cpp+35−47
@@ -692,14 +692,14 @@ void displaySide(Camera& whichCamera) { · 691 unmodified lines
692692 float sphereRadius = 0.25f;
693693 glColor3f(1,0,0);
694694 glPushMatrix();
695− glutSolidSphere( sphereRadius, 15, 15 );
695+ glutSolidSphere(sphereRadius, 15, 15);
696696 glPopMatrix();
697697
698698 //draw a grid ground plane....
699699 drawGroundPlaneGrid(10.f);
700700
701701 // Draw voxels
702− if ( showingVoxels )
702+ if (showingVoxels)
703703 {
704704 voxels.render();
705705 }
@@ -984,15 +984,15 @@ void display(void) · 278 unmodified lines
984984 glMateriali(GL_FRONT, GL_SHININESS, 96);
985985
986986 // camera settings
987− if ( ::lookingInMirror ) {
987+ if (::lookingInMirror) {
988988 // set the camera to looking at my own face
989− myCamera.setTargetPosition ( myAvatar.getHeadPosition() );
990− myCamera.setTargetYaw ( myAvatar.getBodyYaw() - 180.0f ); // 180 degrees from body yaw
991− myCamera.setPitch ( 0.0 );
992− myCamera.setRoll ( 0.0 );
993− myCamera.setUpShift ( 0.0 );
994− myCamera.setDistance ( 0.2 );
995− myCamera.setTightness ( 100.0f );
989+ myCamera.setTargetPosition (myAvatar.getHeadPosition());
990+ myCamera.setTargetYaw (myAvatar.getBodyYaw() - 180.0f); // 180 degrees from body yaw
991+ myCamera.setPitch (0.0);
992+ myCamera.setRoll (0.0);
993+ myCamera.setUpShift (0.0);
994+ myCamera.setDistance (0.2);
995+ myCamera.setTightness (100.0f);
996996 } else {
997997
998998 //float firstPersonPitch = 20.0f;
@@ -1010,36 +1010,24 @@ void display(void) · 11 unmodified lines
10101010 float thirdPersonDistance = 1.2f;
10111011 float thirdPersonTightness = 8.0f;
10121012
1013− if ( USING_FIRST_PERSON_EFFECT ) {
1013+ if (USING_FIRST_PERSON_EFFECT) {
10141014 float ff = 0.0;
10151015 float min = 0.1;
10161016 float max = 0.5;
10171017
1018− if ( myAvatar.getIsNearInteractingOther()){
1019− if ( myAvatar.getSpeed() < max ) {
1018+ if (myAvatar.getIsNearInteractingOther()){
1019+ if (myAvatar.getSpeed() < max) {
10201020
10211021 float s = (myAvatar.getSpeed()- min)/max ;
10221022 ff = 1.0 - s;
10231023 }
10241024 }
1025−
1026− /*
1027− if ( ff < 0.8 ) {
1028− myAvatar.setDisplayingHead( true );
1029− } else {
1030− myAvatar.setDisplayingHead( false );
1031− }
1032− */
1033−
1034− //printf( "ff = %f\n", ff );
10351025
1036− myCamera.setPitch ( thirdPersonPitch + ff * ( firstPersonPitch - thirdPersonPitch ));
1037− myCamera.setUpShift ( thirdPersonUpShift + ff * ( firstPersonUpShift - thirdPersonUpShift ));
1038− myCamera.setDistance ( thirdPersonDistance + ff * ( firstPersonDistance - thirdPersonDistance ));
1039− myCamera.setTightness ( thirdPersonTightness + ff * ( firstPersonTightness - thirdPersonTightness ));
1040−
1026+ myCamera.setPitch (thirdPersonPitch + ff * (firstPersonPitch - thirdPersonPitch ));
1027+ myCamera.setUpShift (thirdPersonUpShift + ff * (firstPersonUpShift - thirdPersonUpShift ));
1028+ myCamera.setDistance (thirdPersonDistance + ff * (firstPersonDistance - thirdPersonDistance ));
1029+ myCamera.setTightness (thirdPersonTightness + ff * (firstPersonTightness - thirdPersonTightness));
10411030
1042−
10431031 // this version uses a ramp-up/ramp-down timer in the camera to determine shift between first and thirs-person view
10441032 /*
10451033 if ( myAvatar.getSpeed() < 0.02 ) {
@@ -1073,13 +1061,13 @@ void display(void) · 27 unmodified lines
10731061 myCamera.setTightness(thirdPersonTightness);
10741062 }
10751063
1076− myCamera.setTargetPosition( myAvatar.getHeadPosition() );
1077− myCamera.setTargetYaw ( myAvatar.getBodyYaw() );
1078− myCamera.setRoll ( 0.0 );
1064+ myCamera.setTargetPosition(myAvatar.getHeadPosition());
1065+ myCamera.setTargetYaw (myAvatar.getBodyYaw());
1066+ myCamera.setRoll (0.0);
10791067 }
10801068
10811069 // important...
1082− myCamera.update( 1.f/FPS );
1070+ myCamera.update(1.f/FPS);
10831071
10841072 // Note: whichCamera is used to pick between the normal camera myCamera for our
10851073 // main camera, vs, an alternate camera. The alternate camera we support right now
@@ -1095,11 +1083,11 @@ void display(void) · 9 unmodified lines
10951083 if (::viewFrustumFromOffset && ::frustumOn) {
10961084
10971085 // set the camera to third-person view but offset so we can see the frustum
1098− viewFrustumOffsetCamera.setTargetYaw( ::viewFrustumOffsetYaw + myAvatar.getBodyYaw() );
1099− viewFrustumOffsetCamera.setPitch ( ::viewFrustumOffsetPitch );
1100− viewFrustumOffsetCamera.setRoll ( ::viewFrustumOffsetRoll );
1101− viewFrustumOffsetCamera.setUpShift ( ::viewFrustumOffsetUp );
1102− viewFrustumOffsetCamera.setDistance ( ::viewFrustumOffsetDistance );
1086+ viewFrustumOffsetCamera.setTargetYaw(::viewFrustumOffsetYaw + myAvatar.getBodyYaw() );
1087+ viewFrustumOffsetCamera.setPitch (::viewFrustumOffsetPitch );
1088+ viewFrustumOffsetCamera.setRoll (::viewFrustumOffsetRoll );
1089+ viewFrustumOffsetCamera.setUpShift (::viewFrustumOffsetUp );
1090+ viewFrustumOffsetCamera.setDistance (::viewFrustumOffsetDistance);
11031091 viewFrustumOffsetCamera.update(1.f/FPS);
11041092 whichCamera = viewFrustumOffsetCamera;
11051093 }
@@ -1109,11 +1097,11 @@ void display(void) · 3 unmodified lines
11091097 // or could be viewFrustumOffsetCamera if in offset mode
11101098 // I changed the ordering here - roll is FIRST (JJV)
11111099
1112− glRotatef ( whichCamera.getRoll(), IDENTITY_FRONT.x, IDENTITY_FRONT.y, IDENTITY_FRONT.z );
1113− glRotatef ( whichCamera.getPitch(), IDENTITY_RIGHT.x, IDENTITY_RIGHT.y, IDENTITY_RIGHT.z );
1114− glRotatef ( 180.0 - whichCamera.getYaw(), IDENTITY_UP.x, IDENTITY_UP.y, IDENTITY_UP.z );
1100+ glRotatef ( whichCamera.getRoll(), IDENTITY_FRONT.x, IDENTITY_FRONT.y, IDENTITY_FRONT.z);
1101+ glRotatef ( whichCamera.getPitch(), IDENTITY_RIGHT.x, IDENTITY_RIGHT.y, IDENTITY_RIGHT.z);
1102+ glRotatef (180.0 - whichCamera.getYaw(), IDENTITY_UP.x, IDENTITY_UP.y, IDENTITY_UP.z );
11151103
1116− glTranslatef( -whichCamera.getPosition().x, -whichCamera.getPosition().y, -whichCamera.getPosition().z );
1104+ glTranslatef(-whichCamera.getPosition().x, -whichCamera.getPosition().y, -whichCamera.getPosition().z);
11171105
11181106 if (::oculusOn) {
11191107 displayOculus(whichCamera);
@@ -1666,16 +1654,16 @@ void idle(void) { · 546 unmodified lines
16661654
16671655 // update behaviors for avatar hand movement: handControl takes mouse values as input,
16681656 // and gives back 3D values modulated for smooth transitioning between interaction modes.
1669− handControl.update( mouseX, mouseY );
1670− myAvatar.setHandMovementValues( handControl.getValues() );
1657+ handControl.update(mouseX, mouseY);
1658+ myAvatar.setHandMovementValues(handControl.getValues());
16711659
16721660 // tell my avatar if the mouse is being pressed...
1673− if ( mousePressed) {
1661+ if (mousePressed) {
16741662 myAvatar.setMousePressed(mousePressed);
16751663 }
16761664
16771665 // walking triggers the handControl to stop
1678− if ( myAvatar.getMode() == AVATAR_MODE_WALKING ) {
1666+ if (myAvatar.getMode() == AVATAR_MODE_WALKING) {
16791667 handControl.stop();
16801668 }
16811669
@@ -1868,7 +1856,7 @@ int main(int argc, const char * argv[]) · 186 unmodified lines
18681856
18691857 #ifdef _WIN32
18701858 WSADATA WsaData;
1871− int wsaresult = WSAStartup( MAKEWORD(2,2), &WsaData );
1859+ int wsaresult = WSAStartup(MAKEWORD(2,2), &WsaData);
18721860 #endif
18731861
18741862 // start the agentList threads

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