Mercurial > hg > Database > Alice
comparison src/alice/test/topology/movement/MakeObject.java @ 91:19f3bd33277d working
add KeyInput
author | sugi |
---|---|
date | Tue, 05 Jun 2012 00:35:58 +0900 |
parents | e269cedd8bae |
children | 6601f8854126 |
comparison
equal
deleted
inserted
replaced
90:75aa139d46eb | 91:19f3bd33277d |
---|---|
28 this.canvas = MF.getCanvas(); | 28 this.canvas = MF.getCanvas(); |
29 this.key = MF.getKey(); | 29 this.key = MF.getKey(); |
30 } | 30 } |
31 | 31 |
32 | 32 |
33 public BranchGroup createKeyBranch(){ | |
34 BranchGroup scene = new BranchGroup(); | |
35 Box box = new Box(0.1f,0.1f,0.0f, | |
36 Box.GENERATE_NORMALS|Box.GENERATE_TEXTURE_COORDS,createAppearance()); | |
37 key.transformGroup.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE); | |
38 key.transformGroup.addChild(box); | |
39 scene.addChild(key.transformGroup); | |
40 return scene; | |
41 | |
42 } | |
43 | |
33 public BranchGroup createBranch(){ | 44 public BranchGroup createBranch(){ |
34 BranchGroup scene = new BranchGroup(); | 45 BranchGroup scene = new BranchGroup(); |
35 Box box = new Box(0.1f,0.1f,0.0f, | 46 Box box = new Box(0.1f,0.1f,0.0f, |
36 Box.GENERATE_NORMALS|Box.GENERATE_TEXTURE_COORDS,createAppearance()); | 47 Box.GENERATE_NORMALS|Box.GENERATE_TEXTURE_COORDS,createAppearance()); |
37 | |
38 transform_group = new TransformGroup(); | 48 transform_group = new TransformGroup(); |
39 transform_group.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE); | 49 transform_group.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE); |
40 transform_group.addChild(box); | 50 transform_group.addChild(box); |
41 scene.addChild(transform_group); | 51 scene.addChild(transform_group); |
42 setLocation(-10,0);//default position | 52 setLocation(-10,0);//default position |
43 | |
44 | |
45 /* | |
46 key.transformGroup.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE); | |
47 key.transformGroup.addChild(box); | |
48 scene.addChild(key.transformGroup); | |
49 */ | |
50 return scene; | 53 return scene; |
51 | 54 |
52 } | 55 } |
53 | 56 |
54 private Appearance createAppearance(){ | 57 private Appearance createAppearance(){ |