1 2 | public void setViewAttachPolicy(int policy) public int getViewAttachPolicy() |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | setLayout(new BorderLayout()); Canvas3D c = new Canvas3D(null); add("Center", c); Viewer viewer = new Viewer(c); Vector3d viewpoint = new Vector3d(0.0,0.0,2.41); //初始观察点位置 Transform3D t = new Transform3D(); t.set(viewpoint); ViewingPlatform v = new ViewingPlatform( ); v.getViewPlatformTransform().setTransform(t); u = new SimpleUniverse(v,viewer); u.getViewingPlatform(); ViewingPlatform viewingPlatform = u.getViewingPlatform(); OrbitBehavior orbit = new OrbitBehavior(c, OrbitBehavior.REVERSE_ALL); BoundingSphere bounds = new BoundiBoundingSpherengSphere(new Point3d(0.0, 0.0, 0.0), 100.0); orbit.setSchedulingBounds(bounds); viewingPlatform.setViewPlatformBehavior(orbit); …. |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |