EBGeometry  1.0
Public Types | Static Public Member Functions | Static Protected Member Functions | List of all members
Parser::PLY< T > Class Template Reference

Class for reading Stanford PLY files. More...

#include <EBGeometry_Parser.hpp>

Public Types

using Vec3 = EBGeometry::Vec3T< T >
 Alias for vector type.
 
using Vertex = EBGeometry::DCEL::VertexT< T >
 Alias for vertex type.
 
using Edge = EBGeometry::DCEL::EdgeT< T >
 Alias for edge type.
 
using Face = EBGeometry::DCEL::FaceT< T >
 Alias for face type.
 
using Mesh = EBGeometry::DCEL::MeshT< T >
 Alias for mesh type.
 
using EdgeIterator = EBGeometry::DCEL::EdgeIteratorT< T >
 Alias for edge iterator type.
 

Static Public Member Functions

static std::shared_ptr< Meshread (const std::string a_filename) noexcept
 Static function which reads an ASCII .ply file and returns a DCEL mesh. More...
 

Static Protected Member Functions

static Encoding getEncoding (const std::string a_filename) noexcept
 Check if the input PLY file is an ASCII file or a binary. More...
 
static void readPLYSoupASCII (std::vector< Vec3 > &a_vertices, std::vector< std::vector< size_t >> &a_faces, std::ifstream &a_fileStream) noexcept
 Read an ASCII PLY file into a triangle soup. More...
 
static void readPLYSoupBinary (std::vector< Vec3 > &a_vertices, std::vector< std::vector< size_t >> &a_faces, std::ifstream &a_fileStream) noexcept
 Read a binary PLY file into a triangle soup. More...
 

Detailed Description

template<typename T>
class Parser::PLY< T >

Class for reading Stanford PLY files.

Note
T is the precision used for storing the mesh.

Member Function Documentation

◆ getEncoding()

template<typename T >
static Encoding Parser::PLY< T >::getEncoding ( const std::string  a_filename)
inlinestaticprotectednoexcept

Check if the input PLY file is an ASCII file or a binary.

Parameters
[in]a_filenameFile name
Returns
Returns Encoding::ASCII or Encoding::Binary,

◆ read()

template<typename T >
static std::shared_ptr<Mesh> Parser::PLY< T >::read ( const std::string  a_filename)
inlinestaticnoexcept

Static function which reads an ASCII .ply file and returns a DCEL mesh.

Parameters
[in]a_filenameFile name

◆ readPLYSoupASCII()

template<typename T >
static void Parser::PLY< T >::readPLYSoupASCII ( std::vector< Vec3 > &  a_vertices,
std::vector< std::vector< size_t >> &  a_faces,
std::ifstream &  a_fileStream 
)
inlinestaticprotectednoexcept

Read an ASCII PLY file into a triangle soup.

Parameters
[out]a_verticesRaw vertices
[out]a_facesRaw polygon faces
[in]a_fileStreamFile stream

◆ readPLYSoupBinary()

template<typename T >
static void Parser::PLY< T >::readPLYSoupBinary ( std::vector< Vec3 > &  a_vertices,
std::vector< std::vector< size_t >> &  a_faces,
std::ifstream &  a_fileStream 
)
inlinestaticprotectednoexcept

Read a binary PLY file into a triangle soup.

Parameters
[out]a_verticesRaw vertices
[out]a_facesRaw polygon faces
[in]a_fileStreamFile stream

The documentation for this class was generated from the following file: