diff Renderer/Engine/SceneGraphRoot.cc @ 752:5d23ffea34e3

rendering, move_coll parallel running
author hiroki@henri.cr.ie.u-ryukyu.ac.jp
date Tue, 26 Jan 2010 16:18:24 +0900
parents b7376415fa5f
children bb47827c04c1
line wrap: on
line diff
--- a/Renderer/Engine/SceneGraphRoot.cc	Mon Jan 25 19:25:40 2010 +0900
+++ b/Renderer/Engine/SceneGraphRoot.cc	Tue Jan 26 16:18:24 2010 +0900
@@ -431,40 +431,39 @@
 
     /*removeのflagをもとにtreeを形成*/
     while (t) {
-		SceneGraphPtr c = NULL;
-		if (!t->isRemoved()) {
-			c = t->clone();	    
-			addNext(c);
-			cur_parent->addChild(c);
-			c->frame = t->frame;
-            /*親の回転、座標から、子の回転、座標を算出*/
-            get_matrix(c->matrix, c->angle, c->xyz, cur_parent->matrix);
+	SceneGraphPtr c = NULL;
+	if (!t->isRemoved()) {
+	    c = t->clone();	    
+	    addNext(c);
+	    cur_parent->addChild(c);
+	    c->frame = t->frame;
+	    /*親の回転、座標から、子の回転、座標を算出*/
+	    get_matrix(c->matrix, c->angle, c->xyz, cur_parent->matrix);
 	    /*法線用の行列。Cameraの行列を抜いている(Cameraのコンストラクタで、単位行列にしている)*/
-            get_matrix(c->real_matrix, c->angle, c->xyz, cur_parent->real_matrix);
-        } 
-
-		if (t->children != NULL && c != NULL) {
-			cur_parent = c;
-			t = t->children;
-		} else if (t->brother != NULL) {
-			t = t->brother;
+	    get_matrix(c->real_matrix, c->angle, c->xyz, cur_parent->real_matrix);
+	} 
+	
+	if (t->children != NULL && c != NULL) {
+	    cur_parent = c;
+	    t = t->children;
+	} else if (t->brother != NULL) {
+	    t = t->brother;
+	} else {
+	    while (t) {
+		if (t->brother != NULL) {
+		    t = t->brother;
+		    break;
 		} else {
-			while (t) {
-				if (t->brother != NULL) {
-					t = t->brother;
-					break;
-				} else {
-					if (t->parent == NULL) {
-						t = NULL;
-						break;
-					} else {
+		    if (t->parent == NULL) {
+			t = NULL;
+			break;
+		    } else {
                         cur_parent = cur_parent->parent;
                         t = t->parent;
-			
-					}
-				}
-			}	    
+		    }
 		}
+	    }	    
+	}
     }