Mercurial > hg > Members > kono > Cerium
annotate Renderer/Test/property_test.h @ 924:ad6903dd6419
show dma wait format
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 30 Jul 2010 16:40:30 +0900 |
parents | d46dea8399e4 |
children |
rev | line source |
---|---|
779 | 1 |
756
2575791a333a
add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
754
diff
changeset
|
2 #include "SgChange.h" |
754 | 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; | |
781 | 13 const char *objname; |
754 | 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 }; |