Mercurial > hg > Members > kono > Cerium
diff Renderer/Engine/SceneGraph.cc @ 724:6d11ecef3b74
Small clean up of Rendering Engine
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 19 Dec 2009 14:36:37 +0900 |
parents | d0b8860c17f8 |
children | 24a37fe8419a |
line wrap: on
line diff
--- a/Renderer/Engine/SceneGraph.cc Sat Dec 19 13:15:19 2009 +0900 +++ b/Renderer/Engine/SceneGraph.cc Sat Dec 19 14:36:37 2009 +0900 @@ -95,7 +95,7 @@ * 何の情報も持ってない SceneGraph の生成 * 今のところ、とりあえず木構造の繋がりに使うぐらい */ -SceneGraph::SceneGraph(void) +SceneGraph::SceneGraph() { init(); finalize = &SceneGraph::finalize_copy; @@ -150,7 +150,7 @@ } void -SceneGraph::init(void) +SceneGraph::init() { next = NULL; prev = NULL; @@ -186,7 +186,7 @@ frame = 0; } -SceneGraph::~SceneGraph(void) +SceneGraph::~SceneGraph() { (this->*finalize)(); } @@ -196,7 +196,7 @@ * polygon data を削除 */ void -SceneGraph::finalize_original(void) +SceneGraph::finalize_original() { //delete [] data; free(coord_xyz); @@ -209,7 +209,7 @@ * polygon data は削除しない。オリジナルの方で削除する。 */ void -SceneGraph::finalize_copy(void) +SceneGraph::finalize_copy() { } @@ -281,7 +281,7 @@ } void -SceneGraph::tree_check(void) +SceneGraph::tree_check() { SceneGraphPtr t = this; @@ -323,7 +323,7 @@ void -SceneGraph::print_member(void) +SceneGraph::print_member() { cout << "size = " << size << endl; cout << "name = " << name << endl; @@ -506,7 +506,7 @@ void -SceneGraph::delete_data(void) +SceneGraph::delete_data() { SceneGraphPtr n = this->next, m; @@ -535,53 +535,6 @@ (*collision)(this, this->sgroot, w, h, tree); } -void -SceneGraph::all_execute(int screen_w, int screen_h) -{ - SceneGraphPtr top = this; - SceneGraphPtr t = top; - - while (t) { - t->move_execute(screen_w, screen_h); - t->collision_check(screen_w, screen_h, top); - - t->frame++; - - if (t->parent != NULL) { - get_matrix(t->matrix, t->angle, t->xyz, t->parent->matrix); - } else { - get_matrix(t->matrix, t->angle, t->xyz, NULL); - } - - if (t->children != NULL) { - t = t->children; - } else if (t->brother != NULL) { - t = t->brother; - } else { - while (t) { - if (t->brother != NULL) { - t = t->brother; - break; - } else { - if (t->parent == NULL) { - t = NULL; - break; - } else { - t = t->parent; - } - } - } - } - } -} - -void -SceneGraph::set_move_collision(SceneGraphPtr node, move_func new_move, - collision_func new_collision) -{ - node->move = new_move; - node->collision = new_collision; -} void SceneGraph::set_move_collision(move_func new_move, @@ -621,7 +574,7 @@ * @return clone SceneGraph */ SceneGraphPtr -SceneGraph::clone(void) { +SceneGraph::clone() { SceneGraphPtr p = new SceneGraph(this); return p; } @@ -640,7 +593,7 @@ } void -SceneGraph::remove(void) +SceneGraph::remove() { this->flag_remove = 1; } @@ -724,7 +677,7 @@ } int -SceneGraph::isRemoved(void) +SceneGraph::isRemoved() { return flag_remove; } @@ -776,3 +729,5 @@ { this->xyz[2] = z; } + +/* end */