📄 cube.java
字号:
package models;import net.jscience.j3dme.*;public class Cube extends Model{ // Coordinate and Normals static int[] x = { 20,-20,-20, 20,20,-20,-20, 20, 256,0,-256,0,0,0}; static int[] y = {-20,-20,-20,-20,20, 20, 20, 20, 0,0,0,0,256,-256}; static int[] z = { 20, 20,-20,-20,20, 20,-20,-20, 0,256,0,-256,0,0}; // Wire definitions from and to array static int[] wf = { 0,1,2,3,4,5,6,7,0,1,2,3}; static int[] wt = { 1,2,3,0,5,6,7,4,4,5,6,7}; // Polygon wire segments static int[] ws = { 0,1, 2, 3, // Polygon 0 4,5, 6, 7, // Polygon 4 0,4, 8, 9, // Polygon 8 1,5, 9,10, // Polygon 12 2,6,10,11, // Polygon 16 3,7, 8,11 // Polygon 20 }; // Polygons from, to and index aligned with normals static int[] pf = { 20, 8,12,16,4,0}; static int[] pt = { 23,11,15,19,7,3}; public Cube(){ geometry = new Surface(x,y,z,wf,wt,ws,pf,pt,8); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -