Mercurial > hg > Game > Cerium
annotate Renderer/Engine/polygon.h @ 1127:c4287bf771a0 draft
CreatePolygonFromSceneGraph can work on Mac OSX.
author | Yutaka_Kinjyo |
---|---|
date | Sun, 13 Feb 2011 23:27:22 +0900 |
parents | 6043da6e48f1 |
children | 293b36802714 |
rev | line source |
---|---|
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" | |
860 | 17 |
283 | 18 float *coord_xyz; // vertex coordinate array |
19 float *coord_tex; // texture coordinate array | |
20 float *normal; // normal vector array | |
1126
6043da6e48f1
complete compile but not work yet.
yutaka@localhost.localdomain
parents:
1125
diff
changeset
|
21 float matrix[16] __attribute__((aligned(16)));; |
6043da6e48f1
complete compile but not work yet.
yutaka@localhost.localdomain
parents:
1125
diff
changeset
|
22 float real_matrix[16] __attribute__((aligned(16)));; |
6043da6e48f1
complete compile but not work yet.
yutaka@localhost.localdomain
parents:
1125
diff
changeset
|
23 texture_list texture_info __attribute__((aligned(16)));; |
860 | 24 |
1125 | 25 PolygonPackPtr pp; |
26 int pp_num; | |
27 | |
283 | 28 float xyz[4]; // position |
29 float angle[4]; // angle | |
30 float c_xyz[4]; // center of rotation | |
31 float *anim; | |
1050 | 32 float scale[3]; |
539 | 33 |
283 | 34 Polygon(void); |
35 | |
36 void parameter_change(char *name, float x, float y, float z, float ax, float ay, float az); | |
37 //void load_texture(char *image_name); | |
38 //void draw(float *stack); | |
39 //void draw(SceneGraphPack *sgp); | |
40 //void draw(PolygonPack *pp); | |
41 //void draw(SpanPack *sp); | |
42 Uint32 get_rgb(int tx, int ty); | |
43 | |
44 public: | |
45 void position_init(void); | |
46 | |
47 void tree_draw(); | |
48 void pickup_coordinate(char *cont); | |
49 void pickup_normal(char *cont); | |
50 void pickup_model(char *cont); | |
51 void pickup_texture(char *cont); | |
52 }; | |
53 | |
54 #endif |