diff TaskDandy.cc @ 70:cee55c8365e9 default tip

fix
author Kazuma
date Thu, 19 May 2016 18:52:26 +0900
parents fce767bb5e25
children
line wrap: on
line diff
--- a/TaskDandy.cc	Sun May 22 10:19:58 2011 +0900
+++ b/TaskDandy.cc	Thu May 19 18:52:26 2016 +0900
@@ -301,19 +301,19 @@
     CameraPtr camera = sgroot->sgroot->getCamera();
 
     sgroot->sgroot->flip();
-    sgroot->sgroot->lightCalc();
 
     root = sgroot->createSceneGraph();
     root->xyz[0] = 0;
     root->xyz[1] = 0;
     root->xyz[2] = 30.0f;
 
+    sgroot->sgroot->lightCalc(root);
     /*親の回転、座標から、子の回転、座標を算出*/
     get_matrix(root->matrix, root->angle, root->xyz, camera->matrix);
     scale_matrix(root->matrix, root->scale, root->c_xyz);
     /*法線用の行列。Cameraの行列を抜いている(Cameraのコンストラクタで、単位行列にしている)*/
-    get_matrix(root->real_matrix, root->angle, root->xyz, camera->real_matrix);
-    scale_matrix(root->real_matrix, root->scale, root->c_xyz);
+    // get_matrix(root->real_matrix, root->angle, root->xyz, camera->real_matrix);
+    // scale_matrix(root->real_matrix, root->scale, root->c_xyz);
 
     sgroot->setSceneData(root);
 }
@@ -621,8 +621,8 @@
     get_matrix(object->matrix, object->angle, object->xyz, root->matrix);
     scale_matrix(object->matrix, scale, object->c_xyz);
     /*法線用の行列。Cameraの行列を抜いている(Cameraのコンストラクタで、単位行列にしている)*/
-    get_matrix(object->real_matrix, object->angle, object->xyz, root->real_matrix);
-    scale_matrix(object->real_matrix, object->scale, object->c_xyz);
+    // get_matrix(object->real_matrix, object->angle, object->xyz, root->real_matrix);
+    // scale_matrix(object->real_matrix, object->scale, object->c_xyz);
 }
 
 void
@@ -647,8 +647,8 @@
     get_matrix(object->matrix, object->angle, object->xyz, root->matrix);
     scale_matrix(object->matrix, scale, object->c_xyz);
     /*法線用の行列。Cameraの行列を抜いている(Cameraのコンストラクタで、単位行列にしている)*/
-    get_matrix(object->real_matrix, object->angle, object->xyz, root->real_matrix);
-    scale_matrix(object->real_matrix, object->scale, object->c_xyz);    
+    // get_matrix(object->real_matrix, object->angle, object->xyz, root->real_matrix);
+    // scale_matrix(object->real_matrix, object->scale, object->c_xyz);    
 }
 
 struct SGO_PAD pad[2];