Mercurial > hg > Game > Cerium
annotate Renderer/Test/property_test.h @ 755:8aaa29d3e874 draft
add Test/create_task {spe, task}/Property
author | hiroki@henri.cr.ie.u-ryukyu.ac.jp |
---|---|
date | Fri, 29 Jan 2010 11:34:43 +0900 |
parents | e6b9bbed117c |
children | 4d83a6a958fd |
rev | line source |
---|---|
753 | 1 #include "Application.h" |
755
8aaa29d3e874
add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
753
diff
changeset
|
2 #include "SgChange.h" |
753 | 3 |
4 typedef void (*spe_move_func)(void *cv, int screen_w, int screen_h); | |
5 typedef void (*spe_collision_func)(void *cv, int screen_w, int screen_h); | |
6 | |
7 typedef struct { | |
8 double x, y, next_x, next_y; | |
9 double vx, vy, next_vx, next_vy; | |
10 double angle[3]; | |
11 int can_move; | |
12 int id; | |
13 char *objname; | |
14 spe_move_func move; | |
15 spe_collision_func collision; | |
16 SceneGraphPtr parent; | |
17 SceneGraphPtr root; | |
18 } *ChainPropertyPtr, ChainProperty; | |
19 | |
20 #define FALSE 0 | |
21 #define TRUE !FALSE | |
22 #define CHAIN_LEN 50 | |
23 | |
24 static const double m = 100.0; | |
25 static const double k = 7000.0; | |
26 static const double g = 9.8; | |
27 static const double dt = 0.003; | |
28 static const double chain_width = 10; | |
29 static const double safe = 0.995; | |
30 | |
31 class Chain : public Application { | |
32 public: | |
33 Chain(){} | |
34 | |
35 SceneGraphPtr scenegraph_factory(void *p, int size); | |
36 SceneGraphPtr scenegraph_connector(void *p, int size, SceneGraphPtr s, SceneGraphPtr sg_available_list); | |
37 void init(TaskManager *manager, int w, int h); | |
38 void init_chain_vars(ChainPropertyPtr cv); | |
39 void chain_move(TaskManager *manager, SceneGraphPtr sg, int w, int h); | |
40 //void chain_collision(SceneGraphPtr sg, int w, int h, SceneGraphPtr osg); | |
41 void chain_collision(ChainPropertyPtr cv, int w, int h); | |
42 //void createSceneGraphFromProperty(SceneGraphPtr root, ChainPropertyPtr cv, Viewer *sgroot); | |
43 //void property_swich(); | |
44 //void set_properties(ChainPropertyPtr cv); | |
45 MainLoopPtr init(Viewer *viewer, int screen_w, int screen_h); | |
46 | |
47 | |
48 }; |