Mercurial > hg > Game > Cerium
comparison Renderer/Engine/SceneGraph.cc @ 1366:ba6c080bf9a4 draft
work scale api.
author | Yutaka_Kinjyo <yutaka@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 18 Jan 2012 18:56:04 +0900 |
parents | e51127dbd63c |
children | 6748a09c63cb |
comparison
equal
deleted
inserted
replaced
1353:df50c95267ba | 1366:ba6c080bf9a4 |
---|---|
1272 for(int i=0;i<16;i++) m[i] = matrix[i]; | 1272 for(int i=0;i<16;i++) m[i] = matrix[i]; |
1273 get_matrix(matrix, angle, t, m); | 1273 get_matrix(matrix, angle, t, m); |
1274 } | 1274 } |
1275 | 1275 |
1276 void | 1276 void |
1277 SceneGraph::scaleIt(float *scale) | 1277 SceneGraph::scaleIt(float sx, float sy, float sz) |
1278 { | 1278 { |
1279 for(int i=0;i<4;i++) { | 1279 |
1280 for(int j=0;i<3;j++) { | 1280 float scale[3] = {sx, sy, sz}; |
1281 | |
1282 /* | |
1283 * | sx*r sx*r sx*r 0 | | |
1284 * | sy*r sy*r sy*r 0 | | |
1285 * | sz*r sz*r sz*r 0 | | |
1286 * | t t t 1 | | |
1287 */ | |
1288 | |
1289 for(int i=0;i<3;i++) { | |
1290 for(int j=0;j<3;j++) { | |
1281 matrix[i*4+j] = matrix[i*4+j]*scale[i]; | 1291 matrix[i*4+j] = matrix[i*4+j]*scale[i]; |
1282 } | 1292 } |
1283 } | 1293 } |
1284 } | 1294 } |
1285 | 1295 |