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"
|
283
|
9
|
|
10 class Polygon {
|
|
11 public:
|
|
12 long long size;
|
|
13 const char *name;
|
|
14 const char *parent_name;
|
|
15
|
|
16 //float *data; //"vertex" and "normal" and "texture"
|
|
17 float *coord_xyz; // vertex coordinate array
|
|
18 float *coord_tex; // texture coordinate array
|
|
19 float *normal; // normal vector array
|
|
20 float xyz[4]; // position
|
|
21 float angle[4]; // angle
|
|
22 float c_xyz[4]; // center of rotation
|
|
23 float matrix[16];
|
747
|
24 float real_matrix[16];
|
283
|
25 float *anim;
|
|
26 int texture_id; //texture id number
|
|
27 struct texture_list texture_info;
|
539
|
28
|
|
29 SDL_Surface* texture_image;
|
283
|
30
|
|
31 Polygon(void);
|
|
32
|
|
33 void parameter_change(char *name, float x, float y, float z, float ax, float ay, float az);
|
|
34 //void load_texture(char *image_name);
|
|
35 //void draw(float *stack);
|
|
36 //void draw(SceneGraphPack *sgp);
|
|
37 //void draw(PolygonPack *pp);
|
|
38 //void draw(SpanPack *sp);
|
|
39 Uint32 get_rgb(int tx, int ty);
|
|
40
|
|
41 public:
|
|
42 void position_init(void);
|
|
43
|
|
44 void tree_draw();
|
|
45 void pickup_coordinate(char *cont);
|
|
46 void pickup_normal(char *cont);
|
|
47 void pickup_model(char *cont);
|
|
48 void pickup_texture(char *cont);
|
|
49 };
|
|
50
|
|
51 #endif
|