annotate src/alice/test/topology/fishmodel/alpha/AutoIncrement.java @ 114:7dbaaa0de144 working

remove vector3f and add Matrix4d
author sugi
date Wed, 18 Jul 2012 20:40:50 +0900
parents 912aed91d05b
children 9845b74063ec
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
ba64a9d76e70 Add AutoIncrement
sugi
parents:
diff changeset
1 package alice.test.topology.fishmodel.alpha;
ba64a9d76e70 Add AutoIncrement
sugi
parents:
diff changeset
2
ba64a9d76e70 Add AutoIncrement
sugi
parents:
diff changeset
3 import alice.codesegment.CodeSegment;
ba64a9d76e70 Add AutoIncrement
sugi
parents:
diff changeset
4 import alice.datasegment.CommandType;
ba64a9d76e70 Add AutoIncrement
sugi
parents:
diff changeset
5 import alice.datasegment.Receiver;
ba64a9d76e70 Add AutoIncrement
sugi
parents:
diff changeset
6
ba64a9d76e70 Add AutoIncrement
sugi
parents:
diff changeset
7 public class AutoIncrement extends CodeSegment {
ba64a9d76e70 Add AutoIncrement
sugi
parents:
diff changeset
8
ba64a9d76e70 Add AutoIncrement
sugi
parents:
diff changeset
9 public Receiver position = ids.create(CommandType.PEEK);
ba64a9d76e70 Add AutoIncrement
sugi
parents:
diff changeset
10 String key;
ba64a9d76e70 Add AutoIncrement
sugi
parents:
diff changeset
11
ba64a9d76e70 Add AutoIncrement
sugi
parents:
diff changeset
12 public AutoIncrement(String key,int index){
ba64a9d76e70 Add AutoIncrement
sugi
parents:
diff changeset
13
ba64a9d76e70 Add AutoIncrement
sugi
parents:
diff changeset
14 this.key = key;
ba64a9d76e70 Add AutoIncrement
sugi
parents:
diff changeset
15 this.position.setKey("local", key);
ba64a9d76e70 Add AutoIncrement
sugi
parents:
diff changeset
16
ba64a9d76e70 Add AutoIncrement
sugi
parents:
diff changeset
17 }
ba64a9d76e70 Add AutoIncrement
sugi
parents:
diff changeset
18
ba64a9d76e70 Add AutoIncrement
sugi
parents:
diff changeset
19 @Override
114
7dbaaa0de144 remove vector3f and add Matrix4d
sugi
parents: 112
diff changeset
20 public void run() {
111
ba64a9d76e70 Add AutoIncrement
sugi
parents:
diff changeset
21 FishPoint FP = this.position.asClass(FishPoint.class);
ba64a9d76e70 Add AutoIncrement
sugi
parents:
diff changeset
22 FP.setXY(FP.getX()+0.01f, FP.getY());
ba64a9d76e70 Add AutoIncrement
sugi
parents:
diff changeset
23 ods.update("local", key, FP);
114
7dbaaa0de144 remove vector3f and add Matrix4d
sugi
parents: 112
diff changeset
24
111
ba64a9d76e70 Add AutoIncrement
sugi
parents:
diff changeset
25 new AutoIncrement(this.key,this.position.index);
ba64a9d76e70 Add AutoIncrement
sugi
parents:
diff changeset
26
ba64a9d76e70 Add AutoIncrement
sugi
parents:
diff changeset
27 }
ba64a9d76e70 Add AutoIncrement
sugi
parents:
diff changeset
28
ba64a9d76e70 Add AutoIncrement
sugi
parents:
diff changeset
29 }