class Hipend extends End { Hipend(Boxinfo iboxinfo, float iend) { super(iboxinfo, iend); sideA = new Pos[2]; sideB = new Pos[2]; sideA[0] = new Pos(dim.w/2, 0, dim.d/2*end); sideA[1] = new Pos(dim.w/2, -dim.h, dim.d/2*end, 0); sideB[0] = new Pos(-dim.w/2, 0, dim.d/2*end); sideB[1] = new Pos(-dim.w/2, -dim.h, dim.d/2*end, 0); } void grow() { super.grow(); } void display() { super.display(); } void build() { pushMatrix(); translate(0,height/3,0); if (rot < 1) { rotateY(radians(90)); } chooseColr(); // peaked sides beginShape(); vertex(-dim.w/2, -dim.h, dim.d/2*end); vertex(-roof.mids.x, -dim.h-roof.mids.y, roof.mids.z*end); vertex(roof.mids.x, -dim.h-roof.mids.y, roof.mids.z*end); vertex(dim.w/2,-dim.h, dim.d/2*end); vertex(dim.w/2,0,dim.d/2*end); vertex(-dim.w/2,0,dim.d/2*end); endShape(CLOSE); roofHip(); popMatrix(); } }