计算机图形学-java3D图形设计Word格式.doc

上传人:wj 文档编号:3657640 上传时间:2023-05-02 格式:DOC 页数:8 大小:61KB
下载 相关 举报
计算机图形学-java3D图形设计Word格式.doc_第1页
第1页 / 共8页
计算机图形学-java3D图形设计Word格式.doc_第2页
第2页 / 共8页
计算机图形学-java3D图形设计Word格式.doc_第3页
第3页 / 共8页
计算机图形学-java3D图形设计Word格式.doc_第4页
第4页 / 共8页
计算机图形学-java3D图形设计Word格式.doc_第5页
第5页 / 共8页
计算机图形学-java3D图形设计Word格式.doc_第6页
第6页 / 共8页
计算机图形学-java3D图形设计Word格式.doc_第7页
第7页 / 共8页
计算机图形学-java3D图形设计Word格式.doc_第8页
第8页 / 共8页
亲,该文档总共8页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

计算机图形学-java3D图形设计Word格式.doc

《计算机图形学-java3D图形设计Word格式.doc》由会员分享,可在线阅读,更多相关《计算机图形学-java3D图形设计Word格式.doc(8页珍藏版)》请在冰点文库上搜索。

计算机图形学-java3D图形设计Word格式.doc

directionalLight1.setInfluencingBounds(bounds);

BranchGroupRoot.addChild(directionalLight1);

TransformGrouptrans=newTransformGroup();

trans.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);

trans.setCapability(TransformGroup.ALLOW_TRANSFORM_READ);

BranchGroupRoot.addChild(trans);

MouseRotatebh=newMouseRotate();

bh.setTransformGroup(trans);

BranchGroupRoot.addChild(bh);

bh.setSchedulingBounds(bounds);

MouseWheelZoombh1=newMouseWheelZoom();

bh1.setTransformGroup(trans);

BranchGroupRoot.addChild(bh1);

bh1.setSchedulingBounds(bounds);

MouseTranslatebh2=newMouseTranslate();

bh2.setTransformGroup(trans);

BranchGroupRoot.addChild(bh2);

bh2.setSchedulingBounds(bounds);

TransformGrouptg1=newTransformGroup();

tg1.addChild(newColorCube(0.3f));

Transform3Dt=newTransform3D();

t.setTranslation(newVector3f(0.0f,0.0f,0.0f));

TransformGrouptg2=newTransformGroup(t);

tg2.addChild(newColorCube(0.3f));

t=newTransform3D();

t.setTranslation(newVector3f(0.0f,0.0f,0.3f));

TransformGrouptg3=newTransformGroup(t);

tg3.addChild(newColorCube(0.3f));

t.setTranslation(newVector3f(0.0f,0.0f,-0.45f));

TransformGrouptrans1=newTransformGroup();

TransformGrouptrans2=newTransformGroup();

TransformGrouptrans3=newTransformGroup();

trans1.addChild(tg1);

trans2.addChild(tg2);

trans3.addChild(tg3);

SharedGroupsharedgroup1=newSharedGroup();

sharedgroup1.addChild(trans1);

Transform3Dt1=newTransform3D();

t1.setScale(0.5f);

t1.setTranslation(newVector3f(0.0f,-0.31f,0.0f));

TransformGroupsg1=newTransformGroup(t1);

sg1.addChild(newLink(sharedgroup1));

trans.addChild(sg1);

Transform3Dt2=newTransform3D();

t2.setScale(0.5f);

t2.setTranslation(newVector3f(0.0f,0.0f,0.0f));

TransformGroupsg2=newTransformGroup(t2);

sg2.addChild(newLink(sharedgroup1));

trans.addChild(sg2);

Transform3Dt3=newTransform3D();

t3.setScale(0.5f);

t3.setTranslation(newVector3f(0.0f,0.31f,0.0f));

TransformGroupsg3=newTransformGroup(t3);

sg3.addChild(newLink(sharedgroup1));

trans.addChild(sg3);

Transform3Dt4=newTransform3D();

t4.setScale(0.5f);

t4.setTranslation(newVector3f(0.31f,0.0f,0.0f));

TransformGroupsg4=newTransformGroup(t4);

sg4.addChild(newLink(sharedgroup1));

trans.addChild(sg4);

Transform3Dt5=newTransform3D();

t5.setScale(0.5f);

t5.setTranslation(newVector3f(-0.31f,0.0f,0.0f));

TransformGroupsg5=newTransformGroup(t5);

sg5.addChild(newLink(sharedgroup1));

trans.addChild(sg5);

Transform3Dt6=newTransform3D();

t6.setScale(0.5f);

t6.setTranslation(newVector3f(0.31f,0.31f,0.0f));

TransformGroupsg6=newTransformGroup(t6);

sg6.addChild(newLink(sharedgroup1));

trans.addChild(sg6);

Transform3Dt7=newTransform3D();

t7.setScale(0.5f);

t7.setTranslation(newVector3f(-0.31f,0.31f,0.0f));

TransformGroupsg7=newTransformGroup(t7);

sg7.addChild(newLink(sharedgroup1));

trans.addChild(sg7);

Transform3Dt8=newTransform3D();

t8.setScale(0.5f);

t8.setTranslation(newVector3f(0.31f,-0.31f,0.0f));

TransformGroupsg8=newTransformGroup(t8);

sg8.addChild(newLink(sharedgroup1));

trans.addChild(sg8);

Transform3Dt9=newTransform3D();

t9.setScale(0.5f);

t9.setTranslation(newVector3f(-0.31f,-0.31f,0.0f));

TransformGroupsg9=newTransformGroup(t9);

sg9.addChild(newLink(sharedgroup1));

trans.addChild(sg9);

SharedGroupsharedgroup2=newSharedGroup();

sharedgroup2.addChild(trans2);

Transform3Dt10=newTransform3D();

t10.setScale(0.5f);

t10.setTranslation(newVector3f(0.0f,-0.31f,0.31f));

TransformGroupsg10=newTransformGroup(t10);

sg10.addChild(newLink(sharedgroup2));

trans.addChild(sg10);

Transform3Dt11=newTransform3D();

t11.setScale(0.5f);

t11.setTranslation(newVector3f(0.0f,0.0f,0.31f));

TransformGroupsg11=newTransformGroup(t11);

sg11.addChild(newLink(sharedgroup2));

trans.addChild(sg11);

Transform3Dt12=newTransform3D();

t12.setScale(0.5f);

t12.setTranslation(newVector3f(0.0f,0.31f,0.31f));

TransformGroupsg12=newTransformGroup(t12);

sg12.addChild(newLink(sharedgroup2));

trans.addChild(sg12);

Transform3Dt13=newTransform3D();

t13.setScale(0.5f);

t13.setTranslation(newVector3f(-0.31f,0.0f,0.31f));

TransformGroupsg13=newTransformGroup(t13);

sg13.addChild(newLink(sharedgroup2));

trans.addChild(sg13);

Transform3Dt14=newTransform3D();

t14.setScale(0.5f);

t14.setTranslation(newVector3f(0.31f,0.0f,0.31f));

TransformGroupsg14=newTransformGroup(t14);

sg14.addChild(newLink(sharedgroup2));

trans.addChild(sg14);

Transform3Dt15=newTransform3D();

t15.setScale(0.5f);

t15.setTranslation(newVector3f(0.31f,0.31f,0.31f));

TransformGroupsg15=newTransformGroup(t15);

sg15.addChild(newLink(sharedgroup2));

trans.addChild(sg15);

Transform3Dt16=newTransform3D();

t16.setScale(0.5f);

t16.setTranslation(newVector3f(-0.31f,-0.31f,0.31f));

TransformGroupsg16=newTransformGroup(t16);

sg16.addChild(newLink(sharedgroup2));

trans.addChild(sg16);

Transform3Dt17=newTransform3D();

t17.setScale(0.5f);

t17.setTranslation(newVector3f(0.31f,-0.31f,0.31f));

TransformGroupsg17=newTransformGroup(t17);

sg17.addChild(newLink(sharedgroup2));

trans.addChild(sg17);

Transform3Dt18=newTransform3D();

t18.setScale(0.5f);

t18.setTranslation(newVector3f(-0.31f,0.31f,0.31f));

TransformGroupsg18=newTransformGroup(t18);

sg18.addChild(newLink(sharedgroup2));

trans.addChild(sg18);

SharedGroupsharedgroup3=newSharedGroup();

sharedgroup3.addChild(trans3);

Transform3Dt19=newTransform3D();

t19.setScale(0.5f);

t19.setTranslation(newVector3f(0.0f,-0.31f,-0.46f));

TransformGroupsg19=newTransformGroup(t19);

sg19.addChild(newLink(sharedgroup3));

trans.addChild(sg19);

Transform3Dt20=newTransform3D();

t20.setScale(0.5f);

t20.setTranslation(newVector3f(0.0f,0.0f,-0.46f));

TransformGroupsg20=newTransformGroup(t20);

sg20.addChild(newLink(sharedgroup3));

trans.addChild(sg20);

Transform3Dt21=newTransform3D();

t21.setScale(0.5f);

t21.setTranslation(newVector3f(0.0f,0.31f,-0.46f));

TransformGroupsg21=newTransformGroup(t21);

sg21.addChild(newLink(sharedgroup3));

trans.addChild(sg21);

Transform3Dt22=newTransform3D();

t22.setScale(0.5f);

t22.setTranslation(newVector3f(-0.31f,0.0f,-0.46f));

TransformGroupsg22=newTransformGroup(t22);

sg22.addChild(newLink(sharedgroup3));

trans.addChild(sg22);

Transform3Dt23=newTransform3D();

t23.setScale(0.5f);

t23.setTranslation(newVector3f(0.31f,0.0f,-0.46f));

TransformGroupsg23=newTransformGroup(t23);

sg23.addChild(newLink(sharedgroup3));

trans.addChild(sg23);

Transform3Dt24=newTransform3D();

t24.setScale(0.5f);

t24.setTranslation(newVector3f(0.31f,0.31f,-0.46f));

TransformGroupsg24=newTransformGroup(t24);

sg24.addChild(newLink(sharedgroup3));

trans.addChild(sg24);

Transform3Dt25=newTransform3D();

t25.setScale(0.5f);

t25.setTranslation(newVector3f(-0.31f,-0.31f,-0.46f));

TransformGroupsg25=newTransformGroup(t25);

sg25.addChild(newLink(sharedgroup3));

trans.addChild(sg25);

Transform3Dt26=newTransform3D();

t26.setScale(0.5f);

t26.setTranslation(newVector3f(0.31f,-0.31f,-0.46f));

TransformGroupsg26=newTransformGroup(t26);

sg26.addChild(newLink(sharedgroup3));

trans.addChild(sg26);

Transform3Dt27=newTransform3D();

t27.setScale(0.5f);

t27.setTranslation(newVector3f(-0.31f,0.31f,-0.46f));

TransformGroupsg27=newTransformGroup(t27);

sg27.addChild(newLink(sharedgroup3));

trans.addChild(sg27);

BranchGroupRpile();

returnBranchGroupRoot;

}

publicMagicCube()

setLayout(newBorderLayout());

Canvas3Dc=newCanvas3D(SimpleUniverse.getPreferredConfiguration());

add("

Center"

c);

BranchGroupBranchGroupScene=createBranchGroupSceneGraph();

SimpleUniverseu=newSimpleUniverse(c);

u.getViewingPlatform().setNominalViewingTransform();

//

u.addBranchGraph(BranchGroupScene);

publicstaticvoidmain(String[]args)

newMainFrame(newMagicCube(),400,400);

}

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 农林牧渔 > 林学

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2