private static RectBounds fillBuffers ( PlyReader plyReader , FloatBuffer vertexBuffer , IntBuffer indexBuffer ) throws IOException { // Get all element readers and find the two providing // the vertices and triangles. ElementReader reader = plyReader . nextElementReader ( ) ; RectBounds bounds = null ; while ( reader != null ) { if ( reader . getElementType ( ) . getName ( ) . equals ( "vertex" ) ) { bounds = fillVertexBuffer ( reader , vertexBuffer ) ; } else if ( reader . getElementType ( ) . getName ( ) . equals ( "face" ) ) { fillIndexBuffer ( reader , indexBuffer ) ; } reader . close ( ) ; reader = plyReader . nextElementReader ( ) ; } return bounds ; }
Loads the data from the PLY file into the buffers .