changeset 1220:5d62049098bc draft

merge
author Daichi TOMA <e085740@ie.u-ryukyu.ac.jp>
date Sat, 23 Jul 2011 06:22:06 +0900
parents a27c361c436b (current diff) d95b10b711ad (diff)
children 2a4ba6366394
files
diffstat 1 files changed, 16 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/Renderer/Test/viewer_2.cc	Sat Jul 23 06:17:08 2011 +0900
+++ b/Renderer/Test/viewer_2.cc	Sat Jul 23 06:22:06 2011 +0900
@@ -141,18 +141,25 @@
 
   sgroot->createFromXMLfile(fn);
 
-  int num = getStrFromFile( getStrDate, fn, sStr, eStr );
+  if (parts_cnt>0) {
+      for( int i = 0; i < parts_cnt; i ++ ){
+	object->addChild( sgroot->createSceneGraph( parts[i] ) );
+      }
+      sgroot->setSceneData(object);
+  } else {
+      int num = getStrFromFile( getStrDate, fn, sStr, eStr );
 
-  for( int i = 0; i < num; i ++ ){
-    object->addChild( sgroot->createSceneGraph( getStrDate[i] ) );
+      for( int i = 0; i < num; i ++ ){
+	object->addChild( sgroot->createSceneGraph( getStrDate[i] ) );
+      }
+      sgroot->setSceneData(object);
+
+      for( int i = 0; i < num; i ++ ){
+	free(  getStrDate[i]  );
+      }
+
   }
   
-  sgroot->setSceneData(object);
-
-  for( int i = 0; i < num; i ++ ){
-    free(  getStrDate[i]  );
-  }
-
 
   return sgroot;
 }
@@ -179,11 +186,9 @@
     if (strcmp(argv[i],"-sg") == 0 && i+1<=argc) {
       xmlfile = argv[i+1];
     }
-    /* // もう引数で取らなくてもいいぜヒィヤッハー!!
     else if (strcmp(argv[i],"-name") == 0 && i+1<=argc) {
       parts[parts_cnt++] = argv[i+1];
     }
-    */
     else if (strcmp(argv[i],"-lightsys") == 0 && i+1<=argc) {
       if (strcmp(argv[i],"on") == 0) {
 	light_sysswitch = 1;