class Box { float x,y,z,s; int r,g,b; Box(float _x, float _y, float _z, float _s, int _r, int _g, int _b) { x=_x; y=_y; z=_z; s=_s; r=_r; g=_g; b=_b; } void Draw() { push(); translate(x,y,z); fill(r,g,b,128); // alpha(128); noStroke(); box(s); pop(); } } class Crate { float x,y,z; int l,w,h; Box[] Boxes; Crate(float _x, float _y, float _z, int _l, int _w, int _h) { x=_x; y=_y; z=_z; l=_l; w=_w; h=_h; Boxes=new Box[l*w*h]; for(int i=0;i