Mercurial > hg > Members > kono > Cerium
comparison Renderer/Engine/sys.cc @ 678:e201be3f6897
add Load light info for some spe
author | yutaka@henri.cr.ie.u-ryukyu.ac.jp |
---|---|
date | Sun, 06 Dec 2009 07:40:26 +0900 |
parents | 735f76483bb2 |
children | 6a80ca9a65d9 |
comparison
equal
deleted
inserted
replaced
676:a06eef665c45 | 678:e201be3f6897 |
---|---|
239 { | 239 { |
240 xyz[0] += x; | 240 xyz[0] += x; |
241 xyz[1] += y; | 241 xyz[1] += y; |
242 xyz[2] += z; | 242 xyz[2] += z; |
243 } | 243 } |
244 | |
245 /** | |
246 * ベクトルに行列を乗算する | |
247 * @param[out] v vector (float[4]) | |
248 * @param[in] m matrix (float[16]) | |
249 */ | |
250 void | |
251 ApplyMatrix(float *v, float *m) | |
252 { | |
253 float t[4]; | |
254 | |
255 t[0] = v[0]; | |
256 t[1] = v[1]; | |
257 t[2] = v[2]; | |
258 t[3] = v[3]; | |
259 | |
260 for (int i = 0; i < 4; i++) { | |
261 v[i] = t[0]*m[i] + t[1]*m[i+4] + t[2]*m[i+8] + t[3]*m[i+12]; | |
262 } | |
263 } | |
264 |