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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
1 #ifndef INCLUDED_POLYGON
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
2 #define INCLUDED_POLYGON
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
3
539
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
4 #include <SDL.h>
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
5 #include <libxml/parser.h>
539
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
6 #include "polygon_pack.h"
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
7 #include "SpanPack.h"
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
8 #include "texture.h"
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
9
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
10 class Polygon {
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
11 public:
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
12 long long size;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
13 const char *name;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
14 const char *parent_name;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
15
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
16 //float *data; //"vertex" and "normal" and "texture"
860
63a08f3a468a Still on the way
yutaka@localhost.localdomain
parents: 738
diff changeset
17
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
18 float *coord_xyz; // vertex coordinate array
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
19 float *coord_tex; // texture coordinate array
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
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
63a08f3a468a Still on the way
yutaka@localhost.localdomain
parents: 738
diff changeset
24
1125
b733c7903d07 remove old code
yutaka@localhost.localdomain
parents: 1055
diff changeset
25 PolygonPackPtr pp;
b733c7903d07 remove old code
yutaka@localhost.localdomain
parents: 1055
diff changeset
26 int pp_num;
b733c7903d07 remove old code
yutaka@localhost.localdomain
parents: 1055
diff changeset
27
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
28 float xyz[4]; // position
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
29 float angle[4]; // angle
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
30 float c_xyz[4]; // center of rotation
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
31 float *anim;
1050
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 915
diff changeset
32 float scale[3];
539
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
33
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
34 Polygon(void);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
35
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
36 void parameter_change(char *name, float x, float y, float z, float ax, float ay, float az);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
37 //void load_texture(char *image_name);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
38 //void draw(float *stack);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
39 //void draw(SceneGraphPack *sgp);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
40 //void draw(PolygonPack *pp);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
41 //void draw(SpanPack *sp);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
42 Uint32 get_rgb(int tx, int ty);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
43
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
44 public:
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
45 void position_init(void);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
46
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
47 void tree_draw();
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
48 void pickup_coordinate(char *cont);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
49 void pickup_normal(char *cont);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
50 void pickup_model(char *cont);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
51 void pickup_texture(char *cont);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
52 };
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
53
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
54 #endif