Ignore:
Timestamp:
06/20/20 01:09:57 (4 years ago)
Author:
Maciej Komosinski
Message:

Added new receptors (Gp:"gyroscope" on a Part, Tp:Touch-proximity and Tc:Touch-contact) and improved existing ones (T, G)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/neuro/impl/neuroimpl-body-sdk.h

    r922 r952  
    1616};
    1717
     18extern ParamEntry NI_GyroP_tab[];
     19
     20class NI_GyroP : public NeuroImpl
     21{
     22public:
     23        double ry,rz;
     24        NeuroImpl* makeNew() { return new NI_GyroP(); } // for NeuroFactory
     25        int lateinit() { if (!neuro->part) return 0; simorder = 0; return 1; }
     26        void go() { setState(0); }
     27        NI_GyroP(): ry(0),rz(0) { paramentries = NI_GyroP_tab; }
     28};
     29
    1830extern ParamEntry NI_Touch_tab[];
    1931class NI_Touch : public NeuroImpl
     
    2133public:
    2234        double range;
     35        double ry,rz;
    2336        NeuroImpl* makeNew() { return new NI_Touch(); } // for NeuroFactory
    2437        int lateinit() { if (!neuro->part) return 0; simorder = 0; return 1; }
    2538        void go() { setState(0); }
    26         NI_Touch() :range(1) { paramentries = NI_Touch_tab; }
     39        NI_Touch() :range(1),ry(0),rz(0) { paramentries = NI_Touch_tab; }
    2740};
     41
     42extern ParamEntry NI_TouchP_tab[];
     43class NI_TouchP : public NI_Touch
     44{
     45public:
     46        NeuroImpl* makeNew() { return new NI_TouchP(); } // for NeuroFactory
     47        NI_TouchP() { paramentries = NI_TouchP_tab; }
     48};
     49
     50extern ParamEntry NI_TouchC_tab[];
     51class NI_TouchC : public NI_Touch
     52{
     53public:
     54        NeuroImpl* makeNew() { return new NI_TouchC(); } // for NeuroFactory
     55        NI_TouchC() { paramentries = NI_TouchC_tab; }
     56};
     57
    2858
    2959class NI_Smell : public NeuroImpl
Note: See TracChangeset for help on using the changeset viewer.