}
private static void createCaps(Vertex[][] segments, double circ, double halfLength) {
Vertex[] refCrossSection = createUnitCrossSection(0, 0, halfLength, 16, 0);
Vertex center = new Vertex(new Vector3d(0, 0, halfLength), new Vector3f(0, 0, 1), new Vector2f(0.5f, 0.5f));
Vertex[] refCoords = new Vertex[refCrossSection.length * 4];
int index = 0;
for (int i = 0; i < refCrossSection.length; i++) {
refCoords[index] = new Vertex(center);