\r
// **NOTE: Currently a work in progress, does not work correctly\r
printf("cam angle: %f\n", rotate*camRotateFactor);\r
+ // float arc = arctan()\r
sceneObjs[curObject].x += diffx * sin(rotate*camRotateFactor);\r
sceneObjs[curObject].z += diffx * cos(rotate*camRotateFactor);\r
\r
glPushMatrix();\r
\r
/* Perform scene rotations based on user mouse/keyboard input. */\r
- glRotatef(rotate*camRotateFactor, 0.0, 1.0, 0.0);\r
+ //glRotatef(rotate*camRotateFactor, 0.0, 1.0, 0.0);\r
glTranslatef(camx, camy, camz);\r
glRotatef(keyrot, 1.0, 0.0, 0.0);\r
\r
glPushMatrix();\r
SceneObject so = sceneObjs[i];\r
\r
+ // Apply translation vector\r
+ glTranslatef(so.x, so.y, so.z);\r
+\r
// Apply independant rotation vectors\r
glRotatef(so.rotation.x, 1.0, 0.0, 0.0);\r
glRotatef(so.rotation.y, 0.0, 1.0, 0.0);\r
// Apply scaling vector\r
glScalef(so.scale[0], so.scale[1], so.scale[2]);\r
\r
- // Apply translation vector\r
- glTranslatef(so.x, so.y, so.z);\r
-\r
// Apply texture\r
if ( so.texture.id > 0 ) {\r
getTexture(so.texture.id);\r
glBindTexture(GL_TEXTURE_2D, 0);\r
glPopMatrix();\r
}\r
- \r
\r
// Draw a white ball over the light sources\r
glDisable(GL_LIGHTING);\r