… | |
… | |
16 | sector orig; |
16 | sector orig; |
17 | vector<octant *> o; |
17 | vector<octant *> o; |
18 | box bbox; |
18 | box bbox; |
19 | |
19 | |
20 | virtual void update_bbox (); |
20 | virtual void update_bbox (); |
21 | virtual void show () { world.add (orig, this); }; |
21 | virtual void show () { world.add (this); }; |
22 | void hide (); |
22 | void hide (); |
23 | void display (draw_context &ctx); |
23 | void display (draw_context &ctx); |
24 | virtual void draw (draw_context &ctx) = 0; |
24 | virtual void draw (draw_context &ctx) = 0; |
25 | |
25 | |
26 | entity_base (); |
26 | entity_base (); |
… | |
… | |
60 | ~entity_filter (); |
60 | ~entity_filter (); |
61 | }; |
61 | }; |
62 | |
62 | |
63 | struct entity : entity_filter { |
63 | struct entity : entity_filter { |
64 | }; |
64 | }; |
65 | |
|
|
66 | #if 0 |
|
|
67 | struct entity_affine : entity_filter { |
|
|
68 | GLfloat m[4][4]; |
|
|
69 | |
|
|
70 | void draw (draw_context &ctx); |
|
|
71 | }; |
|
|
72 | #endif |
|
|
73 | |
65 | |
74 | struct vertex1d { |
66 | struct vertex1d { |
75 | colour c; // colour |
67 | colour c; // colour |
76 | point p; // vertex |
68 | point p; // vertex |
77 | }; |
69 | }; |
… | |
… | |
123 | typedef entity_opengl2d<GL_TRIANGLE_FAN> entity_triangle_fan; |
115 | typedef entity_opengl2d<GL_TRIANGLE_FAN> entity_triangle_fan; |
124 | typedef entity_opengl2d<GL_QUADS> entity_quads; |
116 | typedef entity_opengl2d<GL_QUADS> entity_quads; |
125 | typedef entity_opengl2d<GL_QUAD_STRIP> entity_quad_strip; |
117 | typedef entity_opengl2d<GL_QUAD_STRIP> entity_quad_strip; |
126 | typedef entity_opengl2d<GL_POLYGON> entity_polygon; |
118 | typedef entity_opengl2d<GL_POLYGON> entity_polygon; |
127 | |
119 | |
|
|
120 | struct entity_transform : entity_filter { |
|
|
121 | gl_matrix m; |
|
|
122 | |
|
|
123 | entity_transform (); |
|
|
124 | |
|
|
125 | void update_bbox (); |
|
|
126 | void show (); |
|
|
127 | void draw (draw_context &ctx); |
|
|
128 | }; |
|
|
129 | |
|
|
130 | struct entity_anim : entity_transform { |
|
|
131 | GLfloat vx, vy, vz; |
|
|
132 | void draw (draw_context &ctx); |
|
|
133 | }; |
|
|
134 | |
128 | #endif |
135 | #endif |
129 | |
136 | |
130 | |
137 | |
131 | |
138 | |