shape3d.pde
来自「This is processing for java examples.」· PDE 代码 · 共 83 行
PDE
83 行
abstract class Shape3D{ float x, y, z; float w, h, d; Shape3D(){ } Shape3D(float x, float y, float z){ this.x = x; this.y = y; this.z = z; } Shape3D(PVector p){ x = p.x; y = p.y; z = p.z; } Shape3D(Dimension3D dim){ w = dim.w; h = dim.h; d = dim.d; } Shape3D(float x, float y, float z, float w, float h, float d){ this.x = x; this.y = y; this.z = z; this.w = w; this.h = h; this.d = d; } Shape3D(float x, float y, float z, Dimension3D dim){ this.x = x; this.y = y; this.z = z; w = dim.w; h = dim.h; d = dim.d; } Shape3D(PVector p, Dimension3D dim){ x = p.x; y = p.y; z = p.z; w = dim.w; h = dim.h; d = dim.d; } void setLoc(PVector p){ x=p.x; y=p.y; z=p.z; } void setLoc(float x, float y, float z){ this.x=x; this.y=y; this.z=z; } // override if you need these void rotX(float theta){ } void rotY(float theta){ } void rotZ(float theta){ } // must be implemented in subclasses abstract void init(); abstract void create();}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?