📄 ellipticlimb.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 + -