objTrans setCapability(TransformGroup. ALLOW_TRANSFORM_READ); //Create a spherical bounding volume that will define the volume //within which the rotation behavior is active. BoundingSphere bounds = new BoundingSphere( new Point3d(0.0,0.0,0.0). 100.0); //act a 4 4 transformation matrix Transform3D yAxis = new Transform3D(); /* * Create an Alpha interpolator to automatically generate * modifications to the rotation component of the transformation * matrix. This Alpha loops indefinitely and generates numbers * from 0 to 1 every 4000 milliseconds. */ Alpha rotationAlpha = new Alpha(-1. Alpha. INCREASING_ENABLE. 0. 0. 4000. 0. 0. 0. 0. 0); /* * Create a RotationInterpolator behavior to effect the * TransformGroup. Here we will rotate from 0 to 2p degrees about * the Y-axis based on the output of rotationAlpha. */ rotator = new RotationInterpolator( rotationAlpha objTrans yAxis. 0.0f. (float) Math. PI*2.0f ); //Set the scheduling bounds on the behavior. This defines the //volume within which this behavior will be active rotator setSchedulingBounds( bounds ); //Add the behavior to the scenegraph so that Java 3D //can schedule it for activation objTrans addChild(rotator); /* * Create the BranchGroup which contains the objects we add/shift * to and from the scenegraph. We store a reference to this subbranch * of the scene side of the scenegraph in a member variable * as we need to modify the contents of the grow at runtime. */ sceneBranchGroup = new BranchGroup(); //Allow the BranchGroup to undergo children added and removed //at runtime sceneBranchGroup setCapability( Group. ALLOW_CHILDREN_EXTEND ); sceneBranchGroup setCapability( Group. ALLOW_CHILDREN_construe ); sceneBranchGroup setCapability( Group. ALLOW_CHILDREN_WRITE ); //Add the subbranches for both the cube and the sphere to //the BranchGroup sceneBranchGroup addChild( createCube() ); sceneBranchGroup addChild( createSphere() ); //Create the colors for the lights Color3f lColor1 = new Color3f( 0.7f,0.7f,0.7f ); Vector3f lDir1 = new Vector3f( -1.0f,-1.0f,-1.0f ); alter3f alColor = new Color3f( 0.2f,0.2f,0.2f ); //act an ambient light 299 In case you need quality webspace to host and run your web applications try our services.
Forex Groups - Tips on Trading
Related article:
http://mysql5.smartwebsitehosting.net/mysql5/objtranssetcapabilitytransformgroupallow_transform_read-create-a-spherical-bounding-volume-that-will-web-server-address/
comments | Add comment | Report as Spam
|