Mercurial > hg > Members > kono > Cerium
annotate TaskManager/Test/test_render/polygon_pack.h @ 224:ebfb9e389716
SceneGraph.cpp xmlcreate
author | tkaito@nw0534.st.ie.u-ryukyu.ac.jp |
---|---|
date | Tue, 10 Feb 2009 20:45:51 +0900 |
parents | 204b03ca98f8 |
children | a7ff29110474 |
rev | line source |
---|---|
109 | 1 #ifndef INCLUDED_POLYGON_PACK |
2 #define INCLUDED_POLYGON_PACK | |
3 | |
164
38cbb7aecc70
TilePtr は SPE で計算した方がいいと判断して変更。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
109
diff
changeset
|
4 #ifndef INCLUDED_TYPES |
38cbb7aecc70
TilePtr は SPE で計算した方がいいと判断して変更。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
109
diff
changeset
|
5 # include "types.h" |
38cbb7aecc70
TilePtr は SPE で計算した方がいいと判断して変更。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
109
diff
changeset
|
6 #endif |
38cbb7aecc70
TilePtr は SPE で計算した方がいいと判断して変更。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
109
diff
changeset
|
7 |
109 | 8 #define MAX_SIZE_TRIANGLE 128 |
9 | |
10 typedef struct VertexPack { | |
11 float x; | |
12 float y; | |
13 float z; | |
14 float tex_x; | |
15 float tex_y; | |
210 | 16 } VertexPack, *VertexPackPtr; // 20 |
109 | 17 |
210 | 18 typedef struct TriTexInfo { |
19 uint32 *addr; | |
20 int width; | |
21 int height; | |
22 int scale_max; | |
23 } TriangleTexInfo, *TriangleTexInfoPtr; // 16 | |
109 | 24 |
25 typedef struct TrianglePack { | |
210 | 26 TriTexInfo tex_info; |
109 | 27 VertexPack ver1; |
28 VertexPack ver2; | |
29 VertexPack ver3; | |
210 | 30 } TrianglePack, *TrianglePackPtr; |
109 | 31 |
32 | |
33 typedef struct PolygonPack { | |
34 struct PORIGON_info { | |
35 int size; | |
36 int light_pos[3]; | |
37 int light_rgb[3]; | |
38 }info; | |
174
559b48b69b76
getScale()、getTapestry から、span->length に適切なテクスチャの選択に成功
gongo@localhost.localdomain
parents:
164
diff
changeset
|
39 |
559b48b69b76
getScale()、getTapestry から、span->length に適切なテクスチャの選択に成功
gongo@localhost.localdomain
parents:
164
diff
changeset
|
40 TrianglePack tri[MAX_SIZE_TRIANGLE]; |
109 | 41 |
42 PolygonPack* next; | |
43 | |
44 void init(void) { | |
45 info.size = 0; | |
174
559b48b69b76
getScale()、getTapestry から、span->length に適切なテクスチャの選択に成功
gongo@localhost.localdomain
parents:
164
diff
changeset
|
46 next = 0; |
109 | 47 } |
48 | |
49 void clear(void) { | |
50 PolygonPack *q = 0; | |
51 PolygonPack *q1 = 0; | |
52 | |
53 q = this->next; | |
54 while (q) { | |
55 q1 = q->next; | |
56 delete(q); | |
57 q = q1; | |
58 } | |
59 this->init(); | |
60 } | |
174
559b48b69b76
getScale()、getTapestry から、span->length に適切なテクスチャの選択に成功
gongo@localhost.localdomain
parents:
164
diff
changeset
|
61 } PolygonPack, *PolygonPackPtr; // 4*7 + 76*128 + 4 = 9760 |
109 | 62 |
63 typedef struct PolygonPackList { | |
64 int size; | |
65 PolygonPack *list; | |
66 } PolygonPackList; | |
67 | |
68 #endif |