annotate Renderer/Engine/polygon.h @ 761:c0a8af52fa43 draft

add lights
author yutaka@henri.cr.ie.u-ryukyu.ac.jp
date Sat, 06 Feb 2010 03:02:48 +0900
parents 18d31d18a6b2
children 63a08f3a468a
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"
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
17 float *coord_xyz; // vertex coordinate array
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
18 float *coord_tex; // texture coordinate array
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
19 float *normal; // normal vector array
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
20 float xyz[4]; // position
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
21 float angle[4]; // angle
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
22 float c_xyz[4]; // center of rotation
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
23 float matrix[16];
747
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 539
diff changeset
24 float real_matrix[16];
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
25 float *anim;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
26 int texture_id; //texture id number
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
27 struct texture_list texture_info;
539
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
28
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
29 SDL_Surface* texture_image;
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
30
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
31 Polygon(void);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
32
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
33 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
34 //void load_texture(char *image_name);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
35 //void draw(float *stack);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
36 //void draw(SceneGraphPack *sgp);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
37 //void draw(PolygonPack *pp);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
38 //void draw(SpanPack *sp);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
39 Uint32 get_rgb(int tx, int ty);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
40
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
41 public:
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
42 void position_init(void);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
43
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
44 void tree_draw();
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
45 void pickup_coordinate(char *cont);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
46 void pickup_normal(char *cont);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
47 void pickup_model(char *cont);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
48 void pickup_texture(char *cont);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
49 };
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
50
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
51 #endif