source: java/main/src/main/java/com/framsticks/model/Neuro.java @ 86

Last change on this file since 86 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: 838 bytes
Line 
1package com.framsticks.model;
2
3import com.framsticks.params.annotations.FramsClassAnnotation;
4import com.framsticks.params.annotations.ParamAnnotation;
5import com.framsticks.util.math.Point3d;
6
7/**
8 * @author Piotr Sniegowski
9 */
10@FramsClassAnnotation
11public class Neuro extends BaseNeuro {
12
13        @ParamAnnotation
14        public int channelCount;
15
16        @ParamAnnotation
17        public double inputSum;
18
19        @ParamAnnotation
20        public double weightedInputSum;
21
22        @ParamAnnotation
23        public double state;
24
25        @ParamAnnotation(id = "currState")
26        public double currentState;
27
28        @ParamAnnotation
29        public boolean hold;
30
31        @ParamAnnotation
32        public double position_x, position_y, position_z;
33
34        public Point3d getPosition() { return new Point3d(position_x, position_y, position_z); }
35        public void setPosition(Point3d p) { position_x = p.x; position_y = p.y; position_z = p.z; }
36
37}
Note: See TracBrowser for help on using the repository browser.