亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? java3dworld1.java

?? java的一些教程 大家看看,很有用的
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
   
   // create RotationInterpolators for scene
   private void createRotationInterpolators( 
      TransformGroup[] transformGroup, int size )
   {
      // declare structures for creating RotationInterpolators
      Alpha[] alphaSpin = new Alpha[ size ];
      
      Transform3D[] spinAxis = 
         new Transform3D[ size ];
      
      RotationInterpolator[] spinner = 
         new RotationInterpolator[ size ];
      
      // create RotationInterpolator for each shape
      for ( int x = 0; x < size; x++ ) {
         
         // initialize Alpha
         alphaSpin[ x ] = new Alpha();
         
         // set increasing time for Alpha to random number
         alphaSpin[ x ].setIncreasingAlphaDuration( 
            MIN_ROTATION_SPEED + ( ( int ) ( Math.random() * 
               MAX_ROTATION_SPEED ) ) );
         
         // initialize RotationInterpolator using appropriate
         // Alpha and TransformGroup
         spinner[ x ] = new RotationInterpolator( 
            alphaSpin[ x ], transformGroup[ x ] );
         
         spinAxis[ x ] = new Transform3D();
         
         // set random X-axis rotation
         spinAxis[ x ].rotX( 
            ( float ) ( Math.PI * ( Math.random() * 2 ) ) );
         spinner[ x ].setAxisOfRotation( spinAxis[ x ] );
         
         // set minimum and maximum rotation angles
         spinner[ x ].setMinimumAngle( MIN_ROTATION_ANGLE );
         spinner[ x ].setMaximumAngle( MAX_ROTATION_ANGLE );
         
         spinner[ x ].setSchedulingBounds( bounds );
         
         // add RotationInterpolator to appropriate TransformGroup
         transformGroup[ x ].addChild( spinner[ x ] );
      }
      
   } // end method createRotationInterpolators
   
   // create PositionInterpolators
   private void createPositionInterpolators( 
      TransformGroup[] transformGroup, int size )
   {
      // create structures for PositionInterpolators
      Alpha[] alphaPath = new Alpha[ size ];
      
      PositionInterpolator[] mover = 
         new PositionInterpolator[ size ];
      
      Transform3D[] pathAxis = 
         new Transform3D[ size ];
                 
      // create PositionInterpolator for each shape
      for ( int x = 0; x < size; x++ ) {
         
         // initialize Alpha
         alphaPath[ x ] = new Alpha();
         
         // set mode to increase and decrease interpolation
         alphaPath[ x ].setMode( 
            Alpha.INCREASING_ENABLE | Alpha.DECREASING_ENABLE );
         
         // set random phase delay
         alphaPath[ x ].setPhaseDelayDuration( 
            ( ( int ) ( Math.random() * MAX_PHASE_DELAY ) ) );
         
         // randomize translation speed
         int speed = MIN_TRANSLATION_SPEED + 
            ( int ) ( Math.random() * MAX_TRANSLATION_SPEED );
         
         // set increasing and decreasing durations
         alphaPath[ x ].setIncreasingAlphaDuration( speed );
         alphaPath[ x ].setDecreasingAlphaDuration( speed );
         
         // randomize translation axis
         pathAxis[ x ] = new Transform3D();
         pathAxis[ x ].rotX( 
            ( float ) ( Math.PI * ( Math.random() * 2 ) ) );
         pathAxis[ x ].rotY( 
            ( float ) ( Math.PI * ( Math.random() * 2 ) ) );
         pathAxis[ x ].rotZ( 
            ( float ) ( Math.PI * ( Math.random() * 2 ) ) );
         
         // initialize PositionInterpolator
         mover[ x ] = new PositionInterpolator( alphaPath[ x ], 
            transformGroup[ x ], pathAxis[ x ], 1.0f, -1.0f );
         
         mover[ x ].setSchedulingBounds( bounds );
         
         // add PostionInterpolator to appropriate TransformGroup
         transformGroup[ x ].addChild( mover[ x ] );
      }
      
   } // end method createPositionInterpolators
   
   // create appearance and material arrays for Primitives
   private Appearance[] createAppearance( int size )
   {
      // create Appearance objects for each shape
      Appearance[] appearance = 
         new Appearance[ size ];
      
      Material[] material = new Material[ size ];
      
      // set material and appearance properties for each shape
      for( int i = 0; i < size; i++ ) {
         appearance[ i ] = new Appearance();
         material[ i ] = new Material();
         
         // set material ambient color 
         material[ i ].setAmbientColor( 
            new Color3f( 0.0f, 0.0f, 0.0f ) );
         
         // set material Diffuse color
         material[ i ].setDiffuseColor( new Color3f(
            ( float ) Math.random(), ( float ) Math.random()*0.5f, 
            ( float ) Math.random() ) );
         
         // set Material for appropriate Appearance object
         appearance[ i ].setMaterial( material[ i ] );
      }
      return appearance;
      
   } // end method createAppearance
      
   // create Primitives shapes
   private Primitive[] createShapes( Appearance[] appearance, 
      int size )
   {
      Primitive[] shapes = new Primitive[ size ];
      
      // random loop to get index
      for ( int x = 0; x < size; x++ ) {
         
        // generate random shape index
        int index = ( int ) ( Math.random() * NUMBER_OF_PRIMITIVES );
         
        // create shape based on random index
        switch( index ) {
           
           case 0: // create Box
              shapes[ x ] = new Box( 
                 ( ( float ) Math.random() * MAX_LENGTH ), 
                 ( ( float ) Math.random() * MAX_LENGTH ), 
                 ( ( float ) Math.random() * MAX_LENGTH ), 
                 Box.GENERATE_NORMALS, appearance[ x ] );
              break;
           
           case 1: // create Cone
              shapes[ x ] = new Cone( 
                 ( ( float ) Math.random() * MAX_RADIUS ), 
                 ( ( float ) Math.random() * MAX_LENGTH ), 
                 Cone.GENERATE_NORMALS, appearance[ x ] );
              break;
              
           case 2: // create Cylinder
              shapes[ x ] = new Cylinder( 
                 ( ( float ) Math.random() * MAX_RADIUS ), 
                 ( ( float ) Math.random() * MAX_LENGTH ), 
                 Cylinder.GENERATE_NORMALS, appearance[ x ] );
              break;
           
           case 3: // create Sphere
              shapes[ x ] =  new Sphere( 
                 ( ( float ) Math.random() * MAX_RADIUS ), 
                 Sphere.GENERATE_NORMALS, appearance[ x ] );
              break;
      
        } // end switch statement
         
        // set capability bits to enable collisions and to set 
        // read/write permissions of bounds 
        shapes[ x ].setCapability( 
           Node.ENABLE_COLLISION_REPORTING );
        shapes[ x ].setCapability( 
           Node.ALLOW_BOUNDS_READ );
        shapes[ x ].setCapability( 
           Node.ALLOW_BOUNDS_WRITE );
        shapes[ x ].setCollidable( true );
         
      }
      
      return shapes;
      
   } // end method createShapes
   
   // initialize ambient and directional lighting
   private void setLighting( BranchGroup scene, 
      BoundingSphere bounds )
   {
      // initialize ambient lighting
      AmbientLight ambientLight = new AmbientLight();
      ambientLight.setInfluencingBounds( bounds );
      
      // initialize directional lighting
      DirectionalLight directionalLight = new DirectionalLight();
      directionalLight.setColor( 
         new Color3f( 1.0f, 1.0f, 1.0f ) );
      directionalLight.setInfluencingBounds( bounds );
      
      // add lights to scene
      scene.addChild( ambientLight );
      scene.addChild( directionalLight );
   
   } // end method setLighting
   
   // update scene by rendering different shapes in shapeSwitch 
   public void switchScene( int numberChildren, int size )
   {
      // create a new BitSet of size NUMBER_OF_SHAPES
      BitSet bitSet = new BitSet( size );
      
      // set BitSet values
      for ( int i = 0; i < numberChildren; i++ ) 
         bitSet.set( i );
            
      // instruct switchShape to render Mask of objects
      shapeSwitch.setWhichChild( Switch.CHILD_MASK );
      shapeSwitch.setChildMask( bitSet );
   
   } // end method switchScene
   
   // create end scene when user wins or loses
   private TransformGroup createEndScene( String text ) 
   {
      TransformGroup transformGroup = new TransformGroup();
      transformGroup.setCapability( 
         TransformGroup.ALLOW_TRANSFORM_WRITE );
      
      // disable scene collision detection
      transformGroup.setCollidable( false );
      
      // create Alpha object
      Alpha alpha = new Alpha();
         alpha.setIncreasingAlphaDuration( MAX_ROTATION_SPEED );
      
      // create RotationInterpolator for scene
      RotationInterpolator rotation = 
      new RotationInterpolator( alpha, transformGroup );
      
      // set axis of rotation
      Transform3D axis = new Transform3D();
      axis.rotY( ( float ) ( Math.PI / 2.0 ) );
      rotation.setAxisOfRotation( axis );
      
      // set minimum and maximum rotation angles
      rotation.setMinimumAngle( 0.0f );
      rotation.setMaximumAngle( ( float ) ( Math.PI * 8.0 ) );
      
      rotation.setSchedulingBounds( bounds );
      transformGroup.addChild( rotation );
      
      // create scene geometry
      Appearance appearance = new Appearance(); 
      Material material = new Material(); 
      appearance.setMaterial( material ); 
      
      // set diffuse color of material 
      material.setDiffuseColor( 
         new Color3f( 0.0f, 0.8f, 1.0f ) );
      
      // create Font3D object
      Font3D font3d = new Font3D(
         new Font( "Helvetica", Font.ITALIC, 1 ), 
         new FontExtrusion() );
      
      // create Text3D object from Font3D object
      Text3D text3d = new Text3D( font3d, text, 
         new Point3f( -2.0f, 0.0f, 0.0f ) );
      
      // create Shape3D object from Text3D object
      Shape3D textShape = new Shape3D( text3d );
      
      textShape.setAppearance( appearance );
      
      // disable collision detection
      textShape.setCollidable( false );
      
      transformGroup.addChild( textShape );
      
      return transformGroup;
   
   } // end method createEndScene
   
   
   // return preferred dimensions of Container
   public Dimension getPreferredSize()
   {
      return new Dimension( CONTAINER_WIDTH, CONTAINER_HEIGHT );
   } 
    
    // return minimum size of Container
   public Dimension getMinimumSize()
   {
      return getPreferredSize();
   }
}


/***************************************************************
 * (C) Copyright 2002 by Deitel & Associates, Inc. and         *
 * Prentice Hall. All Rights Reserved.                         *
 *                                                             *
 * DISCLAIMER: The authors and publisher of this book have     *
 * used their best efforts in preparing the book. These        *
 * efforts include the development, research, and testing of   *
 * the theories and programs to determine their effectiveness. *
 * The authors and publisher make no warranty of any kind,     *
 * expressed or implied, with regard to these programs or to   *
 * the documentation contained in these books. The authors     *
 * and publisher shall not be liable in any event for          *
 * incidental or consequential damages in connection with, or  *
 * arising out of, the furnishing, performance, or use of      *
 * these programs.                                             *
 ***************************************************************/

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
丝袜诱惑制服诱惑色一区在线观看| 精品久久五月天| 亚洲伊人色欲综合网| 欧美主播一区二区三区| 亚洲午夜久久久久久久久久久| 欧美日韩和欧美的一区二区| 日韩av成人高清| 欧美精品一区二区在线播放| 国产福利一区二区| 亚洲精品视频一区| 宅男在线国产精品| 国产v日产∨综合v精品视频| 亚洲另类春色校园小说| 91精品国产综合久久精品图片 | 欧美片网站yy| 蜜臂av日日欢夜夜爽一区| 精品国产91乱码一区二区三区| 丰满白嫩尤物一区二区| 亚洲一区在线观看免费| 欧美mv和日韩mv的网站| 成人av网址在线| 日韩精品亚洲一区| 国产精品传媒视频| 欧美一级日韩一级| 成人免费视频免费观看| 午夜精品在线看| 欧美激情资源网| 欧美一区二区三区免费| 成人动漫视频在线| 日韩成人一区二区三区在线观看| 久久久久久久久久美女| 欧美性受极品xxxx喷水| 国产伦精品一区二区三区免费迷 | 欧美性一区二区| 国产一区视频网站| 亚洲成av人片一区二区三区| 国产视频一区不卡| 欧美日韩国产首页| 99视频在线观看一区三区| 日本不卡一区二区三区| 亚洲精品高清在线| 国产精品无人区| 欧美一级片在线| 欧洲中文字幕精品| 99久精品国产| 国产a级毛片一区| 美女mm1313爽爽久久久蜜臀| 亚洲综合色婷婷| 成人欧美一区二区三区白人| 日韩精品中文字幕一区二区三区 | 欧美一区二区三区小说| 97精品超碰一区二区三区| 极品美女销魂一区二区三区免费| 一区二区三区不卡视频| 亚洲色图19p| 欧美国产一区在线| 久久久一区二区三区捆绑**| 欧美一区二区三区人| 一本色道综合亚洲| av成人老司机| 成人精品一区二区三区中文字幕| 精品综合免费视频观看| 免费高清成人在线| 性做久久久久久久久| 亚洲一区二区三区四区在线 | 丝瓜av网站精品一区二区| 一区二区三区中文在线| 综合在线观看色| 亚洲视频在线观看三级| 成人欧美一区二区三区1314| 国产精品乱人伦一区二区| 久久女同互慰一区二区三区| 久久伊人蜜桃av一区二区| 精品乱人伦小说| 精品粉嫩aⅴ一区二区三区四区| 欧美一区二区国产| 日韩片之四级片| 日韩欧美国产综合| 精品动漫一区二区三区在线观看| 日韩免费观看2025年上映的电影| 欧美va在线播放| 欧美mv日韩mv国产网站| 久久嫩草精品久久久精品一| 久久精品夜夜夜夜久久| 国产欧美日本一区二区三区| 国产精品毛片高清在线完整版| 中文字幕成人网| 国产精品久久久久婷婷| 一区二区三区在线免费观看| 亚洲成人动漫一区| 蜜桃传媒麻豆第一区在线观看| 久久精品国产精品青草| 国产一区二区0| 丁香激情综合五月| 在线亚洲高清视频| 日韩一级大片在线观看| 久久精品网站免费观看| 亚洲视频你懂的| 午夜视频一区二区| 国产一区视频网站| 91麻豆视频网站| 日韩午夜激情视频| 国产精品每日更新在线播放网址| 亚洲另类在线一区| 蜜臀av性久久久久蜜臀aⅴ四虎| 国产自产v一区二区三区c| 99麻豆久久久国产精品免费优播| 91国偷自产一区二区三区成为亚洲经典 | 亚洲综合免费观看高清在线观看| 亚洲电影你懂得| 国产一区二区三区四区在线观看| 成人免费福利片| 欧美人与z0zoxxxx视频| 中文一区一区三区高中清不卡| 一区二区三区在线观看网站| 久久国产夜色精品鲁鲁99| 成人午夜免费电影| 欧美肥妇bbw| 国产精品久久久久三级| 日本vs亚洲vs韩国一区三区二区| 成人不卡免费av| 日韩三级高清在线| 亚洲精品日韩综合观看成人91| 六月丁香综合在线视频| 色综合欧美在线视频区| 精品国产成人系列| 亚洲成精国产精品女| 成人av影视在线观看| 日韩一区二区不卡| 亚洲精品乱码久久久久| 国产一区二区视频在线| 欧美精品在线一区二区三区| 国产精品久久久久aaaa樱花| 免费国产亚洲视频| 在线免费观看日韩欧美| 国产精品久久网站| 国产一区欧美一区| 欧美一级xxx| 亚洲自拍偷拍图区| jvid福利写真一区二区三区| 久久久夜色精品亚洲| 麻豆91在线看| 欧美色老头old∨ideo| 亚洲视频一区在线观看| 粉嫩在线一区二区三区视频| 精品入口麻豆88视频| 日韩黄色在线观看| 欧美视频在线一区| 一区二区三区四区在线| 色综合中文综合网| 国产精品资源在线观看| 日韩一区二区电影| 亚洲不卡在线观看| 欧美日韩一级视频| 亚洲综合视频在线| 欧美日韩中文字幕一区| 亚洲国产精品久久久男人的天堂 | 日韩视频123| 午夜精品成人在线视频| 欧美日韩国产综合一区二区| 亚洲小说欧美激情另类| 欧美婷婷六月丁香综合色| 亚洲综合另类小说| 色噜噜狠狠成人中文综合 | 久久老女人爱爱| 国产综合色在线| 久久久精品免费观看| 国产成a人亚洲| 国产精品麻豆久久久| 一本到一区二区三区| 亚洲综合男人的天堂| 欧美天堂一区二区三区| 亚洲综合色婷婷| 91精品国产全国免费观看| 蜜臀av一区二区在线观看| 亚洲精品一区二区三区99| 国产不卡视频在线播放| 最新国产の精品合集bt伙计| 91久久精品国产91性色tv| 亚洲成av人**亚洲成av**| 日韩一区二区三区免费观看| 美女精品自拍一二三四| 久久精品视频在线看| 波多野结衣在线aⅴ中文字幕不卡| 国产精品久久一级| 欧美日韩亚洲综合| 久草中文综合在线| 中文字幕精品一区二区精品绿巨人| 色综合欧美在线视频区| 日日摸夜夜添夜夜添亚洲女人| 欧美精品一区二区三区很污很色的| 国产成人在线视频网站| 亚洲免费视频成人| 91精品国产综合久久国产大片| 精品午夜一区二区三区在线观看| 亚洲国产精品激情在线观看| 欧美在线小视频| 韩国一区二区三区| 亚洲男帅同性gay1069| 欧美一区二区人人喊爽|