Changeset 952 for cpp/frams/model


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)

Location:
cpp/frams/model
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/model/defassign-f0-SDK.h

    r945 r952  
    6161
    6262
     63
     64
     65
    6366void Part_MinMaxDef::defassign()
    6467{
    6568volume=4.18879;
    6669}
     70
     71
     72
    6773
    6874
     
    165171
    166172
     173
     174
     175
    167176void Neuro::defassign()
    168177{
     
    172181vis_style="neuro";
    173182}
     183
     184
     185
    174186
    175187
     
    234246
    235247
     248
     249
     250
  • cpp/frams/model/f0-SDK-classes.h

    r945 r952  
    11// This file is a part of Framsticks SDK.  http://www.framsticks.com/
    2 // Copyright (C) 1999-2015  Maciej Komosinski and Szymon Ulatowski.
     2// Copyright (C) 1999-2020  Maciej Komosinski and Szymon Ulatowski.
    33// See LICENSE.txt for details.
    44
     
    77ParamEntry f0_model_paramtab[]=
    88{
    9  {"Properties",2,2,"m" },
     9 {"Properties",2,2,"m",NULL,0,NULL,NULL,"Model"},
    1010 {"Visual",},
    1111 {"se",0,1024,"startenergy","f",FIELD(startenergy),},
     
    2424ParamEntry f0_part_paramtab[]=
    2525{
    26  {"Geometry",3,22,"p" },
     26 {"Geometry",3,22,"p",NULL,0,NULL,NULL,"Part"},
    2727 {"Other properties",},
    2828 {"Visual",},
     
    7171ParamEntry f0_part_minmaxdef_paramtab[]=
    7272{
    73  {"Geometry",1,1,"p" },
     73 {"Geometry",1,1,"p"},
    7474 {"f",0,0,"volume","f 0.83776 20.94395 4.18879",FIELD(volume),"Recommended default and min,max range for solid-shape Parts created and modified by genetic operators which are responsible for setting sizex,y,z. Default is the volume of the solid sphere (ball) with default radius=1 (radius is the same as sizex,y,z). Minimum is 5x less, maximum is 5x more.",},
    7575 {0,0,0,}
     
    8686ParamEntry f0_joint_paramtab[]=
    8787{
    88  {"Connections",4,27,"j" },
     88 {"Connections",4,27,"j",NULL,0,NULL,NULL,"Joint"},
    8989 {"Geometry",},
    9090 {"Other properties",},
     
    135135ParamEntry f0_nodeltajoint_paramtab[]=
    136136{
    137  {"Connections",4,21,"j" },
     137 {"Connections",4,21,"j",NULL,0,NULL,NULL,"Joint"},
    138138 {"Geometry",},
    139139 {"Other properties",},
     
    178178ParamEntry f0_neuro_paramtab[]=
    179179{
    180  {"Connections",3,10,"n" },
     180 {"Connections",3,10,"n",NULL,0,NULL,NULL,"Neuro"},
    181181 {"Other",},
    182182 {"Visual",},
     
    204204ParamEntry f0_neuroconn_paramtab[]=
    205205{
    206  {"Connection",2,4,"c" },
     206 {"Connection",2,4,"c",NULL,0,NULL,NULL,"Neuron connection"},
    207207 {"Other",},
    208208 {"n1",0,1024,"this neuro ref#","d -1 999999 -1",FIELD(n1_refno),},
     
    239239
    240240
     241
     242
     243
  • cpp/frams/model/model.cpp

    r934 r952  
    952952                                if ((check != LIVE_CHECK) && (check != CHECKPOINT_CHECK))
    953953                                {
    954                                         if (j->shape != Joint::SHAPE_FIXED)
     954                                        if (j->shape == Joint::SHAPE_BALL_AND_STICK)
    955955                                        {
    956956                                                if (j->d() > getMaxJoint().d.x)
  • cpp/frams/model/modelparts.cpp

    r932 r952  
    2222#include <frams/util/extvalue.h>
    2323#include <frams/param/paramobj.h>
     24#include <frams/neuro/neuroimpl.h>
    2425
    2526#include F0_DEFASSIGN_FILE
     
    756757        {
    757758#define FIELDSTRUCT NeuroExt
    758                 ParamEntry entry = { "class", 2, 0, "neuro class", "s", GETSET(neuroclass) };
     759                ParamEntry entries[] = {
     760                 { "class", 2, 0, "neuro class", "s", GETSET(neuroclass) },
     761                 { "liveNeuro", 2, 1, "live Neuro object", "oNeuro", GETONLY(liveNeuro) }};
    759762#undef FIELDSTRUCT
    760                 add(&entry);
     763                for(auto& e : entries) add(&e);
    761764
    762765#define FIELDSTRUCT Neuro
     
    797800        setClassName(arg->getString()); return PSET_CHANGED;
    798801}
     802
     803void NeuroExt::get_liveNeuro(PARAMGETARGS)
     804{
     805#ifndef SDK_WITHOUT_FRAMS
     806        NeuroNetImpl::getLiveNeuroObject(this,ret);
     807#endif
     808}
  • cpp/frams/model/modelparts.h

    r937 r952  
    519519        PARAMGETDEF(neuroclass);
    520520        PARAMSETDEF(neuroclass);
     521        PARAMGETDEF(liveNeuro);
    521522#undef STATRICKCLASS
    522523        static ParamEntry *getParamTab();
Note: See TracChangeset for help on using the changeset viewer.