public int getFaceNumIndices ( int face ) { if ( null == m_faceOffsets ) { if ( face >= m_numFaces || face < 0 ) { throw new IndexOutOfBoundsException ( "Index: " + face + ", Size: " + m_numFaces ) ; } return 3 ; } else { /* * no need to perform bound checks here as the array access will * throw IndexOutOfBoundsExceptions if the index is invalid */ if ( face == m_numFaces - 1 ) { return m_faces . capacity ( ) / 4 - m_faceOffsets . getInt ( face * 4 ) ; } return m_faceOffsets . getInt ( ( face + 1 ) * 4 ) - m_faceOffsets . getInt ( face * 4 ) ; } }
Returns the number of vertex indices for a single face .