annotate TaskManager/Test/test_render/scene_graph_pack.h @ 131:805d27efafd8

fix
author gongo@charles.cr.ie.u-ryukyu.ac.jp
date Tue, 25 Nov 2008 17:24:18 +0900
parents f515436feb71
children 6cf991f28c6c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
1 #ifndef INCLUDED_SCENE_GRAPH_PACK
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
2 #define INCLUDED_SCENE_GRAPH_PACK
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
3
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
4 #define MAX_NODE 16
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
5 #define MAX_POLYGON 36
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
6
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
7 typedef struct SceneGraphNode {
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
8 int size; // この Node で使ってるポリゴンの数、でいいのかな
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
9 float vertex[MAX_POLYGON*3];
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
10 float texture[MAX_POLYGON*2];
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
11 float obj_pos[4];
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
12 float angle[4];
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
13 float translation[16];
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
14 long *tex_addr, tex_width, tex_height;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
15 int id;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
16 int move, interaction;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
17 int pn; // parent number?
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
18 SceneGraphNode *next;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
19 int pad[3];
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
20
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
21 void init(void) {
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
22 size = 0;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
23 next = 0;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
24 }
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
25 }SceneGraphNode, *SceneGraphNodePtr;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
26
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
27 typedef struct SceneGraphInfo {
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
28 int size;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
29 int pad[2];
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
30 }SceneGraphInfo;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
31
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
32 typedef struct SceneGraphPack {
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
33 SceneGraphInfo info;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
34 SceneGraphNode node[MAX_NODE];
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
35 SceneGraphPack *next;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
36
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
37 void init(void){
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
38 next = 0;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
39 info.size = 0;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
40
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
41 for (int i = 0; i < MAX_NODE; i++) {
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
42 node[i].size = 0;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
43 }
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
44 }
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
45 } SceneGraphPack, *SceneGraphPackPtr;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
46
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
47 #endif