Business web hosting - From PlatformTest.java //This method creates the SimpleUniverse View
From PlatformTest.java //This method creates the SimpleUniverse View and ViewPlatform //scenegraph elements to create an avatar that has an associated //Canvas3D for rendering, a PlatformGeometry, ViewerAvatar, and a //KeyNavigator to allow movement of the ViewerAvatar with the //keyboard. ViewingPlatform createViewer( Canvas3D c, String szName, Color3f objColor, double x, double z ) { //create a Viewer and attach to its canvas. A Canvas3D can //only be attached to a single Viewer. Viewer viewer2 = new Viewer( c ); //create a ViewingPlatform with 1 TransformGroup above the //ViewPlatform ViewingPlatform vp2 = new ViewingPlatform( 1 ); //create and assign the PlatformGeometry to the Viewer vp2.setPlatformGeometry( createPlatformGeometry( szName ) ); //create and assign the ViewerAvatar to the Viewer viewer2.setAvatar( createViewerAvatar( szName, objColor ) ); //set the initial position for the Viewer Transform3D t3d = new Transform3D(); t3d.setTranslation( new Vector3d( x, 0, z ) ); vp2.getViewPlatformTransform().setTransform( t3d ); //set capabilities on the TransformGroup so that the //KeyNavigatorBehavior can modify the Viewer’s position vp2.getViewPlatformTransform().setCapability( TransformGroup.ALLOW_TRANSFORM_WRITE ); vp2.getViewPlatformTransform().setCapability( TransformGroup.ALLOW_TRANSFORM_READ ); //attach a navigation behavior to the position of the viewer KeyNavigatorBehavior key = new KeyNavigatorBehavior( vp2.getViewPlatformTransform() ); key.setSchedulingBounds( m_Bounds ); key.setEnable( false ); //add the KeyNavigatorBehavior to the ViewingPlatform vp2.addChild( key ); //set the ViewingPlatform for the Viewer viewer2.setViewingPlatform( vp2 ); return vp2; } //creates and positions a simple Cone to represent the Viewer. //The Cone is aligned and scaled such that it is similar to a 3D //”turtle”. ViewerAvatar createViewerAvatar( String szText, Color3f objColor ) { ViewerAvatar viewerAvatar = new ViewerAvatar(); //rotate the Cone so that it is lying down and the sharp end //is pointed toward the Viewer’s field of view. TransformGroup tg = new TransformGroup(); 90
You need excellent and relaible webhost company to host your web applications? Then pay a visit to Inexpensive Web Hosting services.