protected double[] computeAngles() { // Compute the start and sweep angles such that the partial cylinder shape tranverses a // clockwise path from // the start angle to the stop angle. Angle startAngle, stopAngle, sweepAngle; startAngle = normalizedAzimuth(this.leftAzimuth); stopAngle = normalizedAzimuth(this.rightAzimuth); int i = startAngle.compareTo(stopAngle); // Angles are equal, fallback to building a closed cylinder. if (i == 0) return null; if (i < 0) sweepAngle = stopAngle.subtract(startAngle); else // (i > 0) sweepAngle = Angle.POS360.subtract(startAngle).add(stopAngle); double[] array = new double[3]; array[0] = startAngle.radians; array[1] = stopAngle.radians; array[2] = sweepAngle.radians; return array; }