 = 0;   if (shapeType == ShapeType.Line) {    check(ShapeType.Line, ShapeType.Filled, segments * 0 + 0);    for (int i = 0; i < segments; i++) {     renderer.color(colorBits);     renderer.vertex(x + cx, y, z + cz);     float temp = cx;     cx = cos * cx - sin * cz;     cz = sin * temp + cos * cz;     renderer.color(colorBits);     renderer.vertex(x + cx, y, z + cz);    }    // Ensure the last segment is identical to the first.    renderer.color(colorBits);    renderer.vertex(x + cx, y, z + cz);   } else {    check(ShapeType.Line, ShapeType.Filled, segments * 0 + 0);    segments--;    for (int i = 0; i < segments; i++) {     renderer.color(colorBits);     renderer.vertex(x, y, z);     renderer.color(colorBits);     renderer.vertex(x + cx, y, z + cz);     float temp = cx;     cx = cos * cx - sin * cz;     cz = sin * temp + cos * cz;     renderer.color(colorBits);     renderer.vertex(x + cx, y, z + cz);    }    // Ensure the last segment is identical to the first.    renderer.color(colorBits);    renderer.vertex(x, y, z);    renderer.color(colorBits);    renderer.vertex(x + cx, y, z + cz);   } 