source: cpp/frams/neuro/impl/neuroimpl-body-sdk.h @ 858

Last change on this file since 858 was 791, checked in by Maciej Komosinski, 7 years ago

Code formatting

  • Property svn:eol-style set to native
File size: 2.5 KB
RevLine 
[286]1// This file is a part of Framsticks SDK.  http://www.framsticks.com/
2// Copyright (C) 1999-2015  Maciej Komosinski and Szymon Ulatowski.
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]10class NI_Gyro : public NeuroImpl
[109]11{
12public:
[791]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); }
[109]16};
17
18extern ParamEntry NI_Touch_tab[];
[791]19class NI_Touch : public NeuroImpl
[109]20{
21public:
[791]22        double range;
23        NeuroImpl* makeNew(){ return new NI_Touch(); } // for NeuroFactory
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]29class NI_Smell : public NeuroImpl
[109]30{
31public:
[791]32        NeuroImpl* makeNew(){ return new NI_Smell(); } // for NeuroFactory
33        void go() { setState(0); }
34        int lateinit() { if (!neuro->part) return 0; simorder = 0; return 1; }
[109]35};
36
37extern ParamEntry NI_BendMuscle_tab[];
[791]38class NI_BendMuscle : public NeuroImpl
[109]39{
40public:
[791]41        double power, bendrange;
42        NeuroImpl* makeNew(){ return new NI_BendMuscle(); } // for NeuroFactory
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
48extern ParamEntry NI_RotMuscle_tab[];
[791]49class NI_RotMuscle : public NeuroImpl
[109]50{
51public:
[791]52        double power;
53        NeuroImpl* makeNew(){ return new NI_RotMuscle(); } // for NeuroFactory
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
59extern ParamEntry NI_LinearMuscle_tab[];
[791]60class NI_LinearMuscle : public NeuroImpl
[109]61{
62public:
[791]63        double power;
64        NeuroImpl* makeNew(){ return new NI_RotMuscle(); } // for NeuroFactory
65        NI_LinearMuscle() { paramentries = NI_RotMuscle_tab; }
66        int lateinit() { if (!neuro->joint) return 0; simorder = 2; return 1; }
67        void go() {}
[109]68};
69
[791]70class NI_Sticky : public NeuroImpl
[109]71{
72public:
[791]73        double power;
74        NeuroImpl* makeNew(){ return new NI_Sticky(); } // for NeuroFactory
75        int lateinit() { if (!neuro->part) return 0; simorder = 0; return 1; }
76        void go() {}
[109]77};
78
[791]79class NI_WaterDetect : public NeuroImpl
[109]80{
81public:
[791]82        NeuroImpl* makeNew(){ return new NI_WaterDetect(); } // for NeuroFactory
83        int lateinit() { if (!neuro->part) return 0; simorder = 0; return 1; }
84        void go() { setState(0); }
[109]85};
86
[791]87class NI_Energy : public NeuroImpl
[109]88{
89public:
[791]90        NeuroImpl* makeNew(){ return new NI_Energy(); } // for NeuroFactory
91        void go() { setState(0); }
[109]92};
93
94#endif
Note: See TracBrowser for help on using the repository browser.