git.ucc.asn.au
/
atyndall
/
cits2231.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
d94feaa
)
(no commit message)
author
Ash Tyndall
<
[email protected]
>
Sat, 22 Oct 2011 04:53:41 +0000
(12:53 +0800)
committer
Ash Tyndall
<
[email protected]
>
Sat, 22 Oct 2011 04:53:41 +0000
(12:53 +0800)
scene.c
patch
|
blob
|
history
diff --git
a/scene.c
b/scene.c
index
99a95e5
..
f4b4343
100644
(file)
--- a/
scene.c
+++ b/
scene.c
@@
-328,6
+328,8
@@
void motion(int x, int y) {
\r
case STATE_OBJECT_ROTATION_TEXTURE_SCALE:
\r
\r
\r
case STATE_OBJECT_ROTATION_TEXTURE_SCALE:
\r
\r
+ // FML DOES NOT ROTATE PROPERLY
\r
+
\r
if ( buttonSelected == GLUT_LEFT_BUTTON ) {
\r
// w: rotate on y
\r
sceneObjs[curObject].rotation.y += diffx * rotateFactor;
\r
if ( buttonSelected == GLUT_LEFT_BUTTON ) {
\r
// w: rotate on y
\r
sceneObjs[curObject].rotation.y += diffx * rotateFactor;
\r
@@
-426,6
+428,9
@@
void display() {
glPushMatrix();
\r
SceneObject so = sceneObjs[i];
\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 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
@@
-434,9
+439,6
@@
void display() {
// Apply scaling vector
\r
glScalef(so.scale[0], so.scale[1], so.scale[2]);
\r
\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
// Apply texture
\r
if ( so.texture.id > 0 ) {
\r
getTexture(so.texture.id);
\r
UCC
git Repository :: git.ucc.asn.au