view 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
line wrap: on
line source

#ifndef INCLUDED_SCENE_GRAPH_PACK
#define INCLUDED_SCENE_GRAPH_PACK

#define MAX_NODE 16
#define MAX_POLYGON 36

typedef struct SceneGraphNode {
    int size; // この Node で使ってるポリゴンの数、でいいのかな
    float vertex[MAX_POLYGON*3];
    float texture[MAX_POLYGON*2];
    float obj_pos[4];
    float angle[4];
    float translation[16];
    long *tex_addr, tex_width, tex_height;
    int id;
    int move, interaction;
    int pn; // parent number?
    SceneGraphNode *next;
    int pad[3];

    void init(void) {
	size = 0;
	next = 0;
    }
}SceneGraphNode, *SceneGraphNodePtr;

typedef struct SceneGraphInfo {
    int size;
    int pad[2];
}SceneGraphInfo;

typedef struct SceneGraphPack {
    SceneGraphInfo info;
    SceneGraphNode node[MAX_NODE];
    SceneGraphPack *next;

    void init(void){
	next = 0;
	info.size = 0;

	for (int i = 0; i < MAX_NODE; i++) {
	    node[i].size = 0;
	}
    }
} SceneGraphPack, *SceneGraphPackPtr;

#endif