Mercurial > hg > Members > kono > Cerium
annotate TaskManager/Test/test_render/polygon.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 |
rev | line source |
---|---|
109 | 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 #ifndef INCLUDED_SPAN_PACK | |
19 #include "SpanPack.h" | |
20 #endif | |
21 | |
22 class Polygon{ | |
23 public: | |
24 long long size; | |
25 char *name; | |
26 char *parent_name; | |
113
6ba88fa28df6
Define New Texture Data Structure
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
109
diff
changeset
|
27 |
6ba88fa28df6
Define New Texture Data Structure
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
109
diff
changeset
|
28 //int texture_id; |
6ba88fa28df6
Define New Texture Data Structure
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
109
diff
changeset
|
29 //int texture_px, texture_py; // texture の分割数 |
6ba88fa28df6
Define New Texture Data Structure
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
109
diff
changeset
|
30 |
109 | 31 float *data; //"vertex" and "normal" and "texture" |
32 float xyz[4]; // position | |
33 float angle[4]; // angle | |
34 float c_xyz[4]; // center of rotation | |
35 float matrix[16]; | |
36 float *anim; | |
37 int frame; // anime frame num | |
38 //int *texture; // pointer of this surface's texture | |
39 static SDL_Surface* texture_image; // pointer of this surface's texture | |
40 //SDL_Surface *screen; | |
41 //char image_name[20]; // texture image name | |
42 Polygon *next; | |
43 Polygon *parent; | |
44 Polygon *brother; | |
45 Viewer *viewer; | |
46 //SceneGraphPack *sgp; | |
47 | |
48 Polygon(); | |
49 void tree_check(); | |
50 void print_member(); | |
51 void parameter_change(char *name, float x, float y, float z, float ax, float ay, float az); | |
52 //void load_texture(char *image_name); | |
53 void draw(float *stack); | |
54 void draw(SceneGraphPack *sgp); | |
55 void draw(PolygonPack *pp); | |
56 void draw(SpanPack *sp); | |
57 void delete_data(); | |
58 void tree_draw(); | |
59 void get_data(xmlNodePtr cur); | |
60 void pickup_coordinate(char *cont); | |
61 void pickup_normal(char *cont); | |
62 void pickup_model(char *cont); | |
63 void pickup_texture(char *cont); | |
64 Uint32 get_rgb(int tx, int ty); | |
65 //void sgp_update(); | |
66 //void sgp_draw(); | |
67 //void create_scene_graph_pack(); | |
68 void create_data(xmlNodePtr doc); | |
69 void set_data(char *file_name); | |
70 void add_next(); | |
71 void create_tree(); | |
72 | |
73 /* added by kent. */ | |
74 Polygon(xmlNodePtr); | |
75 Polygon *addChild(Polygon *); | |
76 Polygon *children; | |
77 Polygon *lastChild; | |
78 Polygon *searchPolygon(char *); | |
79 static Polygon *createFromXMLfile(char *); | |
80 }; | |
81 #endif |