以前是这样的
鼠标拖动得用com.sun.j3d.utils.behaviors.mouse.MouseRotate;
还有.............mouse.MouseZoom; ........mouse.MouseTranslate;
具体的
MouseRotate behavior=new MouseRotate();
behavior.setTransformGroup(transformGroup);
transformGroup.addChild(behavior);
behavior.setSchedulingBounds(bounds);
还有设置灯光来得方向,,,环境灯光等等AmbentLignt ambLight=new AmbientLIght(...);
ambLight.setInfluencingBounds(...);
....addChild(); 还有DirectionalLight建立调用setInflunencingBounds上述可能有敲错的,有不熟的类,去查3d api吧
总之,用java做3d不爽,建议换
鼠标拖动得用com.sun.j3d.utils.behaviors.mouse.MouseRotate;
还有.............mouse.MouseZoom; ........mouse.MouseTranslate;
具体的
MouseRotate behavior=new MouseRotate();
behavior.setTransformGroup(transformGroup);
transformGroup.addChild(behavior);
behavior.setSchedulingBounds(bounds);
还有设置灯光来得方向,,,环境灯光等等AmbentLignt ambLight=new AmbientLIght(...);
ambLight.setInfluencingBounds(...);
....addChild(); 还有DirectionalLight建立调用setInflunencingBounds上述可能有敲错的,有不熟的类,去查3d api吧
总之,用java做3d不爽,建议换
JMVC
功能简介
Java3D Molecular Visualisation System 的缩写,使用JAVA技术编写的三维分子查看器,需要安装Java3D,2.1M,后才能执行,此版本使用浏览器执行,也可到原始网站下载Java源程序.