source: cpp/frams/model/f0-SDK-classes.h @ 920

Last change on this file since 920 was 920, checked in by Maciej Komosinski, 4 years ago

Hinges and a muscle for solid shapes in f0

  • Property svn:eol-style set to native
File size: 7.8 KB
Line 
1// This file is a part of Framsticks SDK.  http://www.framsticks.com/
2// Copyright (C) 1999-2020  Maciej Komosinski and Szymon Ulatowski.
3// See LICENSE.txt for details.
4
5
6#define FIELDSTRUCT Model
7ParamEntry f0_model_paramtab[]=
8{
9 {"Properties",2,2,"m" },
10 {"Visual",},
11 {"se",0,1024,"startenergy","f",FIELD(startenergy),},
12 {"Vstyle",1,0,"vis_style","s 0 0 ",FIELD(vis_style),},
13 {0,0,0,}
14};
15ParamEntry f0_model_xtra_paramtab[]=
16{
17 {"Extra properties",1,0,"m"},
18 {0,0,0,}
19};
20#undef FIELDSTRUCT
21
22
23#define FIELDSTRUCT Part
24ParamEntry f0_part_paramtab[]=
25{
26 {"Geometry",3,22,"p" },
27 {"Other properties",},
28 {"Visual",},
29 {"x",0,1024,"position.x","f",FIELD(p.x),},
30 {"y",0,1024,"position.y","f",FIELD(p.y),},
31 {"z",0,1024,"position.z","f",FIELD(p.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),},
37 {"h",1,0,"hollow","f 0 1 0",FIELD(hollow),},
38 {"dn",1,0,"density","f 0.2 5.0 1.0",FIELD(density),},
39 {"fr",1,0,"friction","f 0.0 4.0 0.4",FIELD(friction),},
40 {"ing",1,0,"ingestion","f 0.0 1.0 0.25",FIELD(ingest),},
41 {"as",1,0,"assimilation","f 0.0 1.0 0.25",FIELD(assim),},
42 {"rx",0,0,"rot.x","f",FIELD(rot.x),},
43 {"ry",0,1024,"rot.y","f",FIELD(rot.y),},
44 {"rz",0,1024,"rot.z","f",FIELD(rot.z),},
45 {"i",1,0,"info","s",FIELD(info),},
46 {"Vstyle",2,0,"vis_style","s 0 0 part",FIELD(vis_style),},
47 {"vs",2,0,"visual thickness","f 0.05 0.7 0.2",FIELD(vsize),},
48 {"vr",2,0,"red component","f 0.0 1.0 1.0",FIELD(vcolor.x),},
49 {"vg",2,1024,"green component","f 0.0 1.0 1.0",FIELD(vcolor.y),},
50 {"vb",2,1024,"blue component","f 0.0 1.0 1.0",FIELD(vcolor.z),},
51 {0,0,0,}
52};
53ParamEntry f0_part_xtra_paramtab[]=
54{
55 {"Extra properties",1,9,"p"},
56 {"h",0,0,"hollow","f 0 1 0",FIELD(hollow),},
57 {"dn",0,0,"density","f 0.2 5.0 1.0",FIELD(density),},
58 {"fr",0,0,"friction","f 0.0 4.0 0.4",FIELD(friction),},
59 {"ing",0,0,"ingestion","f 0.0 1.0 0.25",FIELD(ingest),},
60 {"as",0,0,"assimilation","f 0.0 1.0 0.25",FIELD(assim),},
61 {"vs",0,0,"visual thickness","f 0.05 0.7 0.2",FIELD(vsize),},
62 {"vr",0,0,"red component","f 0.0 1.0 1.0",FIELD(vcolor.x),},
63 {"vg",0,1024,"green component","f 0.0 1.0 1.0",FIELD(vcolor.y),},
64 {"vb",0,1024,"blue component","f 0.0 1.0 1.0",FIELD(vcolor.z),},
65 {0,0,0,}
66};
67#undef FIELDSTRUCT
68
69
70#define FIELDSTRUCT Joint
71ParamEntry f0_joint_paramtab[]=
72{
73 {"Connections",4,27,"j" },
74 {"Geometry",},
75 {"Other properties",},
76 {"Visual",},
77 {"p1",0,1024,"part1 ref#","d -1 999999 -1",FIELD(p1_refno),},
78 {"p2",0,1024,"part2 ref#","d -1 999999 -1",FIELD(p2_refno),},
79 {"rx",1,0,"rotation.x","f",FIELD(rot.x),},
80 {"ry",1,1024,"rotation.y","f",FIELD(rot.y),},
81 {"rz",1,1024,"rotation.z","f",FIELD(rot.z),},
82 {"dx",1,0,"delta.x","f -2 2 0",FIELD(d.x),},
83 {"dy",1,1024,"delta.y","f -2 2 0",FIELD(d.y),},
84 {"dz",1,1024,"delta.z","f -2 2 0",FIELD(d.z),},
85 {"sh",1,0,"shape","d 0 3 0",FIELD(shape),},
86 {"hx",1,0,"hinge position.x","f",FIELD(hinge_pos.x),},
87 {"hy",1,1024,"hinge position.y","f",FIELD(hinge_pos.y),},
88 {"hz",1,1024,"hinge position.z","f",FIELD(hinge_pos.z),},
89 {"hrx",1,0,"hinge rotation.x","f",FIELD(hinge_rot.x),},
90 {"hry",1,1024,"hinge rotation.y","f",FIELD(hinge_rot.y),},
91 {"hrz",1,1024,"hinge rotation.z","f",FIELD(hinge_rot.z),},
92 {"hxn",1,0,"hinge x negative limit","f -6.2832 0 -1.5708",FIELD(hinge_limit_x[0]),},
93 {"hxp",1,1024,"hinge x positive limit","f 0 6.2832 1.5708",FIELD(hinge_limit_x[1]),},
94 {"hyn",1,0,"hinge y negative limit","f -6.2832 0 -1.5708",FIELD(hinge_limit_y[0]),},
95 {"hyp",1,1024,"hinge y positive limit","f 0 6.2832 1.5708",FIELD(hinge_limit_y[1]),},
96 {"stif",2,0,"stiffness","f 0.0 1.0 1.0",FIELD(stif),},
97 {"rotstif",2,0,"rotation stiffness","f 0.0 1.0 1.0",FIELD(rotstif),},
98 {"stam",2,0,"stamina","f 0.0 1.0 0.25",FIELD(stamina),},
99 {"i",2,0,"info","s",FIELD(info),},
100 {"Vstyle",3,0,"vis_style","s 0 0 joint",FIELD(vis_style),},
101 {"vr",3,0,"red component","f 0.0 1.0 1.0",FIELD(vcolor.x),},
102 {"vg",3,1024,"green component","f 0.0 1.0 1.0",FIELD(vcolor.y),},
103 {"vb",3,1024,"blue component","f 0.0 1.0 1.0",FIELD(vcolor.z),},
104 {0,0,0,}
105};
106ParamEntry f0_joint_xtra_paramtab[]=
107{
108 {"Extra properties",1,5,"j"},
109 {"stif",0,0,"stiffness","f 0.0 1.0 1.0",FIELD(stif),},
110 {"rotstif",0,0,"rotation stiffness","f 0.0 1.0 1.0",FIELD(rotstif),},
111 {"vr",0,0,"red component","f 0.0 1.0 1.0",FIELD(vcolor.x),},
112 {"vg",0,1024,"green component","f 0.0 1.0 1.0",FIELD(vcolor.y),},
113 {"vb",0,1024,"blue component","f 0.0 1.0 1.0",FIELD(vcolor.z),},
114 {0,0,0,}
115};
116#undef FIELDSTRUCT
117
118
119#define FIELDSTRUCT Joint
120ParamEntry f0_nodeltajoint_paramtab[]=
121{
122 {"Connections",4,21,"j" },
123 {"Geometry",},
124 {"Other properties",},
125 {"Visual",},
126 {"p1",0,1024,"part1 ref#","d -1 999999 -1",FIELD(p1_refno),},
127 {"p2",0,1024,"part2 ref#","d -1 999999 -1",FIELD(p2_refno),},
128 {"sh",1,0,"shape","d 0 3 0",FIELD(shape),},
129 {"hx",1,0,"hinge position.x","f",FIELD(hinge_pos.x),},
130 {"hy",1,1024,"hinge position.y","f",FIELD(hinge_pos.y),},
131 {"hz",1,1024,"hinge position.z","f",FIELD(hinge_pos.z),},
132 {"hrx",1,0,"hinge rotation.x","f",FIELD(hinge_rot.x),},
133 {"hry",1,1024,"hinge rotation.y","f",FIELD(hinge_rot.y),},
134 {"hrz",1,1024,"hinge rotation.z","f",FIELD(hinge_rot.z),},
135 {"hxn",1,0,"hinge x negative limit","f -6.2832 0 -1.5708",FIELD(hinge_limit_x[0]),},
136 {"hxp",1,1024,"hinge x positive limit","f 0 6.2832 1.5708",FIELD(hinge_limit_x[1]),},
137 {"hyn",1,0,"hinge y negative limit","f -6.2832 0 -1.5708",FIELD(hinge_limit_y[0]),},
138 {"hyp",1,1024,"hinge y positive limit","f 0 6.2832 1.5708",FIELD(hinge_limit_y[1]),},
139 {"stif",2,0,"stiffness","f 0.0 1.0 1.0",FIELD(stif),},
140 {"rotstif",2,0,"rotation stiffness","f 0.0 1.0 1.0",FIELD(rotstif),},
141 {"stam",2,0,"stamina","f 0.0 1.0 0.25",FIELD(stamina),},
142 {"i",2,0,"info","s",FIELD(info),},
143 {"Vstyle",3,0,"vis_style","s 0 0 joint",FIELD(vis_style),},
144 {"vr",3,0,"red component","f 0.0 1.0 1.0",FIELD(vcolor.x),},
145 {"vg",3,1024,"green component","f 0.0 1.0 1.0",FIELD(vcolor.y),},
146 {"vb",3,1024,"blue component","f 0.0 1.0 1.0",FIELD(vcolor.z),},
147 {0,0,0,}
148};
149ParamEntry f0_nodeltajoint_xtra_paramtab[]=
150{
151 {"Extra properties",1,5,"j"},
152 {"stif",0,0,"stiffness","f 0.0 1.0 1.0",FIELD(stif),},
153 {"rotstif",0,0,"rotation stiffness","f 0.0 1.0 1.0",FIELD(rotstif),},
154 {"vr",0,0,"red component","f 0.0 1.0 1.0",FIELD(vcolor.x),},
155 {"vg",0,1024,"green component","f 0.0 1.0 1.0",FIELD(vcolor.y),},
156 {"vb",0,1024,"blue component","f 0.0 1.0 1.0",FIELD(vcolor.z),},
157 {0,0,0,}
158};
159#undef FIELDSTRUCT
160
161
162#define FIELDSTRUCT Neuro
163ParamEntry f0_neuro_paramtab[]=
164{
165 {"Connections",3,10,"n" },
166 {"Other",},
167 {"Visual",},
168 {"p",0,0,"part ref#","d -1 999999 -1",FIELD(part_refno),},
169 {"j",0,0,"joint ref#","d -1 999999 -1",FIELD(joint_refno),},
170 {"d",1,0,"details","s",GETSET(details),},
171 {"i",1,0,"info","s",FIELD(info),},
172 {"Vstyle",2,0,"vis_style","s 0 0 neuro",FIELD(vis_style),},
173 {"getInputCount",0,1+2,"input count","d",GETONLY(inputCount),},
174 {"getInputNeuroDef",0,1+2,"get input neuron","p oNeuroDef(d)",PROCEDURE(p_getInputNeuroDef),},
175 {"getInputNeuroIndex",0,1+2,"get input neuron index","p d(d)",PROCEDURE(p_getInputNeuroIndex),},
176 {"getInputWeight",0,1+2,"get input weight","p f(d)",PROCEDURE(p_getInputWeight),},
177 {"classObject",0,1+2,"neuron class","oNeuroClass",GETONLY(classObject),},
178 {0,0,0,}
179};
180ParamEntry f0_neuro_xtra_paramtab[]=
181{
182 {"Extra properties",1,0,"n"},
183 {0,0,0,}
184};
185#undef FIELDSTRUCT
186
187
188#define FIELDSTRUCT NeuroConn
189ParamEntry f0_neuroconn_paramtab[]=
190{
191 {"Connection",2,4,"c" },
192 {"Other",},
193 {"n1",0,1024,"this neuro ref#","d -1 999999 -1",FIELD(n1_refno),},
194 {"n2",0,1024,"connected neuro ref#","d -1 999999 -1",FIELD(n2_refno),},
195 {"w",0,1024,"weight","f -999999 999999 1.0",FIELD(weight),},
196 {"i",1,0,"info","s",FIELD(info),},
197 {0,0,0,}
198};
199ParamEntry f0_neuroconn_xtra_paramtab[]=
200{
201 {"Extra properties",1,0,"c"},
202 {0,0,0,}
203};
204#undef FIELDSTRUCT
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
Note: See TracBrowser for help on using the repository browser.