?? lineshape3.java
字號:
import javax.media.j3d.*;
public class lineShape3 extends Shape3D{
int[] index={1,0,0,3,2,4};
int iCount=6;
int vCount=5;
private float vert[]={.5f,0.5f,0.0f,-0.5f,0.5f,0.0f,
0.3f,0.0f,0.0f,-0.3f,0.0f,0.0f,-0.5f,-0.5f,0.0f,};
private float color[]={0.0f,0.5f,1.0f,0.0f,0.5f,1.0f,
0.0f,0.8f,2.0f,1.0f,0.0f,0.3f,0.0f,1.0f,0.3f,};
public lineShape3(){
IndexedLineArray line=new IndexedLineArray(vCount,IndexedLineArray.COORDINATES|IndexedLineArray.COLOR_3,iCount);
line.setCoordinates(0,vert);
line.setColors(0,color);
line.setCoordinateIndices(0,index);
line.setColorIndices(0,index);
LineAttributes linea=new LineAttributes();
linea.setLineWidth(5.0f);
linea.setLineAntialiasingEnable(true);
linea.setLinePattern(LineAttributes.PATTERN_DASH_DOT);
Appearance app=new Appearance();
app.setLineAttributes(linea);
this.setGeometry(line);
this.setAppearance(app);
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -