Changeset 920


Ignore:
Timestamp:
05/10/20 01:24:46 (4 weeks ago)
Author:
Maciej Komosinski
Message:

Hinges and a muscle for solid shapes in f0

Location:
cpp/frams
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/config/f0-SDK.def

    r915 r920  
    1313PROP(y,0,1024,position.y,f,,,,p.y)
    1414PROP(z,0,1024,position.z,f,,,,p.z)
    15 PROP(sh,1,0,shape,d,0,3,0,shape)
    16 PROP(s,1,0,size,f,0.1,10.0,1.0,size)
    17 PROP(sx,1,0,scale.x,f,0.001,1000.0,1.0,scale.x)
    18 PROP(sy,1,0,scale.y,f,0.001,1000.0,1.0,scale.y)
    19 PROP(sz,1,0,scale.z,f,0.001,1000.0,1.0,scale.z)
     15PROP(sh,0,0,shape,d,0,3,0,shape)
     16PROP(s,0,0,size,f,0.1,10.0,1.0,size)
     17PROP(sx,0,0,scale.x,f,0.001,1000.0,1.0,scale.x)
     18PROP(sy,0,0,scale.y,f,0.001,1000.0,1.0,scale.y)
     19PROP(sz,0,0,scale.z,f,0.001,1000.0,1.0,scale.z)
    2020XPROP(h,1,0,hollow,f,0,1,0,hollow)
    2121XPROP(dn,1,0,density,f,0.2,5.0,1.0,density)
     
    4747PROP(dy,1,1024,delta.y,f,-2,2,0,d.y)
    4848PROP(dz,1,1024,delta.z,f,-2,2,0,d.z)
    49 PROP(sh,1,0,shape,d,0,1,0,shape)
     49PROP(sh,1,0,shape,d,0,3,0,shape)
    5050PROP(hx,1,0,hinge position.x,f,,,0,hinge_pos.x)
    5151PROP(hy,1,1024,hinge position.y,f,,,0,hinge_pos.y)
     
    7575PROP(p1,0,1024,`part1 ref#',d,-1,999999,-1,p1_refno)
    7676PROP(p2,0,1024,`part2 ref#',d,-1,999999,-1,p2_refno)
    77 PROP(sh,1,0,shape,d,0,1,0,shape)
     77PROP(sh,1,0,shape,d,0,3,0,shape)
    7878PROP(hx,1,0,hinge position.x,f,,,0,hinge_pos.x)
    7979PROP(hy,1,1024,hinge position.y,f,,,0,hinge_pos.y)
     
    170170ENDNEUROCLASS
    171171
     172NEUROCLASS(SolidMuscle,M,Muscle,,1,0,2)
     173VISUALHINTS(EffectorClass+AtFirstPart+SolidMuscleFlag)
     174SYMBOL(`6,5,25,40,35,40,45,50,35,60,25,60,25,40,4,65,85,65,50,75,50,75,85,65,85,3,65,56,49,29,57,24,72,50,4,68,53,70,53,70,55,68,55,68,53,5,50,21,60,15,70,14,79,15,87,20,81,10,1,86,20,77,21')
     175NEUROPROP(p,0,0,power,f,0.01,1.0,1.0,power)
     176NEUROPROP(a,0,0,axis,d,0,1,0,axis)
     177ENDNEUROCLASS
     178
    172179NEUROCLASS(Diff,D,Differentiate,Calculate the difference between the current and previous input value. Multiple inputs are aggregated with respect to their weights,-1,1,0)
    173180SYMBOL(`3,3,25,0,25,100,75,50,25,0,1,75,50,100,50,3,44,42,51,57,36,57,44,42')
  • cpp/frams/config/f0.def

    r915 r920  
    170170ENDNEUROCLASS
    171171
     172NEUROCLASS(SolidMuscle,M,Muscle,,1,0,2)
     173VISUALHINTS(EffectorClass+AtFirstPart+SolidMuscleFlag)
     174SYMBOL(`6,5,25,40,35,40,45,50,35,60,25,60,25,40,4,65,85,65,50,75,50,75,85,65,85,3,65,56,49,29,57,24,72,50,4,68,53,70,53,70,55,68,55,68,53,5,50,21,60,15,70,14,79,15,87,20,81,10,1,86,20,77,21')
     175NEUROPROP(p,0,0,power,f,0.01,1.0,1.0,power)
     176NEUROPROP(a,0,0,axis,d,0,1,0,axis)
     177ENDNEUROCLASS
     178
    172179NEUROCLASS(Diff,D,Differentiate,Calculate the difference between the current and previous input value. Multiple inputs are aggregated with respect to their weights,-1,1,0)
    173180SYMBOL(`3,3,25,0,25,100,75,50,25,0,1,75,50,100,50,3,44,42,51,57,36,57,44,42')
  • cpp/frams/model/f0-SDK-classes.h

    r915 r920  
    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
     
    3030 {"y",0,1024,"position.y","f",FIELD(p.y),},
    3131 {"z",0,1024,"position.z","f",FIELD(p.z),},
    32  {"sh",1,0,"shape","d 0 3 0",FIELD(shape),},
    33  {"s",1,0,"size","f 0.1 10.0 1.0",FIELD(size),},
    34  {"sx",1,0,"scale.x","f 0.001 1000.0 1.0",FIELD(scale.x),},
    35  {"sy",1,0,"scale.y","f 0.001 1000.0 1.0",FIELD(scale.y),},
    36  {"sz",1,0,"scale.z","f 0.001 1000.0 1.0",FIELD(scale.z),},
     32 {"sh",0,0,"shape","d 0 3 0",FIELD(shape),},
     33 {"s",0,0,"size","f 0.1 10.0 1.0",FIELD(size),},
     34 {"sx",0,0,"scale.x","f 0.001 1000.0 1.0",FIELD(scale.x),},
     35 {"sy",0,0,"scale.y","f 0.001 1000.0 1.0",FIELD(scale.y),},
     36 {"sz",0,0,"scale.z","f 0.001 1000.0 1.0",FIELD(scale.z),},
    3737 {"h",1,0,"hollow","f 0 1 0",FIELD(hollow),},
    3838 {"dn",1,0,"density","f 0.2 5.0 1.0",FIELD(density),},
     
    8383 {"dy",1,1024,"delta.y","f -2 2 0",FIELD(d.y),},
    8484 {"dz",1,1024,"delta.z","f -2 2 0",FIELD(d.z),},
    85  {"sh",1,0,"shape","d 0 1 0",FIELD(shape),},
     85 {"sh",1,0,"shape","d 0 3 0",FIELD(shape),},
    8686 {"hx",1,0,"hinge position.x","f",FIELD(hinge_pos.x),},
    8787 {"hy",1,1024,"hinge position.y","f",FIELD(hinge_pos.y),},
     
    126126 {"p1",0,1024,"part1 ref#","d -1 999999 -1",FIELD(p1_refno),},
    127127 {"p2",0,1024,"part2 ref#","d -1 999999 -1",FIELD(p2_refno),},
    128  {"sh",1,0,"shape","d 0 1 0",FIELD(shape),},
     128 {"sh",1,0,"shape","d 0 3 0",FIELD(shape),},
    129129 {"hx",1,0,"hinge position.x","f",FIELD(hinge_pos.x),},
    130130 {"hy",1,1024,"hinge position.y","f",FIELD(hinge_pos.y),},
     
    223223
    224224
     225
  • cpp/frams/model/modelparts.h

    r915 r920  
    11// This file is a part of Framsticks SDK.  http://www.framsticks.com/
    2 // Copyright (C) 1999-2018  Maciej Komosinski and Szymon Ulatowski.
     2// Copyright (C) 1999-2020  Maciej Komosinski and Szymon Ulatowski.
    33// See LICENSE.txt for details.
    44
     
    283283                V1BendMuscle = 64,
    284284                V1RotMuscle = 128,
    285                 LinearMuscle = 256
     285                LinearMuscle = 256,
     286                SolidMuscleFlag = 512 // the "Flag" suffix should be unified/made consistent with other enum items
    286287        };
    287288
  • cpp/frams/neuro/impl/neuroimpl-body-sdk.h

    r907 r920  
    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
     
    5757};
    5858
     59extern ParamEntry NI_SolidMuscle_tab[];
     60class NI_SolidMuscle : public NeuroImpl
     61{
     62public:
     63        paInt axis;
     64        NeuroImpl* makeNew() { return new NI_SolidMuscle(); } // for NeuroFactory
     65        NI_SolidMuscle() { paramentries = NI_SolidMuscle_tab; }
     66        int lateinit() { if (!neuro->joint) return 0; simorder = 2; return 1; }
     67        void go() {}
     68};
     69
    5970extern ParamEntry NI_LinearMuscle_tab[];
    6071class NI_LinearMuscle : public NeuroImpl
Note: See TracChangeset for help on using the changeset viewer.