539
|
1 #include "Application.h"
|
|
2
|
|
3 typedef struct {
|
|
4 double x, y, next_x, next_y;
|
|
5 double vx, vy, next_vx, next_vy;
|
|
6 double angle[3];
|
|
7 int can_move;
|
|
8 SceneGraphPtr parent;
|
|
9 int id;
|
|
10 int parent_id;
|
|
11 } *ChainPropertyPtr, ChainProperty;
|
|
12
|
|
13
|
|
14 class Chain : public Application {
|
|
15 public:
|
|
16 Chain(){}
|
|
17
|
|
18 SceneGraphPtr scenegraph_factory(void *p, int size);
|
|
19 SceneGraphPtr scenegraph_connector(void *p, int size, SceneGraphPtr s, SceneGraphPtr sg_available_list);
|
|
20 void init(TaskManager *manager, int w, int h);
|
|
21 void init_chain_vars(ChainPropertyPtr cv);
|
|
22 void chain_move(TaskManager *manager, SceneGraphPtr sg, int w, int h);
|
|
23 void chain_collision(SceneGraphPtr sg, int w, int h, SceneGraphPtr osg);
|
|
24
|
|
25 };
|