Changeset 754
- Timestamp:
- 03/02/18 18:46:54 (7 years ago)
- Location:
- cpp/frams
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/config/f0-SDK.def
r732 r754 3 3 GROUP(Visual) 4 4 PROP(se,0,1024,startenergy,f,,,,startenergy) 5 PROP(Vstyle,1,0,vis_style,s,0, -1,,vis_style)5 PROP(Vstyle,1,0,vis_style,s,0,0,,vis_style) 6 6 ENDCLASS 7 7 … … 27 27 PROP(rz,0,1024,rot.z,f,,,,rot.z) 28 28 PROP(i,1,0,`info',s,,,,info) 29 PROP(Vstyle,2,0,vis_style,s,0, -1,part,vis_style)29 PROP(Vstyle,2,0,vis_style,s,0,0,part,vis_style) 30 30 XPROP(vs,2,0,visual thickness,f,0.05,0.7,0.2,vsize) 31 31 XPROP(vr,2,0,red component,f,0.0,1.0,1.0,vcolor.x) … … 52 52 PROP(stam,2,0,stamina,f,0.0,1.0,0.25,stamina) 53 53 PROP(i,2,0,`info',s,,,,info) 54 PROP(Vstyle,3,0,vis_style,s,0, -1,joint,vis_style)54 PROP(Vstyle,3,0,vis_style,s,0,0,joint,vis_style) 55 55 XPROP(vr,3,0,red component,f,0.0,1.0,1.0,vcolor.x) 56 56 XPROP(vg,3,1024,green component,f,0.0,1.0,1.0,vcolor.y) … … 70 70 PROP(stam,2,0,stamina,f,0.0,1.0,0.25,stamina) 71 71 PROP(i,2,0,`info',s,,,,info) 72 PROP(Vstyle,3,0,vis_style,s,0, -1,joint,vis_style)72 PROP(Vstyle,3,0,vis_style,s,0,0,joint,vis_style) 73 73 XPROP(vr,3,0,red component,f,0.0,1.0,1.0,vcolor.x) 74 74 XPROP(vg,3,1024,green component,f,0.0,1.0,1.0,vcolor.y) … … 84 84 PROP(d,1,0,details,s,,,N,details,GETSET) 85 85 PROP(i,1,0,`info',s,,,,info) 86 PROP(Vstyle,2,0,vis_style,s,0, -1,neuro,vis_style)86 PROP(Vstyle,2,0,vis_style,s,0,0,neuro,vis_style) 87 87 PROP(getInputCount,0,1+2,`input count',d,,,,inputCount,GETONLY) 88 88 PROP(getInputNeuroDef,0,1+2,`get input neuron',p oNeuroDef(d),,,,p_getInputNeuroDef,PROCEDURE) -
cpp/frams/config/f0.def
r732 r754 3 3 GROUP(Visual) 4 4 PROP(se,0,1024,startenergy,f,,,,startenergy) 5 PROP(Vstyle,1,0,vis_style,s,0, -1,,vis_style)5 PROP(Vstyle,1,0,vis_style,s,0,0,,vis_style) 6 6 ENDCLASS 7 7 … … 27 27 PROP(rz,0,1024,rot.z,f,,,,rot.z) 28 28 PROP(i,1,0,`info',s,,,,info) 29 PROP(Vstyle,2,0,vis_style,s,0, -1,part,vis_style)29 PROP(Vstyle,2,0,vis_style,s,0,0,part,vis_style) 30 30 XPROP(vs,2,0,visual thickness,f,0.05,0.7,0.2,vsize) 31 31 XPROP(vr,2,0,red component,f,0.0,1.0,1.0,vcolor.x) … … 52 52 PROP(stam,2,0,stamina,f,0.0,1.0,0.25,stamina) 53 53 PROP(i,2,0,`info',s,,,,info) 54 PROP(Vstyle,3,0,vis_style,s,0, -1,joint,vis_style)54 PROP(Vstyle,3,0,vis_style,s,0,0,joint,vis_style) 55 55 XPROP(vr,3,0,red component,f,0.0,1.0,1.0,vcolor.x) 56 56 XPROP(vg,3,1024,green component,f,0.0,1.0,1.0,vcolor.y) … … 70 70 PROP(stam,2,0,stamina,f,0.0,1.0,0.25,stamina) 71 71 PROP(i,2,0,`info',s,,,,info) 72 PROP(Vstyle,3,0,vis_style,s,0, -1,joint,vis_style)72 PROP(Vstyle,3,0,vis_style,s,0,0,joint,vis_style) 73 73 XPROP(vr,3,0,red component,f,0.0,1.0,1.0,vcolor.x) 74 74 XPROP(vg,3,1024,green component,f,0.0,1.0,1.0,vcolor.y) … … 84 84 PROP(d,1,0,details,s,,,N,details,GETSET) 85 85 PROP(i,1,0,`info',s,,,,info) 86 PROP(Vstyle,2,0,vis_style,s,0, -1,neuro,vis_style)86 PROP(Vstyle,2,0,vis_style,s,0,0,neuro,vis_style) 87 87 PROP(getInputCount,0,1+2,`input count',d,,,,inputCount,GETONLY) 88 88 PROP(getInputNeuroDef,0,0,`get input neuron',p oNeuroDef(d),,,,p_getInputNeuroDef,PROCEDURE) -
cpp/frams/model/f0-SDK-classes.h
r732 r754 10 10 {"Visual",}, 11 11 {"se",0,1024,"startenergy","f",FIELD(startenergy),}, 12 {"Vstyle",1,0,"vis_style","s 0 -1",FIELD(vis_style),},12 {"Vstyle",1,0,"vis_style","s 0 0 ",FIELD(vis_style),}, 13 13 {0,0,0,} 14 14 }; … … 44 44 {"rz",0,1024,"rot.z","f",FIELD(rot.z),}, 45 45 {"i",1,0,"info","s",FIELD(info),}, 46 {"Vstyle",2,0,"vis_style","s 0 -1part",FIELD(vis_style),},46 {"Vstyle",2,0,"vis_style","s 0 0 part",FIELD(vis_style),}, 47 47 {"vs",2,0,"visual thickness","f 0.05 0.7 0.2",FIELD(vsize),}, 48 48 {"vr",2,0,"red component","f 0.0 1.0 1.0",FIELD(vcolor.x),}, … … 88 88 {"stam",2,0,"stamina","f 0.0 1.0 0.25",FIELD(stamina),}, 89 89 {"i",2,0,"info","s",FIELD(info),}, 90 {"Vstyle",3,0,"vis_style","s 0 -1joint",FIELD(vis_style),},90 {"Vstyle",3,0,"vis_style","s 0 0 joint",FIELD(vis_style),}, 91 91 {"vr",3,0,"red component","f 0.0 1.0 1.0",FIELD(vcolor.x),}, 92 92 {"vg",3,1024,"green component","f 0.0 1.0 1.0",FIELD(vcolor.y),}, … … 121 121 {"stam",2,0,"stamina","f 0.0 1.0 0.25",FIELD(stamina),}, 122 122 {"i",2,0,"info","s",FIELD(info),}, 123 {"Vstyle",3,0,"vis_style","s 0 -1joint",FIELD(vis_style),},123 {"Vstyle",3,0,"vis_style","s 0 0 joint",FIELD(vis_style),}, 124 124 {"vr",3,0,"red component","f 0.0 1.0 1.0",FIELD(vcolor.x),}, 125 125 {"vg",3,1024,"green component","f 0.0 1.0 1.0",FIELD(vcolor.y),}, … … 150 150 {"d",1,0,"details","s",GETSET(details),}, 151 151 {"i",1,0,"info","s",FIELD(info),}, 152 {"Vstyle",2,0,"vis_style","s 0 -1neuro",FIELD(vis_style),},152 {"Vstyle",2,0,"vis_style","s 0 0 neuro",FIELD(vis_style),}, 153 153 {"getInputCount",0,1+2,"input count","d",GETONLY(inputCount),}, 154 154 {"getInputNeuroDef",0,1+2,"get input neuron","p oNeuroDef(d)",PROCEDURE(p_getInputNeuroDef),}, -
cpp/frams/param/param.cpp
r745 r754 1 1 // This file is a part of Framsticks SDK. http://www.framsticks.com/ 2 // Copyright (C) 1999-201 7Maciej Komosinski and Szymon Ulatowski.2 // Copyright (C) 1999-2018 Maciej Komosinski and Szymon Ulatowski. 3 3 // See LICENSE.txt for details. 4 4 … … 801 801 { 802 802 case 'd': 803 {paInt a, b, c; if (getMinMaxIntFromTypeDef(t, a, b, c) == 1) return false; } 803 { 804 paInt a, b, c; 805 int have = getMinMaxIntFromTypeDef(t, a, b, c); 806 if (have == 1) return false; 807 if ((have >= 2) && (b < a) && (a != 0) && (b != -1)) return false; // max<min meaning 'undefined' is only allowed as "d 0 -1" 808 } 804 809 break; 805 810 case 'f': 806 {double a, b, c; if (getMinMaxDoubleFromTypeDef(t, a, b, c) == 1) return false; } 811 { 812 double a, b, c; 813 int have = getMinMaxDoubleFromTypeDef(t, a, b, c); 814 if (have == 1) return false; 815 if ((have >= 2) && (b < a) && (a != 0) && (b != -1)) return false; // max<min meaning 'undefined' is only allowed as "f 0 -1" 816 } 817 break; 818 case 's': 819 { 820 int a, b; SString c; 821 int have = getMinMaxStringFromTypeDef(t, a, b, c); 822 //if (have == 1) return false; //not sure? 823 if ((have >= 1) && (!((a == 0) || (a == 1)))) return false; // 'min' for string (single/multi) can be only 0 or 1 824 if ((have >= 2) && (b < 0)) return false; // max=0 means unlimited, max<0 is not allowed 825 } 807 826 break; 808 827 }
Note: See TracChangeset
for help on using the changeset viewer.