1 | // This file is a part of Framsticks GDK library. |
---|
2 | // Copyright (C) 2002-2006 Szymon Ulatowski. See LICENSE.txt for details. |
---|
3 | // Refer to http://www.frams.alife.pl/ for further information. |
---|
4 | |
---|
5 | // This file is a part of Framsticks GDK library. |
---|
6 | // Copyright (C) 2002-2006 Szymon Ulatowski. See LICENSE.txt for details. |
---|
7 | // Refer to http://www.frams.alife.pl/ for further information. |
---|
8 | |
---|
9 | #ifndef _NEUROIMPLBODY_H_ |
---|
10 | #define _NEUROIMPLBODY_H_ |
---|
11 | |
---|
12 | #include "neuroimpl.h" |
---|
13 | |
---|
14 | class NI_Gyro: public NeuroImpl |
---|
15 | { |
---|
16 | public: |
---|
17 | NeuroImpl* makeNew(){return new NI_Gyro();} // for NeuroFactory |
---|
18 | int lateinit() {if (!neuro->joint) return 0; simorder=0; return 1;} |
---|
19 | void go() {setState(0);} |
---|
20 | }; |
---|
21 | |
---|
22 | class NI_Touch: public NeuroImpl |
---|
23 | { |
---|
24 | public: |
---|
25 | NeuroImpl* makeNew(){return new NI_Touch();} // for NeuroFactory |
---|
26 | int lateinit() {if (!neuro->part) return 0; simorder=0; return 1;} |
---|
27 | void go() {setState(0);} |
---|
28 | }; |
---|
29 | |
---|
30 | class NI_Smell: public NeuroImpl |
---|
31 | { |
---|
32 | public: |
---|
33 | NeuroImpl* makeNew(){return new NI_Smell();} // for NeuroFactory |
---|
34 | void go() {setState(0);} |
---|
35 | int lateinit() {if (!neuro->part) return 0; simorder=0; return 1;} |
---|
36 | }; |
---|
37 | |
---|
38 | extern ParamEntry NI_BendMuscle_tab[]; |
---|
39 | class NI_BendMuscle: public NeuroImpl |
---|
40 | { |
---|
41 | public: |
---|
42 | double power,bendrange; |
---|
43 | NeuroImpl* makeNew(){return new NI_BendMuscle();} // for NeuroFactory |
---|
44 | NI_BendMuscle() {paramentries=NI_BendMuscle_tab;} |
---|
45 | int lateinit() {if (!neuro->joint) return 0; simorder=2; return 1;} |
---|
46 | void go() {} |
---|
47 | }; |
---|
48 | |
---|
49 | extern ParamEntry NI_RotMuscle_tab[]; |
---|
50 | class NI_RotMuscle: public NeuroImpl |
---|
51 | { |
---|
52 | public: |
---|
53 | double power; |
---|
54 | NeuroImpl* makeNew(){return new NI_RotMuscle();} // for NeuroFactory |
---|
55 | NI_RotMuscle() {paramentries=NI_RotMuscle_tab;} |
---|
56 | int lateinit() {if (!neuro->joint) return 0; simorder=2; return 1;} |
---|
57 | void go() {} |
---|
58 | }; |
---|
59 | |
---|
60 | extern ParamEntry NI_LinearMuscle_tab[]; |
---|
61 | class NI_LinearMuscle: public NeuroImpl |
---|
62 | { |
---|
63 | public: |
---|
64 | double power; |
---|
65 | NeuroImpl* makeNew(){return new NI_RotMuscle();} // for NeuroFactory |
---|
66 | NI_LinearMuscle() {paramentries=NI_RotMuscle_tab;} |
---|
67 | int lateinit() {if (!neuro->joint) return 0; simorder=2; return 1;} |
---|
68 | void go() {} |
---|
69 | }; |
---|
70 | |
---|
71 | class NI_Sticky: public NeuroImpl |
---|
72 | { |
---|
73 | public: |
---|
74 | double power; |
---|
75 | NeuroImpl* makeNew(){return new NI_Sticky();} // for NeuroFactory |
---|
76 | int lateinit() {if (!neuro->part) return 0; simorder=0; return 1;} |
---|
77 | void go() {} |
---|
78 | }; |
---|
79 | |
---|
80 | class NI_WaterDetect: public NeuroImpl |
---|
81 | { |
---|
82 | public: |
---|
83 | NeuroImpl* makeNew(){return new NI_WaterDetect();} // for NeuroFactory |
---|
84 | int lateinit() {if (!neuro->part) return 0; simorder=0; return 1;} |
---|
85 | void go() {setState(0);} |
---|
86 | }; |
---|
87 | |
---|
88 | class NI_Energy: public NeuroImpl |
---|
89 | { |
---|
90 | public: |
---|
91 | NeuroImpl* makeNew(){return new NI_Energy();} // for NeuroFactory |
---|
92 | void go() {setState(0);} |
---|
93 | }; |
---|
94 | |
---|
95 | #endif |
---|
96 | |
---|