hi all: i am a beginner and create 3 planes..but that 3 planes not rotat about the point (0,0,0) . I want to ask all of U how to set that? and what is the use of normal in here ? Thanks all public BranchGroup createSceneGraph(SimpleUniverse su) { BranchGroup objRoot = new BranchGroup(); TransformGroup vpTrans = null; BoundingSphere mouseBounds = null; vpTrans = su.getViewingPlatform().getViewPlatformTransform(); QuadArray myQuads=new QuadArray(12,GeometryArray.COORDINATES|GeometryArray.NORMALS); Point3f[] myCoords={ new Point3f(0.0f,0.0f,0.0f), new Point3f(0.2f,0.0f,0.0f), new Point3f(0.2f,0.2f,0.0f), new Point3f(0.0f,0.2f,0.0f), new Point3f(0.0f,0.2f,0.0f), new Point3f(0.2f,0.2f,0.0f), new Point3f(0.0f,0.2f,0.2f), new Point3f(0.2f,0.2f,0.2f), new Point3f(0.0f,0.0f,0.2f), new Point3f(0.2f,0.2f,0.2f), new Point3f(0.0f,0.2f,0.2f), new Point3f(0.2f,0.2f,0.2f), }; myQuads.setCoordinates(0,myCoords); Vector3f [] myNormals={new Vector3f(0.0f,0.0f,0.0f)}; ColoringAttributes myCA=new ColoringAttributes(); myCA.setColor(0.0f,1.0f,1.0f); Appearance myAppear=new Appearance(); myAppear.setColoringAttributes(myCA); Shape3D myshape2=new Shape3D(myQuads,myAppear); objRoot.addChild(myshape2); mouseBounds = new BoundingSphere(new Point3d(0.0,0.0,0.0), 1000.0); MouseRotate myMouseRotate = new MouseRotate(); myMouseRotate.setTransformGroup(vpTrans); myMouseRotate.setSchedulingBounds(mouseBounds); objRoot.addChild(myMouseRotate); objRoot.compile(); return objRoot; } =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
[JAVA3D] why not rotate about the (0,0,0)
SUBSCRIBE JAVA3D-INTEREST peter Sat, 11 Dec 1999 02:57:44 -0800