source: cpp/gdk/neuroimpl-body-gdk.h @ 50

Last change on this file since 50 was 5, checked in by sz, 16 years ago

added the GDK (Genotype Development Kit)

File size: 2.5 KB
Line 
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
14class NI_Gyro: public NeuroImpl
15{
16public:
17NeuroImpl* makeNew(){return new NI_Gyro();} // for NeuroFactory
18int lateinit() {if (!neuro->joint) return 0; simorder=0; return 1;}
19void go() {setState(0);}
20};
21
22class NI_Touch: public NeuroImpl
23{
24public:
25NeuroImpl* makeNew(){return new NI_Touch();} // for NeuroFactory
26int lateinit() {if (!neuro->part) return 0; simorder=0; return 1;}
27void go() {setState(0);}
28};
29
30class NI_Smell: public NeuroImpl
31{
32public:
33NeuroImpl* makeNew(){return new NI_Smell();} // for NeuroFactory
34void go() {setState(0);}
35int lateinit() {if (!neuro->part) return 0; simorder=0; return 1;}
36};
37
38extern ParamEntry NI_BendMuscle_tab[];
39class NI_BendMuscle: public NeuroImpl
40{
41public:
42double power,bendrange;
43NeuroImpl* makeNew(){return new NI_BendMuscle();} // for NeuroFactory
44NI_BendMuscle() {paramentries=NI_BendMuscle_tab;}
45int lateinit() {if (!neuro->joint) return 0; simorder=2; return 1;}
46void go() {}
47};
48
49extern ParamEntry NI_RotMuscle_tab[];
50class NI_RotMuscle: public NeuroImpl
51{
52public:
53double power;
54NeuroImpl* makeNew(){return new NI_RotMuscle();} // for NeuroFactory
55NI_RotMuscle() {paramentries=NI_RotMuscle_tab;}
56int lateinit() {if (!neuro->joint) return 0; simorder=2; return 1;}
57void go() {}
58};
59
60extern ParamEntry NI_LinearMuscle_tab[];
61class NI_LinearMuscle: public NeuroImpl
62{
63public:
64double power;
65NeuroImpl* makeNew(){return new NI_RotMuscle();} // for NeuroFactory
66NI_LinearMuscle() {paramentries=NI_RotMuscle_tab;}
67int lateinit() {if (!neuro->joint) return 0; simorder=2; return 1;}
68void go() {}
69};
70
71class NI_Sticky: public NeuroImpl
72{
73public:
74double power;
75NeuroImpl* makeNew(){return new NI_Sticky();} // for NeuroFactory
76int lateinit() {if (!neuro->part) return 0; simorder=0; return 1;}
77void go() {}
78};
79
80class NI_WaterDetect: public NeuroImpl
81{
82public:
83NeuroImpl* makeNew(){return new NI_WaterDetect();} // for NeuroFactory
84int lateinit() {if (!neuro->part) return 0; simorder=0; return 1;}
85void go() {setState(0);}
86};
87
88class NI_Energy: public NeuroImpl
89{
90public:
91NeuroImpl* makeNew(){return new NI_Energy();} // for NeuroFactory
92void go() {setState(0);}
93};
94
95#endif
96
Note: See TracBrowser for help on using the repository browser.