}
public Point3f[] calculateSurface(BitSet bsSelected, float envelopeRadius) {
if (envelopeRadius < 0)
envelopeRadius = EnvelopeCalculation.SURFACE_DISTANCE_FOR_CALCULATION;
EnvelopeCalculation ec = new EnvelopeCalculation(viewer, atomCount, null, viewer.getTestFlag2());
ec.calculate(new RadiusData(envelopeRadius, RadiusData.TYPE_ABSOLUTE, 0),
Float.MAX_VALUE,
bsSelected, BitSetUtil.copyInvert(bsSelected, atomCount),
false, false, false, true);
Point3f[] points = ec.getPoints();
surfaceDistanceMax = 0;
bsSurface = ec.getBsSurfaceClone();
surfaceDistance100s = new int[atomCount];
nSurfaceAtoms = BitSetUtil.cardinalityOf(bsSurface);
if (nSurfaceAtoms == 0 || points == null || points.length == 0)
return points;
//for (int i = 0; i < points.length; i++) {