283
|
1 #ifndef INCLUDED_POLYGON
|
|
2 #define INCLUDED_POLYGON
|
|
3
|
539
|
4 #include <SDL.h>
|
283
|
5 #include <libxml/parser.h>
|
539
|
6 #include "polygon_pack.h"
|
|
7 #include "SpanPack.h"
|
|
8 #include "texture.h"
|
1129
|
9 #include "TaskManager.h"
|
283
|
10
|
|
11 class Polygon {
|
|
12 public:
|
|
13 long long size;
|
|
14 const char *name;
|
|
15 const char *parent_name;
|
|
16
|
|
17 //float *data; //"vertex" and "normal" and "texture"
|
860
|
18
|
1129
|
19 //float *matrix;
|
|
20 //float *real_matrix;
|
|
21 //texture_list *texture_info;
|
860
|
22
|
1129
|
23 float matrix[16] ;
|
|
24 float real_matrix[16] ;
|
|
25 texture_list texture_info;
|
|
26
|
1125
|
27 PolygonPackPtr pp;
|
|
28 int pp_num;
|
|
29
|
283
|
30 float xyz[4]; // position
|
|
31 float angle[4]; // angle
|
|
32 float c_xyz[4]; // center of rotation
|
|
33 float *anim;
|
1050
|
34 float scale[3];
|
539
|
35
|
283
|
36 Polygon(void);
|
|
37
|
|
38 void parameter_change(char *name, float x, float y, float z, float ax, float ay, float az);
|
|
39 //void load_texture(char *image_name);
|
|
40 //void draw(float *stack);
|
|
41 //void draw(SceneGraphPack *sgp);
|
|
42 //void draw(PolygonPack *pp);
|
|
43 //void draw(SpanPack *sp);
|
|
44 Uint32 get_rgb(int tx, int ty);
|
|
45
|
|
46 public:
|
|
47 void position_init(void);
|
|
48
|
|
49 void tree_draw();
|
|
50 void pickup_coordinate(char *cont);
|
|
51 void pickup_normal(char *cont);
|
|
52 void pickup_model(char *cont);
|
|
53 void pickup_texture(char *cont);
|
|
54 };
|
|
55
|
|
56 #endif
|