private static void createSegmentsForDirections(Vertex[][] segments, double circ, double halfLength, Vertex[] refCoords) {
for (Vertex coord : refCoords) {
coord.xyz.x = coord.xyz.x * circ;
coord.xyz.y = coord.xyz.y * circ;
}
Matrix4d rotMat = new Matrix4d();
rotMat.setIdentity();
rotMat.setTranslation(REF_TRANS);
segments[SOUTH.ordinal()] = xformCoords(refCoords, rotMat, offsetScaled(ForgeDirection.SOUTH, halfLength));
rotMat.makeRotationY(Math.PI);
rotMat.setTranslation(REF_TRANS);
segments[ForgeDirection.NORTH.ordinal()] = xformCoords(refCoords, rotMat, offsetScaled(ForgeDirection.NORTH, halfLength));
rotMat.makeRotationY(Math.PI / 2);
rotMat.setTranslation(REF_TRANS);
segments[ForgeDirection.EAST.ordinal()] = xformCoords(refCoords, rotMat, offsetScaled(ForgeDirection.EAST, halfLength));
rotMat.makeRotationY(-Math.PI / 2);
rotMat.setTranslation(REF_TRANS);
segments[ForgeDirection.WEST.ordinal()] = xformCoords(refCoords, rotMat, offsetScaled(ForgeDirection.WEST, halfLength));
rotMat.makeRotationX(-Math.PI / 2);
rotMat.setTranslation(REF_TRANS);
segments[ForgeDirection.UP.ordinal()] = xformCoords(refCoords, rotMat, offsetScaled(ForgeDirection.UP, halfLength));
rotMat.makeRotationX(Math.PI / 2);
rotMat.setTranslation(REF_TRANS);
segments[ForgeDirection.DOWN.ordinal()] = xformCoords(refCoords, rotMat, offsetScaled(ForgeDirection.DOWN, halfLength));
}