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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
1 #include <libxml/parser.h>
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
2
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
3 #ifndef INCLUDED_POLYGON
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
4 #define INCLUDED_POLYGON
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
5
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
6 #ifndef INCLUDED_VIEWER
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
7 #include "viewer.h"
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
8 #endif
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
9
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
10 #ifndef INCLUDED_SCENE_GRAPH_PACK
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
11 #include "scene_graph_pack.h"
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
12 #endif
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
13
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
14 #ifndef INCLUDED_POLYGON_PACK
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
15 #include "polygon_pack.h"
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
16 #endif
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
17
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
18 #ifndef INCLUDED_SPAN_PACK
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
19 #include "SpanPack.h"
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
20 #endif
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
21
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
22 class Polygon{
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
23 public:
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
24 long long size;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
25 char *name;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
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
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
31 float *data; //"vertex" and "normal" and "texture"
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
32 float xyz[4]; // position
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
33 float angle[4]; // angle
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
34 float c_xyz[4]; // center of rotation
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
35 float matrix[16];
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
36 float *anim;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
37 int frame; // anime frame num
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
38 //int *texture; // pointer of this surface's texture
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
39 static SDL_Surface* texture_image; // pointer of this surface's texture
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
40 //SDL_Surface *screen;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
41 //char image_name[20]; // texture image name
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
42 Polygon *next;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
43 Polygon *parent;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
44 Polygon *brother;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
45 Viewer *viewer;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
46 //SceneGraphPack *sgp;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
47
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
48 Polygon();
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
49 void tree_check();
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
50 void print_member();
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
51 void parameter_change(char *name, float x, float y, float z, float ax, float ay, float az);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
52 //void load_texture(char *image_name);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
53 void draw(float *stack);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
54 void draw(SceneGraphPack *sgp);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
55 void draw(PolygonPack *pp);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
56 void draw(SpanPack *sp);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
57 void delete_data();
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
58 void tree_draw();
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
59 void get_data(xmlNodePtr cur);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
60 void pickup_coordinate(char *cont);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
61 void pickup_normal(char *cont);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
62 void pickup_model(char *cont);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
63 void pickup_texture(char *cont);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
64 Uint32 get_rgb(int tx, int ty);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
65 //void sgp_update();
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
66 //void sgp_draw();
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
67 //void create_scene_graph_pack();
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
68 void create_data(xmlNodePtr doc);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
69 void set_data(char *file_name);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
70 void add_next();
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
71 void create_tree();
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
72
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
73 /* added by kent. */
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
74 Polygon(xmlNodePtr);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
75 Polygon *addChild(Polygon *);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
76 Polygon *children;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
77 Polygon *lastChild;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
78 Polygon *searchPolygon(char *);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
79 static Polygon *createFromXMLfile(char *);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
80 };
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
81 #endif