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