annotate Renderer/test_render/polygon.h @ 283:55ea4465b1a2

fix test_render
author e065746@localhost.localdomain
date Fri, 05 Jun 2009 16:49:12 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
283
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
1 #ifndef INCLUDED_POLYGON
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
2 #define INCLUDED_POLYGON
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
3
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
4 #ifndef INCLUDED_VIEWER
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
5 # include "viewer.h"
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
6 #endif
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
7
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
8 #include <libxml/parser.h>
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
9
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
10 #ifndef INCLUDED_POLYGON_PACK
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
11 # include "polygon_pack.h"
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
12 #endif
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
13
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
14 #ifndef INCLUDED_SPAN_PACK
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
15 # include "SpanPack.h"
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
16 #endif
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
17
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
18 #ifndef INCLUDED_TEXTURE
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
19 # include "texture.h"
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
20 #endif
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
21
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
22 class Polygon {
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
23 public:
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
24 long long size;
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
25 const char *name;
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
26 const char *parent_name;
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
27
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
28 //float *data; //"vertex" and "normal" and "texture"
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
29 float *coord_xyz; // vertex coordinate array
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
30 float *coord_tex; // texture coordinate array
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
31 float *normal; // normal vector array
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
32 float xyz[4]; // position
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
33 float angle[4]; // angle
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
34 float c_xyz[4]; // center of rotation
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
35 float matrix[16];
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
36 float *anim;
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
37 int texture_id; //texture id number
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
38 struct texture_list texture_info;
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
39
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
40 static SDL_Surface* texture_image; // pointer of this surface's texture
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
41
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
42 Polygon(void);
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
43
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
44 void parameter_change(char *name, float x, float y, float z, float ax, float ay, float az);
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
45 //void load_texture(char *image_name);
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
46 //void draw(float *stack);
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
47 //void draw(SceneGraphPack *sgp);
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
48 //void draw(PolygonPack *pp);
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
49 //void draw(SpanPack *sp);
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
50 Uint32 get_rgb(int tx, int ty);
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
51
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
52 public:
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
53 void position_init(void);
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
54
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
55 void tree_draw();
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
56 void pickup_coordinate(char *cont);
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
57 void pickup_normal(char *cont);
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
58 void pickup_model(char *cont);
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
59 void pickup_texture(char *cont);
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
60 };
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
61
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
62 #endif