\hypertarget{a00263}{\section{Open\+Mesh\+:\+:I\+O\+:\+:\+\_\+\+O\+F\+F\+Reader\+\_\+ Class Reference}
\label{a00263}\index{Open\+Mesh\+::\+I\+O\+::\+\_\+\+O\+F\+F\+Reader\+\_\+@{Open\+Mesh\+::\+I\+O\+::\+\_\+\+O\+F\+F\+Reader\+\_\+}}
}


{\ttfamily \#include $<$libs\+\_\+required/\+Open\+Mesh/src/\+Open\+Mesh/\+Core/\+I\+O/reader/\+O\+F\+F\+Reader.\+hh$>$}

Inheritance diagram for Open\+Mesh\+:\+:I\+O\+:\+:\+\_\+\+O\+F\+F\+Reader\+\_\+\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{a00263}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a00263_a03ed5cb451f35941a024c3933a3abd0b}{virtual \hyperlink{a00263_a03ed5cb451f35941a024c3933a3abd0b}{$\sim$\+\_\+\+O\+F\+F\+Reader\+\_\+} ()}\label{a00263_a03ed5cb451f35941a024c3933a3abd0b}

\begin{DoxyCompactList}\small\item\em Destructor. \end{DoxyCompactList}\item 
\hypertarget{a00263_ac99d36c3ee277b819e1888125b0c0657}{std\+::string \hyperlink{a00263_ac99d36c3ee277b819e1888125b0c0657}{get\+\_\+description} () const }\label{a00263_ac99d36c3ee277b819e1888125b0c0657}

\begin{DoxyCompactList}\small\item\em Returns a brief description of the file type that can be parsed. \end{DoxyCompactList}\item 
std\+::string \hyperlink{a00263_a8bf22988555c8022bd3b7784aa4691c1}{get\+\_\+extensions} () const 
\item 
\hypertarget{a00263_a42e7c526fed798b58feaf4df64b7775f}{std\+::string \hyperlink{a00263_a42e7c526fed798b58feaf4df64b7775f}{get\+\_\+magic} () const }\label{a00263_a42e7c526fed798b58feaf4df64b7775f}

\begin{DoxyCompactList}\small\item\em Return magic bits used to determine file format. \end{DoxyCompactList}\item 
bool \hyperlink{a00263_ae6abbcd58b42708cdaf454a92a8e42c3}{read} (const std\+::string \&\+\_\+filename, \hyperlink{a00319}{Base\+Importer} \&\+\_\+bi, \hyperlink{a00941}{Options} \&\+\_\+opt)
\item 
bool \hyperlink{a00263_ac6c13ef8620cd0b294f9baa84ea4f891}{can\+\_\+u\+\_\+read} (const std\+::string \&\+\_\+filename) const 
\begin{DoxyCompactList}\small\item\em Returns true if writer can parse \+\_\+filename (checks extension). \+\_\+filename can also provide an extension without a name for a file e.\+g. \+\_\+filename == \char`\"{}om\char`\"{} checks, if the reader can read the \char`\"{}om\char`\"{} extension. \end{DoxyCompactList}\item 
bool \hyperlink{a00263_aa94f52dc263700daa126a32ec1018e2f}{read} (std\+::istream \&\+\_\+in, \hyperlink{a00319}{Base\+Importer} \&\+\_\+bi, \hyperlink{a00941}{Options} \&\+\_\+opt)
\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a00263_aa92e7542277c45a88a753359843d5123}{bool {\bfseries can\+\_\+u\+\_\+read} (std\+::istream \&\+\_\+is) const }\label{a00263_aa92e7542277c45a88a753359843d5123}

\item 
\hypertarget{a00263_ac6981d31f35f188e940bffda26125861}{bool {\bfseries read\+\_\+ascii} (std\+::istream \&\+\_\+in, \hyperlink{a00319}{Base\+Importer} \&\+\_\+bi, \hyperlink{a00941}{Options} \&\+\_\+opt) const }\label{a00263_ac6981d31f35f188e940bffda26125861}

\item 
\hypertarget{a00263_a898f2cf7aa978599e27245d18cfeb8c7}{bool {\bfseries read\+\_\+binary} (std\+::istream \&\+\_\+in, \hyperlink{a00319}{Base\+Importer} \&\+\_\+bi, \hyperlink{a00941}{Options} \&\+\_\+opt, bool swap) const }\label{a00263_a898f2cf7aa978599e27245d18cfeb8c7}

\item 
\hypertarget{a00263_abeeddf5f0673ac6111908d1882f1a0fc}{void {\bfseries read\+Value} (std\+::istream \&\+\_\+in, float \&\+\_\+value) const }\label{a00263_abeeddf5f0673ac6111908d1882f1a0fc}

\item 
\hypertarget{a00263_afc293717eebc235309c07cf3c43384ff}{void {\bfseries read\+Value} (std\+::istream \&\+\_\+in, int \&\+\_\+value) const }\label{a00263_afc293717eebc235309c07cf3c43384ff}

\item 
\hypertarget{a00263_ab78a1c72628591e7e2c5387f1a18db86}{void {\bfseries read\+Value} (std\+::istream \&\+\_\+in, unsigned int \&\+\_\+value) const }\label{a00263_ab78a1c72628591e7e2c5387f1a18db86}

\item 
\hypertarget{a00263_a7b04b3272a0d859258b4231a2d433dcb}{int {\bfseries get\+Color\+Type} (std\+::string \&\+\_\+line, bool \+\_\+tex\+Coords\+Available) const }\label{a00263_a7b04b3272a0d859258b4231a2d433dcb}

\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a00263_a3c01b93bf3f3a077d8dd2a069c839224}{\hyperlink{a00941}{Options} {\bfseries options\+\_\+}}\label{a00263_a3c01b93bf3f3a077d8dd2a069c839224}

\item 
\hypertarget{a00263_a3e230068dc4ccc4f7fcf6ca483cfffc6}{\hyperlink{a00941}{Options} {\bfseries user\+Options\+\_\+}}\label{a00263_a3e230068dc4ccc4f7fcf6ca483cfffc6}

\end{DoxyCompactItemize}
\subsection*{Additional Inherited Members}


\subsection{Detailed Description}
Implementation of the O\+F\+F format reader. This class is singleton'ed by \hyperlink{a01181}{Singleton\+T} to O\+F\+F\+Reader.

By passing \hyperlink{a00941}{Options} to the read function you can manipulate the reading behavoir. The following options can be set\+:

Vertex\+Normal Vertex\+Color Vertex\+Tex\+Coord Face\+Color Color\+Alpha \mbox{[}only when reading binary\mbox{]}

These options define if the corresponding data should be read (if available) or if it should be omitted.

After execution of the read function. The options object contains information about what was actually read.

e.\+g. if Vertex\+Normal was true when the read function was called, but the file did not contain vertex normals then it is false afterwards.

When reading a binary off with Color Flag in the header it is assumed that all vertices and faces have colors in the format \char`\"{}int int int\char`\"{}. If Color\+Alpha is set the format \char`\"{}int int int int\char`\"{} is assumed. 

Definition at line 117 of file O\+F\+F\+Reader.\+hh.



\subsection{Member Function Documentation}
\hypertarget{a00263_ac6c13ef8620cd0b294f9baa84ea4f891}{\index{Open\+Mesh\+::\+I\+O\+::\+\_\+\+O\+F\+F\+Reader\+\_\+@{Open\+Mesh\+::\+I\+O\+::\+\_\+\+O\+F\+F\+Reader\+\_\+}!can\+\_\+u\+\_\+read@{can\+\_\+u\+\_\+read}}
\index{can\+\_\+u\+\_\+read@{can\+\_\+u\+\_\+read}!Open\+Mesh\+::\+I\+O\+::\+\_\+\+O\+F\+F\+Reader\+\_\+@{Open\+Mesh\+::\+I\+O\+::\+\_\+\+O\+F\+F\+Reader\+\_\+}}
\subsubsection[{can\+\_\+u\+\_\+read}]{\setlength{\rightskip}{0pt plus 5cm}bool Open\+Mesh\+::\+I\+O\+::\+\_\+\+O\+F\+F\+Reader\+\_\+\+::can\+\_\+u\+\_\+read (
\begin{DoxyParamCaption}
\item[{const std\+::string \&}]{\+\_\+filename}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [virtual]}}}\label{a00263_ac6c13ef8620cd0b294f9baa84ea4f891}


Returns true if writer can parse \+\_\+filename (checks extension). \+\_\+filename can also provide an extension without a name for a file e.\+g. \+\_\+filename == \char`\"{}om\char`\"{} checks, if the reader can read the \char`\"{}om\char`\"{} extension. 


\begin{DoxyParams}{Parameters}
{\em \+\_\+filename} & complete name of a file or just the extension \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true, if reader can read data with the given extension 
\end{DoxyReturn}


Reimplemented from \hyperlink{a00338_a29f61a3902841c6b006d57614a05a53f}{Open\+Mesh\+::\+I\+O\+::\+Base\+Reader}.



Definition at line 613 of file O\+F\+F\+Reader.\+cc.

\hypertarget{a00263_a8bf22988555c8022bd3b7784aa4691c1}{\index{Open\+Mesh\+::\+I\+O\+::\+\_\+\+O\+F\+F\+Reader\+\_\+@{Open\+Mesh\+::\+I\+O\+::\+\_\+\+O\+F\+F\+Reader\+\_\+}!get\+\_\+extensions@{get\+\_\+extensions}}
\index{get\+\_\+extensions@{get\+\_\+extensions}!Open\+Mesh\+::\+I\+O\+::\+\_\+\+O\+F\+F\+Reader\+\_\+@{Open\+Mesh\+::\+I\+O\+::\+\_\+\+O\+F\+F\+Reader\+\_\+}}
\subsubsection[{get\+\_\+extensions}]{\setlength{\rightskip}{0pt plus 5cm}std\+::string Open\+Mesh\+::\+I\+O\+::\+\_\+\+O\+F\+F\+Reader\+\_\+\+::get\+\_\+extensions (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}}\label{a00263_a8bf22988555c8022bd3b7784aa4691c1}
Returns a string with the accepted file extensions separated by a whitespace and in small caps. 

Implements \hyperlink{a00338_a9e76bc7b1b46b7a8b4922d8ca5934419}{Open\+Mesh\+::\+I\+O\+::\+Base\+Reader}.



Definition at line 127 of file O\+F\+F\+Reader.\+hh.

\hypertarget{a00263_ae6abbcd58b42708cdaf454a92a8e42c3}{\index{Open\+Mesh\+::\+I\+O\+::\+\_\+\+O\+F\+F\+Reader\+\_\+@{Open\+Mesh\+::\+I\+O\+::\+\_\+\+O\+F\+F\+Reader\+\_\+}!read@{read}}
\index{read@{read}!Open\+Mesh\+::\+I\+O\+::\+\_\+\+O\+F\+F\+Reader\+\_\+@{Open\+Mesh\+::\+I\+O\+::\+\_\+\+O\+F\+F\+Reader\+\_\+}}
\subsubsection[{read}]{\setlength{\rightskip}{0pt plus 5cm}bool Open\+Mesh\+::\+I\+O\+::\+\_\+\+O\+F\+F\+Reader\+\_\+\+::read (
\begin{DoxyParamCaption}
\item[{const std\+::string \&}]{\+\_\+filename, }
\item[{{\bf Base\+Importer} \&}]{\+\_\+bi, }
\item[{{\bf Options} \&}]{\+\_\+opt}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}}\label{a00263_ae6abbcd58b42708cdaf454a92a8e42c3}
Reads a mesh given by a filename. Usually this method opens a stream and passes it to stream read method. Acceptance checks by filename extension can be placed here.

\hyperlink{a00941}{Options} can be passed via \+\_\+opt. After execution \+\_\+opt contains the \hyperlink{a00941}{Options} that were available 

Implements \hyperlink{a00338_af4a32645528c1bf2043a9259b172f411}{Open\+Mesh\+::\+I\+O\+::\+Base\+Reader}.



Definition at line 111 of file O\+F\+F\+Reader.\+cc.

\hypertarget{a00263_aa94f52dc263700daa126a32ec1018e2f}{\index{Open\+Mesh\+::\+I\+O\+::\+\_\+\+O\+F\+F\+Reader\+\_\+@{Open\+Mesh\+::\+I\+O\+::\+\_\+\+O\+F\+F\+Reader\+\_\+}!read@{read}}
\index{read@{read}!Open\+Mesh\+::\+I\+O\+::\+\_\+\+O\+F\+F\+Reader\+\_\+@{Open\+Mesh\+::\+I\+O\+::\+\_\+\+O\+F\+F\+Reader\+\_\+}}
\subsubsection[{read}]{\setlength{\rightskip}{0pt plus 5cm}bool Open\+Mesh\+::\+I\+O\+::\+\_\+\+O\+F\+F\+Reader\+\_\+\+::read (
\begin{DoxyParamCaption}
\item[{std\+::istream \&}]{\+\_\+is, }
\item[{{\bf Base\+Importer} \&}]{\+\_\+bi, }
\item[{{\bf Options} \&}]{\+\_\+opt}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}}\label{a00263_aa94f52dc263700daa126a32ec1018e2f}
Reads a mesh given by a std\+::stream. This method usually uses the same stream reading method that read uses. \hyperlink{a00941}{Options} can be passed via \+\_\+opt. After execution \+\_\+opt contains the \hyperlink{a00941}{Options} that were available.

Please make sure that if \+\_\+is is std\+::ifstream, the correct std\+::ios\+\_\+base\+::openmode flags are set. 

Implements \hyperlink{a00338_a0fd4df36decf91cd91a7f363aae56065}{Open\+Mesh\+::\+I\+O\+::\+Base\+Reader}.



Definition at line 138 of file O\+F\+F\+Reader.\+cc.



The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
libs\+\_\+required/\+Open\+Mesh/src/\+Open\+Mesh/\+Core/\+I\+O/reader/O\+F\+F\+Reader.\+hh\item 
libs\+\_\+required/\+Open\+Mesh/src/\+Open\+Mesh/\+Core/\+I\+O/reader/O\+F\+F\+Reader.\+cc\end{DoxyCompactItemize}
