Mercurial > hg > Game > Cerium
annotate TaskManager/Test/test_render/polygon.h @ 228:5bb12a76a335 draft
remove SceneGraph::data, add SceneGraph::coord_xyz, coord_tex, normal
author | gongo@gendarme.cr.ie.u-ryukyu.ac.jp |
---|---|
date | Thu, 12 Feb 2009 16:31:38 +0900 |
parents | 59f4129a9562 |
children | c4918a1fb6c9 |
rev | line source |
---|---|
109 | 1 #ifndef INCLUDED_POLYGON |
2 #define INCLUDED_POLYGON | |
3 | |
4 #ifndef INCLUDED_VIEWER | |
137
91c74dbc32e4
SceneGraphPack の代わりに、今は SceneGraph をそのまま使う様に設定。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
123
diff
changeset
|
5 # include "viewer.h" |
109 | 6 #endif |
7 | |
138 | 8 #include <libxml/parser.h> |
9 | |
109 | 10 #ifndef INCLUDED_POLYGON_PACK |
137
91c74dbc32e4
SceneGraphPack の代わりに、今は SceneGraph をそのまま使う様に設定。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
123
diff
changeset
|
11 # include "polygon_pack.h" |
109 | 12 #endif |
13 | |
14 #ifndef INCLUDED_SPAN_PACK | |
137
91c74dbc32e4
SceneGraphPack の代わりに、今は SceneGraph をそのまま使う様に設定。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
123
diff
changeset
|
15 # include "SpanPack.h" |
109 | 16 #endif |
17 | |
141 | 18 #ifndef INCLUDED_TEXTURE |
19 # include "texture.h" | |
20 #endif | |
21 | |
137
91c74dbc32e4
SceneGraphPack の代わりに、今は SceneGraph をそのまま使う様に設定。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
123
diff
changeset
|
22 class Polygon { |
109 | 23 public: |
24 long long size; | |
25 char *name; | |
26 char *parent_name; | |
113
80d93fe0601d
Define New Texture Data Structure
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
109
diff
changeset
|
27 |
228
5bb12a76a335
remove SceneGraph::data, add SceneGraph::coord_xyz, coord_tex, normal
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
215
diff
changeset
|
28 //float *data; //"vertex" and "normal" and "texture" |
5bb12a76a335
remove SceneGraph::data, add SceneGraph::coord_xyz, coord_tex, normal
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
215
diff
changeset
|
29 float *coord_xyz; // vertex coordinate array |
5bb12a76a335
remove SceneGraph::data, add SceneGraph::coord_xyz, coord_tex, normal
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
215
diff
changeset
|
30 float *coord_tex; // texture coordinate array |
5bb12a76a335
remove SceneGraph::data, add SceneGraph::coord_xyz, coord_tex, normal
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
215
diff
changeset
|
31 float *normal; // normal vector array |
5bb12a76a335
remove SceneGraph::data, add SceneGraph::coord_xyz, coord_tex, normal
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
215
diff
changeset
|
32 float xyz[4]; // position |
5bb12a76a335
remove SceneGraph::data, add SceneGraph::coord_xyz, coord_tex, normal
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
215
diff
changeset
|
33 float angle[4]; // angle |
5bb12a76a335
remove SceneGraph::data, add SceneGraph::coord_xyz, coord_tex, normal
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
215
diff
changeset
|
34 float c_xyz[4]; // center of rotation |
109 | 35 float matrix[16]; |
36 float *anim; | |
141 | 37 int texture_id; //texture id number |
38 struct texture_list texture_info; | |
39 | |
40 static SDL_Surface* texture_image; // pointer of this surface's texture | |
109 | 41 |
137
91c74dbc32e4
SceneGraphPack の代わりに、今は SceneGraph をそのまま使う様に設定。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
123
diff
changeset
|
42 Polygon(void); |
91c74dbc32e4
SceneGraphPack の代わりに、今は SceneGraph をそのまま使う様に設定。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
123
diff
changeset
|
43 |
109 | 44 void parameter_change(char *name, float x, float y, float z, float ax, float ay, float az); |
45 //void load_texture(char *image_name); | |
137
91c74dbc32e4
SceneGraphPack の代わりに、今は SceneGraph をそのまま使う様に設定。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
123
diff
changeset
|
46 //void draw(float *stack); |
91c74dbc32e4
SceneGraphPack の代わりに、今は SceneGraph をそのまま使う様に設定。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
123
diff
changeset
|
47 //void draw(SceneGraphPack *sgp); |
91c74dbc32e4
SceneGraphPack の代わりに、今は SceneGraph をそのまま使う様に設定。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
123
diff
changeset
|
48 //void draw(PolygonPack *pp); |
91c74dbc32e4
SceneGraphPack の代わりに、今は SceneGraph をそのまま使う様に設定。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
123
diff
changeset
|
49 //void draw(SpanPack *sp); |
91c74dbc32e4
SceneGraphPack の代わりに、今は SceneGraph をそのまま使う様に設定。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
123
diff
changeset
|
50 Uint32 get_rgb(int tx, int ty); |
91c74dbc32e4
SceneGraphPack の代わりに、今は SceneGraph をそのまま使う様に設定。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
123
diff
changeset
|
51 |
138 | 52 public: |
53 void position_init(void); | |
54 | |
109 | 55 void tree_draw(); |
56 void pickup_coordinate(char *cont); | |
57 void pickup_normal(char *cont); | |
58 void pickup_model(char *cont); | |
59 void pickup_texture(char *cont); | |
137
91c74dbc32e4
SceneGraphPack の代わりに、今は SceneGraph をそのまま使う様に設定。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
123
diff
changeset
|
60 }; |
109 | 61 |
62 #endif |