DGtal  1.5.beta
DGtal::SurfaceMeshReader< TRealPoint, TRealVector > Struct Template Reference

Aim: An helper class for reading mesh files (Wavefront OBJ at this point) and creating a SurfaceMesh. More...

#include <DGtal/io/readers/SurfaceMeshReader.h>

Public Types

typedef TRealPoint RealPoint
 
typedef TRealVector RealVector
 
typedef SurfaceMeshReader< RealPoint, RealVectorSelf
 
typedef DGtal::SurfaceMesh< RealPoint, RealVectorSurfaceMesh
 
typedef SurfaceMesh::Size Size
 
typedef SurfaceMesh::Index Index
 
typedef SurfaceMesh::Vertices Vertices
 
typedef SurfaceMesh::Faces Faces
 

Public Member Functions

 BOOST_STATIC_ASSERT ((dimension==3))
 

Static Public Member Functions

static bool verifyIndicesUniqueness (const std::vector< Index > &indices)
 
static std::vector< std::string > split (const std::string &str, char delim=' ')
 
static bool readOBJ (std::istream &input, SurfaceMesh &smesh)
 

Static Public Attributes

static const Dimension dimension = RealPoint::dimension
 

Detailed Description

template<typename TRealPoint, typename TRealVector>
struct DGtal::SurfaceMeshReader< TRealPoint, TRealVector >

Aim: An helper class for reading mesh files (Wavefront OBJ at this point) and creating a SurfaceMesh.

Description of template class 'SurfaceMeshReader'

Template Parameters
TRealPointan arbitrary model of RealPoint.
TRealVectoran arbitrary model of RealVector.

Definition at line 63 of file SurfaceMeshReader.h.

Member Typedef Documentation

◆ Faces

template<typename TRealPoint , typename TRealVector >
typedef SurfaceMesh::Faces DGtal::SurfaceMeshReader< TRealPoint, TRealVector >::Faces

Definition at line 75 of file SurfaceMeshReader.h.

◆ Index

template<typename TRealPoint , typename TRealVector >
typedef SurfaceMesh::Index DGtal::SurfaceMeshReader< TRealPoint, TRealVector >::Index

Definition at line 73 of file SurfaceMeshReader.h.

◆ RealPoint

template<typename TRealPoint , typename TRealVector >
typedef TRealPoint DGtal::SurfaceMeshReader< TRealPoint, TRealVector >::RealPoint

Definition at line 65 of file SurfaceMeshReader.h.

◆ RealVector

template<typename TRealPoint , typename TRealVector >
typedef TRealVector DGtal::SurfaceMeshReader< TRealPoint, TRealVector >::RealVector

Definition at line 66 of file SurfaceMeshReader.h.

◆ Self

template<typename TRealPoint , typename TRealVector >
typedef SurfaceMeshReader< RealPoint, RealVector > DGtal::SurfaceMeshReader< TRealPoint, TRealVector >::Self

Definition at line 67 of file SurfaceMeshReader.h.

◆ Size

template<typename TRealPoint , typename TRealVector >
typedef SurfaceMesh::Size DGtal::SurfaceMeshReader< TRealPoint, TRealVector >::Size

Definition at line 72 of file SurfaceMeshReader.h.

◆ SurfaceMesh

template<typename TRealPoint , typename TRealVector >
typedef DGtal::SurfaceMesh< RealPoint, RealVector > DGtal::SurfaceMeshReader< TRealPoint, TRealVector >::SurfaceMesh

Definition at line 71 of file SurfaceMeshReader.h.

◆ Vertices

template<typename TRealPoint , typename TRealVector >
typedef SurfaceMesh::Vertices DGtal::SurfaceMeshReader< TRealPoint, TRealVector >::Vertices

Definition at line 74 of file SurfaceMeshReader.h.

Member Function Documentation

◆ BOOST_STATIC_ASSERT()

template<typename TRealPoint , typename TRealVector >
DGtal::SurfaceMeshReader< TRealPoint, TRealVector >::BOOST_STATIC_ASSERT ( (dimension==3)  )

◆ readOBJ()

template<typename TRealPoint , typename TRealVector >
static bool DGtal::SurfaceMeshReader< TRealPoint, TRealVector >::readOBJ ( std::istream &  input,
SurfaceMesh smesh 
)
static

Reads an input file as an OBJ file format and outputs the corresponding surface mesh.

Parameters
[in,out]inputthe input stream where the OBJ file is read.
[out]smeshthe output surface mesh.
Returns
'true' if both reading the input stream was ok and the created mesh is ok.

◆ split()

template<typename TRealPoint , typename TRealVector >
static std::vector< std::string > DGtal::SurfaceMeshReader< TRealPoint, TRealVector >::split ( const std::string &  str,
char  delim = ' ' 
)
static

Splits a string str into several strings according to a delimiter delim.

Parameters
[in]strany string.
[in]delimany delimiter character.
Returns
the vector of split strings.

◆ verifyIndicesUniqueness()

template<typename TRealPoint , typename TRealVector >
static bool DGtal::SurfaceMeshReader< TRealPoint, TRealVector >::verifyIndicesUniqueness ( const std::vector< Index > &  indices)
static

Checks that every index in indices are different from the others.

Parameters
indicesa vector of integer indices
Returns
'true' iff the integer indices are all pairwise different.

Field Documentation

◆ dimension

template<typename TRealPoint , typename TRealVector >
const Dimension DGtal::SurfaceMeshReader< TRealPoint, TRealVector >::dimension = RealPoint::dimension
static

Definition at line 68 of file SurfaceMeshReader.h.


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