java3D技術依靠Java自身所帶的API函數,來構建3D模型,不同於C++中的OpenGL函數,他顯得跟簡單
依靠觀察者視覺的不同改變觀察角度.
主要是固定某些屬性,通過mul函數合併屬性.
/*
universe.getViewingPlatform().getViewPlatformTransform().getTransform(upos);
upos.rotY(Math.toRadians(xPosition));
upos1.rotX(Math.toRadians(yPosition));
upos.setScale(1.2);
upos2.setTranslation(new Vector3d(.0,.0,2.41));
//合併upos1
upos.mul(upos1);
//合併upos2
upos.mul(upos2);
universe.getViewingPlatform().getViewPlatformTransform().setTransform(upos);
*/
這段代碼通過改變X軸與Y軸來改變觀察視角.
不過作爲物體本身他是按照Vector3d(0,0,2.41)固定不變的.