Mercurial > hg > Game > Cerium
comparison old/simple_pack/polygon.h @ 539:3bc98f6d31ff draft
Reorganization..
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 12 Oct 2009 09:39:35 +0900 |
parents | TaskManager/Test/simple_pack/polygon.h@35a6cf176c38 |
children |
comparison
equal
deleted
inserted
replaced
538:5641d121818e | 539:3bc98f6d31ff |
---|---|
1 #include <libxml/parser.h> | |
2 | |
3 #ifndef INCLUDED_POLYGON | |
4 #define INCLUDED_POLYGON | |
5 | |
6 #ifndef INCLUDED_VIEWER | |
7 #include "viewer.h" | |
8 #endif | |
9 | |
10 #ifndef INCLUDED_SCENE_GRAPH_PACK | |
11 #include "scene_graph_pack.h" | |
12 #endif | |
13 | |
14 #ifndef INCLUDED_POLYGON_PACK | |
15 #include "polygon_pack.h" | |
16 #endif | |
17 | |
18 | |
19 #ifndef INCLUDED_SPAN_PACK | |
20 #include "span_pack.h" | |
21 #endif | |
22 | |
23 | |
24 class Polygon{ | |
25 public: | |
26 int size; | |
27 char *name; | |
28 char *parent_name; | |
29 float *data; //"vertex" and "normal" and "texture" | |
30 float xyz[4]; // position | |
31 float angle[4]; // angle | |
32 float c_xyz[4]; // center of rotation | |
33 float matrix[16]; | |
34 float *anim; | |
35 int frame; // anime frame num | |
36 //int *texture; // pointer of this surface's texture | |
37 SDL_Surface *texture_image; // pointer of this surface's texture | |
38 //SDL_Surface *screen; | |
39 //char image_name[20]; // texture image name | |
40 Polygon *next; | |
41 Polygon *child; | |
42 Polygon *parent; | |
43 Polygon *brother; | |
44 Viewer *viewer; | |
45 //SceneGraphPack *sgp; | |
46 | |
47 Polygon(); | |
48 void tree_check(); | |
49 void print_member(); | |
50 void parameter_change(char *name, float x, float y, float z, float ax, float ay, float az); | |
51 //void load_texture(char *image_name); | |
52 void draw(float *stack); | |
53 void draw(SceneGraphPack *sgp); | |
54 void draw(PolygonPack *pp); | |
55 void draw(SPANPACK *sp); | |
56 void tree_draw(); | |
57 //void sgp_update(); | |
58 //void sgp_draw(); | |
59 void add_next(); | |
60 void create_tree(); | |
61 //void create_scene_graph_pack(); | |
62 void pickup_coordinate(char *cont); | |
63 void pickup_normal(char *cont); | |
64 void pickup_model(char *cont); | |
65 void pickup_texture(char *cont); | |
66 Uint32 get_rgb(int tx, int ty); | |
67 void get_data(xmlNodePtr cur); | |
68 void create_data(xmlNodePtr doc); | |
69 void set_data(char *file_name); | |
70 void delete_data(); | |
71 }; | |
72 | |
73 #endif |