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

Last change on this file since 64 was 64, checked in by Maciej Komosinski, 13 years ago

a lot of minor fixes

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