diff src/alice/test/topology/aquarium/MakeFrame.java @ 170:6a69891b7232 working

change view point
author sugi
date Thu, 27 Dec 2012 14:38:42 +0900
parents 36dc63d1bdcf
children 23d6a775a643
line wrap: on
line diff
--- a/src/alice/test/topology/aquarium/MakeFrame.java	Tue Dec 18 14:49:36 2012 +0900
+++ b/src/alice/test/topology/aquarium/MakeFrame.java	Thu Dec 27 14:38:42 2012 +0900
@@ -28,7 +28,7 @@
 	private JFrame frame;
 	private ObjectList list = new ObjectList();
 	
-	public MakeFrame(String str){
+	public MakeFrame(String str,float x){
 		frame = new JFrame(str);
 		frame.setSize(fSizeX,fSizeY);
 		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
@@ -38,7 +38,7 @@
 		frame.add(cp);
 		
 		GraphicsConfiguration config = SimpleUniverse.getPreferredConfiguration();
-		canvas = new ViewChange(3.0f,0.01f,config);
+		canvas = new ViewChange(x,0.01f,config);
 		canvas.setBounds(0,0,fSizeX,fSizeY);
 		cp.add(canvas);
 		
@@ -63,7 +63,7 @@
 				new ImageComponent2D(ImageComponent2D.FORMAT_RGBA8,img);
 		Background background = new Background(image);
 		background.setImageScaleMode(Background.SCALE_FIT_ALL);
-		BoundingSphere bounds = new BoundingSphere(new Point3d(0.0, 0.0, 0.0), Double.POSITIVE_INFINITY);
+		BoundingSphere bounds = new BoundingSphere(new Point3d(), 10.0);
 		background.setApplicationBounds(bounds);
 		scene.addChild(background);
 		return scene;
@@ -73,9 +73,9 @@
 	private BranchGroup createLight(){
 		BranchGroup scene = new BranchGroup();
 		Color3f light_color  = new Color3f(1.7f,1.7f,1.7f);
-		Vector3f light_direction = new Vector3f(0.2f,-0.2f,-0.6f);
+		Vector3f light_direction = new Vector3f(0.0f,0.0f,-1.0f);
 		DirectionalLight light = new DirectionalLight(light_color,light_direction);
-		BoundingSphere bounds = new BoundingSphere();
+		BoundingSphere bounds = new BoundingSphere(new Point3d(), 10.0);
 		light.setInfluencingBounds(bounds);
 		scene.addChild(light);
 		return scene;
@@ -85,7 +85,6 @@
 		list.table.add(obj);
 		BranchGroup group = obj.createBranch();
 		this.canvas.universe.addBranchGraph(group);
-		
 	}
 	
 	public ViewChange getCanvas(){