⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 get_view.java

📁 一个java3D的动画程序
💻 JAVA
字号:
/*
 * Created on 2005-7-17
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package View_Autoget;

import javax.media.j3d.BranchGroup;
import javax.media.j3d.PhysicalBody;
import javax.media.j3d.PhysicalEnvironment;
import javax.media.j3d.TransformGroup;
import javax.media.j3d.View;
import javax.media.j3d.ViewPlatform;
import javax.media.j3d.Canvas3D;
import javax.vecmath.*;

/**
 * @author carso
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class get_view {
	
	public BranchGroup get_New_View(Canvas3D canvas,TransformGroup tg){
	BranchGroup objRoot = new BranchGroup();
	View view = new View();
	ViewPlatform viewPlatform = new ViewPlatform();
	//view.setViewPolicy();
	PhysicalBody physicalBody = new PhysicalBody();
	PhysicalEnvironment physicalEnvironment = new PhysicalEnvironment();
	view.addCanvas3D(canvas);
	view.setPhysicalBody(physicalBody);
	view.setPhysicalEnvironment(physicalEnvironment);
	view.attachViewPlatform(viewPlatform);
	
	//The TransformGroup must be inserted into the BranchGraph
	objRoot.addChild(tg);
	
	// Here, the interpolators are defined, that modify tg. tgRot becomes
	// the TransformGroup to which the ViewPlatform is attached.
	
	//TransformGroup tgRot = createDynamicTransform(tg, objRoot);
	tg.addChild(viewPlatform);
	objRoot.compile();
	return objRoot;

}
	public get_view(){
		System.out.println("get_view Class create a new view");
	} 
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -