Mercurial > hg > Members > kono > Cerium
diff TaskManager/Test/test_render/task/CreatePolygonFromSceneGraph.cpp @ 205:efb1df3176f4
fix
author | gongo@localhost.localdomain |
---|---|
date | Tue, 27 Jan 2009 18:21:12 +0900 |
parents | 5c6c9667ac61 |
children | dee3b5092a70 |
line wrap: on
line diff
--- a/TaskManager/Test/test_render/task/CreatePolygonFromSceneGraph.cpp Mon Jan 26 18:34:30 2009 +0900 +++ b/TaskManager/Test/test_render/task/CreatePolygonFromSceneGraph.cpp Tue Jan 27 18:21:12 2009 +0900 @@ -59,21 +59,6 @@ CreatePolygonFromSceneGraph::run(void *rbuf, void *wbuf) { float xyz1[4], xyz2[4], xyz3[4]; - float mat[16] = {fx, 0, 0, 0, 0, fy, 0, 0, 0, 0, 1.0f, 1.0f, 20.0f, 30.0f, 0, 0}; - - //fx -= fd; - //fy -= fd; - - if (fx < 0.0f) { - fx = 0.0f; - fy = 0.0f; - fd = -fd; - } else if (fx > 1.0f) { - fx = 1.0f; - fy = 1.0f; - fd = -fd; - } - SceneGraphPtr sg_top = (SceneGraphPtr)smanager->get_param(0); SceneGraphPtr sg = sg_top; @@ -84,6 +69,21 @@ = (PolygonPackPtr)smanager->allocate(sizeof(PolygonPack)); PolygonPackPtr pp_addr = (PolygonPackPtr)smanager->get_param(1); PolygonPackPtr tmp_pp; + + float n = 10.0f; + float f = 1000.0f; + float t = 30.0f; + float b = -30.0f; + float r = 30.0f; + float l = -30.0f; + + float mat[16] = { + 2*n/(r-l), 0, (r+l)/(r-l), 0, + 0, 2*n/(t-b), (t+b)/(t-b), 0, + 0, 0, -(f+n)/(f-n), -2*n*f/(f-n), + 0, 0, -1, 0 + }; + pp->init(); send_pp->init();