⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 moveableellipticlimb.java

📁 JAVA的一个程序
💻 JAVA
字号:
package Mover3D;


// MoveableEllipticLimb.java
// Thana Konglikhit, October 2003, s4310170@maliwan.psu.ac.th
// Andrew Davison, April 2005, ad@fivedots.coe.psu.ac.th

/* A MoveableLimb object but using an elliptical lathe shape
   rather than a circular one.

   Almost the same as the EllipticLimb class.
*/

import javax.media.j3d.*;
import com.sun.j3d.utils.image.*;


public class MoveableEllipticLimb extends MoveableLimb
{  
  public MoveableEllipticLimb(String lName, int lNo, String jn0, String jn1, 
                              int axis, double angle,
                              double[] xs, double[] ys, String tex)
  {  super(lName, lNo, jn0, jn1, axis, angle, xs, ys, tex);  }



  protected void makeShape()
  // overridden to make a EllipseShape3D instead of LatheShape3D
  {
    EllipseShape3D es;
    if (texPath != null) {
      // System.out.println("Loading textures/" + texPath);
      TextureLoader texLd = new TextureLoader("F:\\workspace\\JAVA3D\\src\\Mover3D\\textures\\"+texPath, null);
      Texture tex = texLd.getTexture();      
      es = new EllipseShape3D(xsIn, ysIn, tex);
    }
    else  
      es = new EllipseShape3D(xsIn, ysIn, null);
    
    zAxisTG.addChild(es);  // add the shape to the limb's graph
  }  // end of makeEllipseShape()


}  // end of MoveableEllipticLimb class

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -