diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-09-16 08:58:18 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-09-16 08:58:18 +0400 |
commit | 2fb82920059257fd7ac8e33bfe53de13e7ed53bd (patch) | |
tree | cb8de3a839cb9878d0869d4e436a235346109c16 /source/gameengine/Ketsji/KX_Dome.cpp | |
parent | c2a1dcf6218cbd56126a5deb1aeaf212d67e54cb (diff) |
style cleanup
Diffstat (limited to 'source/gameengine/Ketsji/KX_Dome.cpp')
-rw-r--r-- | source/gameengine/Ketsji/KX_Dome.cpp | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/source/gameengine/Ketsji/KX_Dome.cpp b/source/gameengine/Ketsji/KX_Dome.cpp index 44c9cb1dab8..fd3a18a9d2a 100644 --- a/source/gameengine/Ketsji/KX_Dome.cpp +++ b/source/gameengine/Ketsji/KX_Dome.cpp @@ -592,7 +592,7 @@ void KX_Dome::CreateMeshDome180(void) cubebottom[0].u[2] = 0.0; cubebottom[0].v[2] = 0.0; - nfacesbottom = 1; + nfacesbottom = 1; /* Left face - two triangles */ @@ -682,12 +682,12 @@ void KX_Dome::CreateMeshDome180(void) cubetop.resize(4*nfacestop); SplitFace(cubetop,&nfacestop); cubebottom.resize(4*nfacesbottom); - SplitFace(cubebottom,&nfacesbottom); + SplitFace(cubebottom,&nfacesbottom); cubeleft.resize(4*nfacesleft); SplitFace(cubeleft,&nfacesleft); cuberight.resize(4*nfacesright); SplitFace(cuberight,&nfacesright); - } + } // Turn into a hemisphere for (j=0;j<3;j++) { @@ -763,13 +763,13 @@ void KX_Dome::CreateMeshDome250(void) cubefront[0].verts[1][0] = 1.0; cubefront[0].verts[1][1] = 1.0; - cubefront[0].verts[1][2] = 1.0; + cubefront[0].verts[1][2] = 1.0; cubefront[0].u[1] = uv_ratio; cubefront[0].v[1] = uv_ratio; cubefront[0].verts[2][0] =-1.0; cubefront[0].verts[2][1] = 1.0; - cubefront[0].verts[2][2] = 1.0; + cubefront[0].verts[2][2] = 1.0; cubefront[0].u[2] = 0.0; cubefront[0].v[2] = uv_ratio; @@ -782,13 +782,13 @@ void KX_Dome::CreateMeshDome250(void) cubefront[1].verts[1][0] =-1.0; cubefront[1].verts[1][1] = 1.0; - cubefront[1].verts[1][2] =-1.0; + cubefront[1].verts[1][2] =-1.0; cubefront[1].u[1] = 0.0; cubefront[1].v[1] = 0.0; cubefront[1].verts[2][0] = 1.0; cubefront[1].verts[2][1] = 1.0; - cubefront[1].verts[2][2] =-1.0; + cubefront[1].verts[2][2] =-1.0; cubefront[1].u[2] = uv_ratio; cubefront[1].v[2] = 0.0; @@ -803,13 +803,13 @@ void KX_Dome::CreateMeshDome250(void) cubeleft[0].verts[1][0] =-1.0; cubeleft[0].verts[1][1] =-verts_height; - cubeleft[0].verts[1][2] = 1.0; + cubeleft[0].verts[1][2] = 1.0; cubeleft[0].u[1] = uv_base; cubeleft[0].v[1] = uv_ratio; cubeleft[0].verts[2][0] =-1.0; cubeleft[0].verts[2][1] =-verts_height; - cubeleft[0].verts[2][2] =-1.0; + cubeleft[0].verts[2][2] =-1.0; cubeleft[0].u[2] = uv_base; cubeleft[0].v[2] = 0.0; @@ -822,13 +822,13 @@ void KX_Dome::CreateMeshDome250(void) cubeleft[1].verts[1][0] =-1.0; cubeleft[1].verts[1][1] = 1.0; - cubeleft[1].verts[1][2] =-1.0; + cubeleft[1].verts[1][2] =-1.0; cubeleft[1].u[1] = uv_ratio; cubeleft[1].v[1] = 0.0; cubeleft[1].verts[2][0] =-1.0; cubeleft[1].verts[2][1] = 1.0; - cubeleft[1].verts[2][2] = 1.0; + cubeleft[1].verts[2][2] = 1.0; cubeleft[1].u[2] = uv_ratio; cubeleft[1].v[2] = uv_ratio; @@ -843,13 +843,13 @@ void KX_Dome::CreateMeshDome250(void) cuberight[0].verts[1][0] = 1.0; cuberight[0].verts[1][1] =-verts_height; - cuberight[0].verts[1][2] =-1.0; + cuberight[0].verts[1][2] =-1.0; cuberight[0].u[1] = uv_height; cuberight[0].v[1] = 0.0; cuberight[0].verts[2][0] = 1.0; cuberight[0].verts[2][1] =-verts_height; - cuberight[0].verts[2][2] = 1.0; + cuberight[0].verts[2][2] = 1.0; cuberight[0].u[2] = uv_height; cuberight[0].v[2] = uv_ratio; @@ -862,13 +862,13 @@ void KX_Dome::CreateMeshDome250(void) cuberight[1].verts[1][0] = 1.0; cuberight[1].verts[1][1] = 1.0; - cuberight[1].verts[1][2] = 1.0; + cuberight[1].verts[1][2] = 1.0; cuberight[1].u[1] = 0.0; cuberight[1].v[1] = uv_ratio; cuberight[1].verts[2][0] = 1.0; cuberight[1].verts[2][1] = 1.0; - cuberight[1].verts[2][2] =-1.0; + cuberight[1].verts[2][2] =-1.0; cuberight[1].u[2] = 0.0; cuberight[1].v[2] = 0.0; @@ -883,13 +883,13 @@ void KX_Dome::CreateMeshDome250(void) cubetop[0].verts[1][0] = 1.0; cubetop[0].verts[1][1] =-verts_height; - cubetop[0].verts[1][2] = 1.0; + cubetop[0].verts[1][2] = 1.0; cubetop[0].u[1] = uv_ratio; cubetop[0].v[1] = uv_height; cubetop[0].verts[2][0] =-1.0; cubetop[0].verts[2][1] =-verts_height; - cubetop[0].verts[2][2] = 1.0; + cubetop[0].verts[2][2] = 1.0; cubetop[0].u[2] = 0.0; cubetop[0].v[2] = uv_height; @@ -902,13 +902,13 @@ void KX_Dome::CreateMeshDome250(void) cubetop[1].verts[1][0] =-1.0; cubetop[1].verts[1][1] = 1.0; - cubetop[1].verts[1][2] = 1.0; + cubetop[1].verts[1][2] = 1.0; cubetop[1].u[1] = 0.0; cubetop[1].v[1] = 0.0; cubetop[1].verts[2][0] = 1.0; cubetop[1].verts[2][1] = 1.0; - cubetop[1].verts[2][2] = 1.0; + cubetop[1].verts[2][2] = 1.0; cubetop[1].u[2] = uv_ratio; cubetop[1].v[2] = 0.0; @@ -923,13 +923,13 @@ void KX_Dome::CreateMeshDome250(void) cubebottom[0].verts[1][0] = 1.0; cubebottom[0].verts[1][1] = 1.0; - cubebottom[0].verts[1][2] =-1.0; + cubebottom[0].verts[1][2] =-1.0; cubebottom[0].u[1] = uv_ratio; cubebottom[0].v[1] = uv_ratio; cubebottom[0].verts[2][0] =-1.0; cubebottom[0].verts[2][1] = 1.0; - cubebottom[0].verts[2][2] =-1.0; + cubebottom[0].verts[2][2] =-1.0; cubebottom[0].u[2] = 0.0; cubebottom[0].v[2] = uv_ratio; @@ -942,13 +942,13 @@ void KX_Dome::CreateMeshDome250(void) cubebottom[1].verts[1][0] =-1.0; cubebottom[1].verts[1][1] =-verts_height; - cubebottom[1].verts[1][2] =-1.0; + cubebottom[1].verts[1][2] =-1.0; cubebottom[1].u[1] = 0.0; cubebottom[1].v[1] = uv_base; cubebottom[1].verts[2][0] = 1.0; cubebottom[1].verts[2][1] =-verts_height; - cubebottom[1].verts[2][2] =-1.0; + cubebottom[1].verts[2][2] =-1.0; cubebottom[1].u[2] = uv_ratio; cubebottom[1].v[2] = uv_base; @@ -963,7 +963,7 @@ void KX_Dome::CreateMeshDome250(void) cubetop.resize(4*nfacestop); SplitFace(cubetop,&nfacestop); cubebottom.resize(4*nfacesbottom); - SplitFace(cubebottom,&nfacesbottom); + SplitFace(cubebottom,&nfacesbottom); cubeleft.resize(4*nfacesleft); SplitFace(cubeleft,&nfacesleft); cuberight.resize(4*nfacesright); @@ -986,13 +986,13 @@ void KX_Dome::CreateMeshDome250(void) //flatten onto xz plane for (i=0;i<nfacesfront;i++) - FlattenDome(cubefront[i].verts); + FlattenDome(cubefront[i].verts); for (i=0;i<nfacestop;i++) FlattenDome(cubetop[i].verts); for (i=0;i<nfacesbottom;i++) FlattenDome(cubebottom[i].verts); for (i=0;i<nfacesleft;i++) - FlattenDome(cubeleft[i].verts); + FlattenDome(cubeleft[i].verts); for (i=0;i<nfacesright;i++) FlattenDome(cuberight[i].verts); } @@ -1417,7 +1417,7 @@ void KX_Dome::SplitFace(vector <DomeFace>& face, int *nfaces) face[n2+2].u[2] = (face[i].u[2] + face[i].u[0]) /2; face[n2+2].v[0] = (face[i].v[0] + face[i].v[1]) /2; face[n2+2].v[1] = (face[i].v[1] + face[i].v[2]) /2; - face[n2+2].v[2] = (face[i].v[2] + face[i].v[0]) /2; + face[n2+2].v[2] = (face[i].v[2] + face[i].v[0]) /2; //face[i].verts[0] = face[i].verts[0]; face[i].verts[1] = (face[i].verts[0] + face[i].verts[1]) /2; @@ -1427,7 +1427,7 @@ void KX_Dome::SplitFace(vector <DomeFace>& face, int *nfaces) face[i].u[2] = (face[i].u[0] + face[i].u[2]) /2; //face[i].v[0] = face[i].v[0]; face[i].v[1] = (face[i].v[0] + face[i].v[1]) /2; - face[i].v[2] = (face[i].v[0] + face[i].v[2]) /2; + face[i].v[2] = (face[i].v[0] + face[i].v[2]) /2; n2 += 3; // number of faces } @@ -1858,7 +1858,7 @@ void KX_Dome::DrawDomeFisheye(void) glBindTexture(GL_TEXTURE_2D, domefacesId[0]); GLDrawTriangles(cubetop, nfacestop); - // bottom triangle + // bottom triangle glBindTexture(GL_TEXTURE_2D, domefacesId[1]); GLDrawTriangles(cubebottom, nfacesbottom); |