source: java/main/src/test/resources/info/Creature.info

Last change on this file was 86, checked in by psniegowski, 11 years ago

HIGHLIGHTS:

  • use java annotations to mark classes and fields to be used when:
    • using java classes with ReflectionAccess? to represent remote objects with FramsClass? description found by "info ..." requests
    • to build up FramsClass? representation of objects not present at remote server
  • allow using primitive types (instead of wraping counterparts) in reflected classes
  • rework FramsClass? creation process (add FramsClassBuilder?)
  • add more tests

CHANGELOG:
Prepare model.World class.

Minor change.

Use primitive types for Genotype and Creature classes.

Use primitive types in model.Neuro* classes.

Use primitive types in model.Joint* classes.

Use primitive types in model.Part* classes.

Fix primitive values.

Extract FramsClassBuilder?.

Add tests of Model classes.

More fixes.

Refactorize out ParamCandidate?.

Several fixes.

Fix all regressions after introducing annotations.

Use annotations throughout the project.

Add exception classes.

Improve creation of FramsClass?.

More changes.

Many changes regarding annotations.

Annotate classes in com.framsticks.model package.

Remove manual FramsClass? constructor.

Construct FramsClass? for Creature. Add test.

Add default values to the ParamAnnotation?.

Add ParamBuilderTest? and ParamAnnotation?.

Add FramsClassAnnotation?.

File size: 6.3 KB
Line 
1class:
2id:Creature
3
4prop:
5name:Name
6id:name
7type:s
8flags:0
9
10prop:
11name:Genotype
12id:genotype
13type:s
14flags:0
15
16prop:
17name:Info
18id:info
19type:s
20help:Additional info or comments
21flags:0
22
23prop:
24name:group
25id:group
26type:x
27flags:33
28
29prop:
30name:Generation
31id:gnum
32type:d
33flags:0
34
35prop:
36name:Build problems
37id:buildproblems
38type:d
39flags:32
40
41prop:
42name:Starting energy
43id:energ0
44type:f
45flags:0
46
47prop:
48name:Idle power consumption
49id:idleen
50type:f
51flags:0
52
53prop:
54name:Energy
55id:energy
56type:f
57flags:0
58
59prop:
60name:Energy income
61id:energy_p
62type:f
63flags:0
64
65prop:
66name:Energy costs
67id:energy_m
68type:f
69flags:0
70
71prop:
72name:Energy balance
73id:energy_b
74type:f
75flags:0
76
77prop:
78name:Performance calculation
79id:perf
80type:d
81help:Initial value of this property is taken from Population.enableperf
82flags:0
83
84prop:
85name:NN enabled
86id:nnenabled
87type:d 0 1
88flags:0
89
90prop:
91name:Body simulation
92id:bodysim
93type:d 0 1
94help:~
95(Physical) body simulation can be disabled for individual objects which makes them immovable. Disabled objects can still participate in collisions depending on their collisions masks.
96
97Bugs: the standard collision handler does not work for disabled objects when ODE simulation is used. It means that these objects won't physically interact with other objects. The custom (scripting) handlers work as expected.~
98flags:0
99
100prop:
101name:Self-collisions
102id:selfcol
103type:d 0 1
104help:Enable/disable detection of self-collisions (within a creature body). They can only occur when using the ODE simulation engine. If enabled, the creature will have its sticks collide during lifespan.
105flags:0
106
107prop:
108name:Self-collisions
109id:selfcolstate
110type:d 0 1
111help:Current self-collision state
112flags:35
113
114prop:
115name:Life span
116id:lifespan
117type:d
118flags:0
119
120prop:
121name:Distance
122id:distance
123type:f
124flags:0
125
126prop:
127name:Velocity
128id:c_velocity
129type:f
130flags:0
131
132prop:
133name:Vertical velocity
134id:c_vertvelocity
135type:f
136flags:0
137
138prop:
139name:Vertical position
140id:c_vertpos
141type:f
142flags:0
143
144prop:
145name:Avg. velocity
146id:velocity
147type:f
148flags:0
149
150prop:
151name:Avg. vertical position
152id:vertpos
153type:f
154flags:0
155
156prop:
157name:Avg. vertical velocity
158id:vertvel
159type:f
160flags:0
161
162prop:
163name:position.x
164id:pos_x
165type:f
166help:(pos_x,pos_y,pos_z) is the point of minimal coordinates ("bottom left corner") of the creature, including imaginary Part sizes (Part.s, usually 1.0). See also: Creature.moveAbs
167flags:3
168
169prop:
170name:position.y
171id:pos_y
172type:f
173help:See Creature.pos_x
174flags:3
175
176prop:
177name:position.z
178id:pos_z
179type:f
180help:See Creature.pos_x
181flags:3
182
183prop:
184name:bounding box x size
185id:size_x
186type:f
187help:~
188(size_x,size_y,size_z) are dimensions of the axis-aligned bounding box of the creature, including the imaginary part sizes (Part.s, usually 1.0). A creature consisting of a single default Part has the size of (2.0,2.0,2.0) - twice the Part.s value (like a sphere diameter is twice its radius).
189See also: Creature.moveAbs~
190flags:3
191
192prop:
193name:bounding box y size
194id:size_y
195type:f
196help:See Creature.size_x
197flags:3
198
199prop:
200name:bounding box z size
201id:size_z
202type:f
203help:See Creature.size_x
204flags:3
205
206prop:
207name:center.x
208id:center_x
209type:f
210help:Center of gravity
211flags:3
212
213prop:
214name:center.y
215id:center_y
216type:f
217help:Center of gravity
218flags:3
219
220prop:
221name:center.z
222id:center_z
223type:f
224help:Center of gravity
225flags:3
226
227prop:
228name:number of parts
229id:numparts
230type:d
231flags:3
232
233prop:
234name:number of joints
235id:numjoints
236type:d
237flags:3
238
239prop:
240name:number of neurons
241id:numneurons
242type:d
243flags:3
244
245prop:
246name:User field 1
247id:user1
248type:x
249flags:0
250
251prop:
252name:User field 2
253id:user2
254type:x
255flags:0
256
257prop:
258name:User field 3
259id:user3
260type:x
261flags:0
262
263prop:
264name:move
265id:move
266type:p
267help:Shift the creature by a given vector.
268flags:32
269
270prop:
271name:move to absolute location
272id:moveAbs
273type:p
274help:~
275Moves the creature so that its origin (pos_x,pos_y,pos_z) is placed at the given location. The origin is the point of minimal coordinates ("bottom left corner"), including imaginary part sizes (Part.s, usually 1.0).
276Assuming a simple single-stick creature "X" having parts at (0,0,0) and (1,0,0),
277
278origin (pos_x,pos_y,pos_z) = (-1,-1,-1)
279size (size_x,size_y,size_z) = (3,2,2)
280
281The following example places the bottom of a creature at a given location (x,y,z):
282Creature.moveAbs(x-(Creature.size_x/2),y-(Creature.size_y/2),z-1.0)
283(assuming that the part size is 1.0)~
284flags:32
285
286prop:
287name:move in local coordinates
288id:moveLocal
289type:p
290help:Local coordinates are measured with respect to the position and orientation of the first Part
291flags:32
292
293prop:
294name:return world coordinates
295id:localToWorld
296type:p
297help:Local coordinates are measured with respect to the position and orientation of the first Part
298flags:32
299
300prop:
301name:return local coordinates
302id:worldToLocal
303type:p
304help:Local coordinates are measured with respect to the position and orientation of the first Part
305flags:32
306
307prop:
308name:rotate
309id:rotate
310type:p
311help:Rotate the creature around X, Y and Z axes. Should only be used immediately after creating a new creature (before the first simulation step is performed for this creature), otherwise further simulation can be disturbed.
312flags:32
313
314prop:
315name:rotate in local coordinates
316id:rotateLocal
317type:p
318help:Rotate the creature around (local) X, Y and Z axes. Should only be used immediately after creating a new creature (before the first simulation step is performed for this creature), otherwise further simulation can be disturbed.
319flags:32
320
321prop:
322name:getPart (static Model information)
323id:getPart
324type:p
325flags:32
326
327prop:
328name:getJoint (static Model information)
329id:getJoint
330type:p
331flags:32
332
333prop:
334name:getNeuroDef
335id:getNeuroDef
336type:p
337flags:32
338
339prop:
340name:getMechPart (current properties)
341id:getMechPart
342type:p
343flags:32
344
345prop:
346name:getMechJoint (current properties)
347id:getMechJoint
348type:p
349flags:32
350
351prop:
352name:getNeuro
353id:getNeuro
354type:p
355flags:32
356
357prop:
358name:Collision mask (self)
359id:selfmask
360type:db
361flags:32
362
363prop:
364name:Collision mask (other)
365id:othermask
366type:db
367flags:32
368
369prop:
370name:currentGeometryAsF0
371id:currentGeometryAsF0
372type:p
373flags:32
374
375prop:
376name:#
377id:uid
378type:s
379flags:33
380
381prop:
382name:Index
383id:index
384type:d
385help:Index of this Creature in its Population.
386flags:1
387
388prop:
389name:Model Parts
390id:parts
391type:l Part
392flags:0
393
394prop:
395name:Model Joints
396id:joints
397type:l Joint
398flags:0
399
400prop:
401name:Neuron Definitions
402id:neurodefs
403type:l NeuroDef
404flags:0
405
406prop:
407name:Simulated Parts
408id:mechparts
409type:l MechPart
410flags:0
411
412prop:
413name:Simulated Joints
414id:mechjoints
415type:l MechJoint
416flags:0
417
418prop:
419name:Live Neurons
420id:neurons
421type:l Neuro
422flags:0
423
Note: See TracBrowser for help on using the repository browser.