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