float height = parseHeight(node.getTags(), 3.5f);
float minHeight = height / 5;
double directionAngle = parseDirection(node.getTags(), PI);
VectorXZ faceVector = VectorXZ.fromAngle(directionAngle);
VectorXZ boardVector = faceVector.rightNormal();
/* draw board */
VectorXYZ[] vsPoster = {
getBase().add(boardVector.mult(width/2)).addY(height),
getBase().add(boardVector.mult(width/2)).addY(minHeight),
getBase().add(boardVector.mult(-width/2)).addY(height),
getBase().add(boardVector.mult(-width/2)).addY(minHeight)
};
List<VectorXYZ> vsListPoster = asList(vsPoster);
target.drawTriangleStrip(ADVERTISING_POSTER, vsListPoster,
texCoordLists(vsListPoster, ADVERTISING_POSTER, STRIP_FIT));
VectorXYZ[] vsBoard = {
vsPoster[2],
vsPoster[3],
vsPoster[0],
vsPoster[1]
};
List<VectorXYZ> vsListBoard = asList(vsBoard);
target.drawTriangleStrip(CONCRETE, vsListBoard,
texCoordLists(vsListBoard, CONCRETE, STRIP_WALL));
/* draw poles */
VectorXZ[] poles = {
node.getPos().add(boardVector.mult(-width/4)),
node.getPos().add(boardVector.mult(+width/4))
};
for (VectorXZ pole : poles) {
target.drawBox(CONCRETE, pole.xyz(getBase().y),
faceVector, minHeight, 0.2, 0.1);