changeset 1246:8bc038529958 draft

remove real_matrix
author Kakeru TAMASIRO <e095736@ie.u-ryukyu.ac.jp>
date Fri, 11 Nov 2011 18:01:05 +0900
parents a97b4dd4574c
children d2f70da2aa19 c41f10c1e138
files Renderer/Engine/task/CreatePolygon.cc Renderer/Engine/task/CreatePolygon.h Renderer/Engine/task/CreatePolygonFromSceneGraph.cc
diffstat 3 files changed, 18 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/Renderer/Engine/task/CreatePolygon.cc	Fri Nov 11 17:04:13 2011 +0900
+++ b/Renderer/Engine/task/CreatePolygon.cc	Fri Nov 11 18:01:05 2011 +0900
@@ -1,5 +1,9 @@
 #include "CreatePolygon.h"
 
+/*
+ * This program is not used 2011/11/11
+ */
+
 SchedDefineTask(CreatePolygon);
 
 static void
--- a/Renderer/Engine/task/CreatePolygon.h	Fri Nov 11 17:04:13 2011 +0900
+++ b/Renderer/Engine/task/CreatePolygon.h	Fri Nov 11 18:01:05 2011 +0900
@@ -1,3 +1,7 @@
+/*
+ * This program is not used 2011/11/11
+ */
+
 #ifndef INCLUDED_CREATE_SPAN
 #define INCLUDED_CREATE_SPAN
 
--- a/Renderer/Engine/task/CreatePolygonFromSceneGraph.cc	Fri Nov 11 17:04:13 2011 +0900
+++ b/Renderer/Engine/task/CreatePolygonFromSceneGraph.cc	Fri Nov 11 18:01:05 2011 +0900
@@ -1,4 +1,7 @@
 /**
+ * SceneGraphを読み込んでpolygonの座標に変換行列を掛けて
+ * 実座標のpolygonを生成する。
+ *
  * SceneGraph が増えてくると動かなくなるかもしれない。
  * 一応 mainMem とかで動くようになるとは思うけど。
  * だめだったら、そこら辺が怪しいと思うべき
@@ -10,7 +13,7 @@
 
 #define  STATUS_NUM 3
 
-SchedDefineTask(CreatePolygonFromSceneGraph);
+SchedDefineTask1(CreatePolygonFromSceneGraph,createPolygon);
 
 /**
  *  ベクトルに行列を乗算する
@@ -62,7 +65,7 @@
 
 
 static int 
-run(SchedTask *smanager, void *rbuf, void *wbuf)
+createPolygon(SchedTask *smanager, void *rbuf, void *wbuf)
 {
 
     /*
@@ -78,7 +81,11 @@
     //pp, matrix, real_matrix を受け取る
     PolygonPackPtr in_pp      = (PolygonPackPtr)smanager->get_input(rbuf, 0);
     float *matrix             = (float*)smanager->get_input(rbuf, 1);
-    float *real_matrix        = (float*)smanager->get_input(rbuf, 2);
+    float real_matrix[16]; //        = (float*)smanager->get_input(rbuf, 2);
+
+    for (int i = 0; i<16; i++) real_matrix[i]=matrix[i];
+    real_matrix[4*0+3]=real_matrix[4*1+3]=real_matrix[4*2+3]=0;
+     
     texture_list *tritexinfo  = (texture_list*)smanager->get_input(rbuf, 3);
     
     PolygonPackPtr next = (PolygonPackPtr)smanager->get_param(0);