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

📄 ellipticlimb.java

📁 java3D game engine design of the source [three-dimensionalvirtualrealitynetworkprogram] - "virtual
💻 JAVA
字号:

// EllipticLimb.java
// Thana Konglikhit, October 2003, s4310170@maliwan.psu.ac.th
// Andrew Davison, dandrew@ratree.psu.ac.th

/* An unmoveable Limb object but using an elliptical lathe shape
   rather than a circular one.
*/

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


public class EllipticLimb extends Limb
{
  public EllipticLimb(int lNo, String jn0, String jn1, 
                      int axis, double angle, 
                      double[] xs, double[] ys, String tex)
  {  super(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("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 makeShape()


}  // end of EllipticLimb class

⌨️ 快捷键说明

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