109
|
1 #ifndef INCLUDED_SCENE_GRAPH_PACK
|
|
2 #define INCLUDED_SCENE_GRAPH_PACK
|
|
3
|
|
4 #define MAX_NODE 16
|
|
5 #define MAX_POLYGON 36
|
|
6
|
|
7 typedef struct SceneGraphNode {
|
|
8 int size; // この Node で使ってるポリゴンの数、でいいのかな
|
|
9 float vertex[MAX_POLYGON*3];
|
|
10 float texture[MAX_POLYGON*2];
|
|
11 float obj_pos[4];
|
|
12 float angle[4];
|
|
13 float translation[16];
|
|
14 long *tex_addr, tex_width, tex_height;
|
|
15 int id;
|
|
16 int move, interaction;
|
|
17 int pn; // parent number?
|
|
18 SceneGraphNode *next;
|
|
19 int pad[3];
|
|
20
|
|
21 void init(void) {
|
|
22 size = 0;
|
|
23 next = 0;
|
|
24 }
|
|
25 }SceneGraphNode, *SceneGraphNodePtr;
|
|
26
|
|
27 typedef struct SceneGraphInfo {
|
|
28 int size;
|
|
29 int pad[2];
|
|
30 }SceneGraphInfo;
|
|
31
|
|
32 typedef struct SceneGraphPack {
|
|
33 SceneGraphInfo info;
|
|
34 SceneGraphNode node[MAX_NODE];
|
|
35 SceneGraphPack *next;
|
|
36
|
|
37 void init(void){
|
|
38 next = 0;
|
|
39 info.size = 0;
|
|
40
|
|
41 for (int i = 0; i < MAX_NODE; i++) {
|
|
42 node[i].size = 0;
|
|
43 }
|
|
44 }
|
|
45 } SceneGraphPack, *SceneGraphPackPtr;
|
|
46
|
|
47 #endif
|