Mercurial > hg > Members > kono > Cerium
annotate TaskManager/Test/test_render/Application.cc @ 528:541013f7015c
Application ander constructing
author | game@henri.cr.ie.u-ryukyu.ac.jp |
---|---|
date | Tue, 20 Oct 2009 23:25:22 +0900 |
parents | 99a92f6a1c59 |
children |
rev | line source |
---|---|
452 | 1 #include "Application.h" |
2 | |
525 | 3 /* |
4 void | |
5 Application::set_move_func(move_func new_move) | |
6 { | |
7 this->move = new_move; | |
8 } | |
452 | 9 |
525 | 10 void |
11 Application::set_move_coll(coll_func new_coll) | |
12 { | |
13 this->coll = new_coll; | |
14 } | |
15 */ | |
452 | 16 |
17 Application::Application(){} | |
18 Application::~Application(){} | |
19 | |
525 | 20 #if 0 |
21 void | |
22 Application::apply_property(PropertyPtr p, SceneGraphPtr sgptr) | |
23 { | |
24 sgptr->xyz[0] = p->xyz[0]; | |
25 sgptr->xyz[1] = p->xyz[1]; | |
26 sgptr->xyz[2] = p->xyz[2]; | |
452 | 27 |
525 | 28 sgptr->angle[0] = p->angle[0]; |
29 sgptr->angle[1] = p->angle[1]; | |
30 sgptr->angle[2] = p->angle[2]; | |
452 | 31 |
525 | 32 sgptr->frame++; |
33 | |
34 } | |
452 | 35 |
36 SceneGraphPtr | |
528
541013f7015c
Application ander constructing
game@henri.cr.ie.u-ryukyu.ac.jp
parents:
525
diff
changeset
|
37 Application::scenegraph_factory(void *p) |
452 | 38 { |
525 | 39 SceneGraphPtr sgptr = p->scenegraph; |
40 apply_property(p, sgptr); | |
452 | 41 |
42 return NULL; | |
43 } | |
44 | |
45 SceneGraphPtr | |
528
541013f7015c
Application ander constructing
game@henri.cr.ie.u-ryukyu.ac.jp
parents:
525
diff
changeset
|
46 Application::scenegraph_connector(void *p, SceneGraphPtr sg) |
452 | 47 { |
525 | 48 SceneGraphPtr last = sg_available_list; |
452 | 49 |
525 | 50 if (!last) { |
51 sg_available_list = sg; | |
52 } else { | |
53 while (last->next) { | |
54 last = last->next; | |
55 } | |
56 last->next = sg; | |
57 sg->prev = last; | |
58 } | |
452 | 59 |
525 | 60 PropertyPtr p_curent = (PropertyPtr)sg->propertyPtr; |
61 PropertyPtr p_parent = p[p_curent->parent_id]; | |
62 SceneGraphPtr s_parent = p_parent->scenegraph; | |
452 | 63 |
525 | 64 /* childrenのリストの最後に加える (brother として)*/ |
65 if (s_parent->lastChild != NULL) { | |
66 SceneGraphPtr last = s_parent->lastChild; | |
67 last->brother = sg; | |
68 } | |
452 | 69 |
525 | 70 s_parent->lastChild = sg; |
452 | 71 |
525 | 72 if (s_parent->children == NULL) { |
73 s_parent->children = sg; | |
74 } | |
452 | 75 |
525 | 76 sg->parent = s_parent; |
452 | 77 return NULL; |
78 } | |
79 | |
525 | 80 #endif |
452 | 81 |
525 | 82 /* |
83 SceneGraphPtr | |
84 Application::scenegraph_factory(void *p, int size) | |
85 { | |
452 | 86 } |
87 | |
525 | 88 SceneGraphPtr |
89 Application::scenegraph_connector(void *p, int size, SceneGraphPtr s, SceneGraphPtr sg_available_list) | |
90 { | |
91 } | |
92 */ | |
93 | |
94 void | |
95 Application::apply_property(void *p, SceneGraphPtr sgptr) | |
96 { | |
97 } | |
98 | |
528
541013f7015c
Application ander constructing
game@henri.cr.ie.u-ryukyu.ac.jp
parents:
525
diff
changeset
|
99 SceneGraphPtr |
541013f7015c
Application ander constructing
game@henri.cr.ie.u-ryukyu.ac.jp
parents:
525
diff
changeset
|
100 Application::scenegraph_factory(void *p) |
541013f7015c
Application ander constructing
game@henri.cr.ie.u-ryukyu.ac.jp
parents:
525
diff
changeset
|
101 { |
541013f7015c
Application ander constructing
game@henri.cr.ie.u-ryukyu.ac.jp
parents:
525
diff
changeset
|
102 return NULL; |
541013f7015c
Application ander constructing
game@henri.cr.ie.u-ryukyu.ac.jp
parents:
525
diff
changeset
|
103 } |
541013f7015c
Application ander constructing
game@henri.cr.ie.u-ryukyu.ac.jp
parents:
525
diff
changeset
|
104 |
525 | 105 void |
528
541013f7015c
Application ander constructing
game@henri.cr.ie.u-ryukyu.ac.jp
parents:
525
diff
changeset
|
106 Application::scenegraph_connector(void *p, SceneGraphPtr s) |
525 | 107 { |
108 } | |
109 | |
110 void | |
528
541013f7015c
Application ander constructing
game@henri.cr.ie.u-ryukyu.ac.jp
parents:
525
diff
changeset
|
111 Application::property_loop() |
525 | 112 { |
113 } | |
114 | |
115 void Application::init(TaskManager *manager, int w, int h) | |
116 { | |
117 } | |
118 | |
119 int Application::move_task_id() | |
120 { | |
453
dc50a62ffd96
Chain extends Application. add Application to Viewer.
kazz@henri.cr.ie.u-ryukyu.ac.jp
parents:
452
diff
changeset
|
121 return move_task_id_; |
452 | 122 } |
123 |