From: Miguel <mig...@us...> - 2005-09-14 16:27:54
|
Update of /cvsroot/jmol/Jmol/src/org/jmol/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32420/src/org/jmol/util Modified Files: Bmp.java Log Message: sasurface visible convex vertexes now determined by clipping plane Index: Bmp.java =================================================================== RCS file: /cvsroot/jmol/Jmol/src/org/jmol/util/Bmp.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- Bmp.java 9 Sep 2005 18:50:52 -0000 1.7 +++ Bmp.java 14 Sep 2005 16:27:46 -0000 1.8 @@ -38,6 +38,19 @@ return new int[(count + 31) >> 5]; } + public final static int[] allocateSetAllBits(int count) { + int i = (count + 31) >> 5; + int[] bitmap = new int[i]; + int fractionalBitCount = count & 31; + if (fractionalBitCount != 0) { + bitmap[--i] = + (0x80000000 >> (fractionalBitCount - 1)) >>> (32 - fractionalBitCount); + } + while (--i >= 0) + bitmap[i] = 0xFFFFFFFF; + return bitmap; + } + public final static int[] growBitmap(int[] bitmap, int count) { if (count < 0) throw new IndexOutOfBoundsException(); |