org.smurn.jply
Interface PlyReader

All Known Implementing Classes:
NormalizingPlyReader, PlyReaderFile

public interface PlyReader

Interface for classes reading PLY file structures.


Method Summary
 void close()
          Closes the file.
 int getElementCount(String elementType)
          Gets the number of elements for a given element type.
 List<ElementType> getElementTypes()
          Gets all element types in this PLY file.
 ElementReader nextElementReader()
          Returns the reader to read the first group of elements.
 

Method Detail

getElementTypes

List<ElementType> getElementTypes()
Gets all element types in this PLY file.

The order of the list is the same in which the corresponding readers are returned by nextElementReader().

Returns:
Immutable list with all element types.

getElementCount

int getElementCount(String elementType)
Gets the number of elements for a given element type.

Parameters:
elementType - Name of the element type.
Returns:
Number of elements of the given type.
Throws:
NullPointerException - if elementType is null.
IllegalArgumentException - if there is no such type in this file.

nextElementReader

ElementReader nextElementReader()
                                throws IOException
Returns the reader to read the first group of elements.

Each group corresponds to an element type. The groups are returned in the order given in the file. This is also the same order as in the list given by getElementTypes().

Each returned reader must be closed before the next reader is requested with this method.

Returns:
Reader for the next group of elements or null if there are no more groups.
Throws:
IOException - if an error occurs during reading.

close

void close()
           throws IOException
Closes the file.

Throws:
IOException - if closing fails.


Copyright © 2011. All Rights Reserved.