Mercurial > hg > Game > Cerium
comparison Renderer/Engine/SceneGraphRoot.cc @ 751:1666dba6f6d9 draft
rendering, move_coll parallel running
author | hiroki@henri.cr.ie.u-ryukyu.ac.jp |
---|---|
date | Tue, 26 Jan 2010 16:18:24 +0900 |
parents | 18d31d18a6b2 |
children | 77f936380930 |
comparison
equal
deleted
inserted
replaced
750:fbcd4ed51549 | 751:1666dba6f6d9 |
---|---|
429 return; | 429 return; |
430 } | 430 } |
431 | 431 |
432 /*removeのflagをもとにtreeを形成*/ | 432 /*removeのflagをもとにtreeを形成*/ |
433 while (t) { | 433 while (t) { |
434 SceneGraphPtr c = NULL; | 434 SceneGraphPtr c = NULL; |
435 if (!t->isRemoved()) { | 435 if (!t->isRemoved()) { |
436 c = t->clone(); | 436 c = t->clone(); |
437 addNext(c); | 437 addNext(c); |
438 cur_parent->addChild(c); | 438 cur_parent->addChild(c); |
439 c->frame = t->frame; | 439 c->frame = t->frame; |
440 /*親の回転、座標から、子の回転、座標を算出*/ | 440 /*親の回転、座標から、子の回転、座標を算出*/ |
441 get_matrix(c->matrix, c->angle, c->xyz, cur_parent->matrix); | 441 get_matrix(c->matrix, c->angle, c->xyz, cur_parent->matrix); |
442 /*法線用の行列。Cameraの行列を抜いている(Cameraのコンストラクタで、単位行列にしている)*/ | 442 /*法線用の行列。Cameraの行列を抜いている(Cameraのコンストラクタで、単位行列にしている)*/ |
443 get_matrix(c->real_matrix, c->angle, c->xyz, cur_parent->real_matrix); | 443 get_matrix(c->real_matrix, c->angle, c->xyz, cur_parent->real_matrix); |
444 } | 444 } |
445 | 445 |
446 if (t->children != NULL && c != NULL) { | 446 if (t->children != NULL && c != NULL) { |
447 cur_parent = c; | 447 cur_parent = c; |
448 t = t->children; | 448 t = t->children; |
449 } else if (t->brother != NULL) { | 449 } else if (t->brother != NULL) { |
450 t = t->brother; | 450 t = t->brother; |
451 } else { | |
452 while (t) { | |
453 if (t->brother != NULL) { | |
454 t = t->brother; | |
455 break; | |
451 } else { | 456 } else { |
452 while (t) { | 457 if (t->parent == NULL) { |
453 if (t->brother != NULL) { | 458 t = NULL; |
454 t = t->brother; | 459 break; |
455 break; | 460 } else { |
456 } else { | |
457 if (t->parent == NULL) { | |
458 t = NULL; | |
459 break; | |
460 } else { | |
461 cur_parent = cur_parent->parent; | 461 cur_parent = cur_parent->parent; |
462 t = t->parent; | 462 t = t->parent; |
463 | 463 } |
464 } | |
465 } | |
466 } | |
467 } | 464 } |
465 } | |
466 } | |
468 } | 467 } |
469 | 468 |
470 | 469 |
471 | 470 |
472 // 現在、allExecute が終わった時点では | 471 // 現在、allExecute が終わった時点では |