All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jeometry.io.ply.PLYFileDescriptor Maven / Gradle / Ivy

There is a newer version: 1.0.5
Show newest version
package org.jeometry.io.ply;

import java.util.Collection;

import org.jeometry.Jeometry;

/**
 * a PLY file descriptor. This class contains metadata that describes a PLY input.
 * @author Julien Seinturier - COMEX S.A. - [email protected] - https://github.com/jorigin/jeometry
 * @version {@value Jeometry#version}
 * @since 1.0.0
 */
public class PLYFileDescriptor {
  
  private int fileFormat = PLY.FILE_FORMAT_ASCII;

  private Collection elementDescriptors = null;

  private int headerLineCount = 0;

  private int vertexCount = -1;

  private int faceCount = -1;

  private int edgeCount = -1;

  private int vertexType = -1;

  /**
   * Get the format of the PLY file. There is 3 formats available:
   * 
    *
  • {@link PLY#FILE_FORMAT_ASCII} for an ASCII file; *
  • {@link PLY#FILE_FORMAT_BINARY_LE} for a binary file with Little Endian coding; *
  • {@link PLY#FILE_FORMAT_BINARY_BE} for a binary file with Big Endian coding; *
* * @return the format of the PLY file. * @see #setFileFormat(int) */ public int getFileFormat() { return this.fileFormat; } /** * Set the format of the PLY file. There is 3 formats available: *
    *
  • {@link PLY#FILE_FORMAT_ASCII} for an ASCII file; *
  • {@link PLY#FILE_FORMAT_BINARY_LE} for a binary file with Little Endian coding; *
  • {@link PLY#FILE_FORMAT_BINARY_BE} for a binary file with Big Endian coding; *
* * @param fileFormat the format of the PLY file. * @see #getFileFormat() */ public void setFileFormat(int fileFormat) { this.fileFormat = fileFormat; } /** * Get the element descriptors declared within the PLY file. * @return the element descriptors declared within the PLY file. * @see #setElementDescriptors(Collection) */ public Collection getElementDescriptors() { return elementDescriptors; } /** * Set the element descriptors declared within the PLY file. * @param elementDescriptors the element descriptors declared within the PLY file. * @see #getElementDescriptors() */ public void setElementDescriptors(Collection elementDescriptors) { this.elementDescriptors = elementDescriptors; } /** * Get the number of lines that compose the PLY file header. * @return the number of lines that compose the PLY file header. * @see #setHeaderLineCount(int) */ public int getHeaderLineCount() { return headerLineCount; } /** * Set the number of lines that compose the PLY file header. * @param headerLineCount the number of lines that compose the PLY file header. * @see #getHeaderLineCount() */ public void setHeaderLineCount(int headerLineCount) { this.headerLineCount = headerLineCount; } /** * Get the number of vertices within the PLY file. * @return the number of vertices within the PLY file. * @see #setVertexCount(int) */ public int getVertexCount() { return vertexCount; } /** * Set the number of vertices within the PLY file. * @param vertexCount the number of vertices within the PLY file. * @see #getVertexCount() */ public void setVertexCount(int vertexCount) { this.vertexCount = vertexCount; } /** * Get the number of faces within the PLY file. * @return the number of faces within the PLY file. * @see #setFaceCount(int) */ public int getFaceCount() { return faceCount; } /** * Set the number of faces within the PLY file. * @param faceCount the number of faces within the PLY file. * @see #getFaceCount() */ public void setFaceCount(int faceCount) { this.faceCount = faceCount; } /** * Get the number of edges within the PLY file. * @return the number of edges within the PLY file. * @see #setEdgeCount(int) */ public int getEdgeCount() { return edgeCount; } /** * Set the number of edges within the PLY file. * @param edgeCount the number of edges within the PLY file. * @see #getEdgeCount() */ public void setEdgeCount(int edgeCount) { this.edgeCount = edgeCount; } /** * Get the vertex type declared within this PLY file.
* Possible values are:
*
    *
  • {@link PLY#VERTEX_TYPE_2D} *
  • {@link PLY#VERTEX_TYPE_3D} *
* @return the vertex type declared within this PLY file. * @see #setVertexType(int) */ public int getVertexType() { return vertexType; } /** * Set the vertex type declared within this PLY file.
* Possible values are:
*
    *
  • {@link PLY#VERTEX_TYPE_2D} *
  • {@link PLY#VERTEX_TYPE_3D} *
* @param vertexType the vertex type declared within this PLY file. * @see #getVertexType() */ public void setVertexType(int vertexType) { this.vertexType = vertexType; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy