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


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

Inheritance diagram for Open\+Mesh\+:\+:IO\+:\+:\+\_\+\+O\+F\+F\+Reader\+\_\+\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{a08492}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a08492_a03ed5cb451f35941a024c3933a3abd0b}\label{a08492_a03ed5cb451f35941a024c3933a3abd0b}} 
virtual \hyperlink{a08492_a03ed5cb451f35941a024c3933a3abd0b}{$\sim$\+\_\+\+O\+F\+F\+Reader\+\_\+} ()
\begin{DoxyCompactList}\small\item\em Destructor. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a08492_af0b9c6ad19b00a2c72ce5e87ec399755}\label{a08492_af0b9c6ad19b00a2c72ce5e87ec399755}} 
std\+::string \hyperlink{a08492_af0b9c6ad19b00a2c72ce5e87ec399755}{get\+\_\+description} () const
\begin{DoxyCompactList}\small\item\em Returns a brief description of the file type that can be parsed. \end{DoxyCompactList}\item 
std\+::string \hyperlink{a08492_a36bf8b125fad9000bf91c99267e09420}{get\+\_\+extensions} () const
\item 
\mbox{\Hypertarget{a08492_aef5cc41f31dec673a0141f6a75a87c75}\label{a08492_aef5cc41f31dec673a0141f6a75a87c75}} 
std\+::string \hyperlink{a08492_aef5cc41f31dec673a0141f6a75a87c75}{get\+\_\+magic} () const
\begin{DoxyCompactList}\small\item\em Return magic bits used to determine file format. \end{DoxyCompactList}\item 
bool \hyperlink{a08492_ae6abbcd58b42708cdaf454a92a8e42c3}{read} (const std\+::string \&\+\_\+filename, \hyperlink{a08468}{Base\+Importer} \&\+\_\+bi, \hyperlink{a08480}{Options} \&\+\_\+opt)
\item 
bool \hyperlink{a08492_abbe833299f79b23de4bf4c1bf1580713}{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{a08492_aa94f52dc263700daa126a32ec1018e2f}{read} (std\+::istream \&\+\_\+in, \hyperlink{a08468}{Base\+Importer} \&\+\_\+bi, \hyperlink{a08480}{Options} \&\+\_\+opt)
\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a08492_ac89a2efea21b338f57992e5034adafcf}\label{a08492_ac89a2efea21b338f57992e5034adafcf}} 
bool {\bfseries can\+\_\+u\+\_\+read} (std\+::istream \&\+\_\+is) const
\item 
\mbox{\Hypertarget{a08492_ad0b1f46bcd03800ba532a7d601d82422}\label{a08492_ad0b1f46bcd03800ba532a7d601d82422}} 
bool {\bfseries read\+\_\+ascii} (std\+::istream \&\+\_\+in, \hyperlink{a08468}{Base\+Importer} \&\+\_\+bi, \hyperlink{a08480}{Options} \&\+\_\+opt) const
\item 
\mbox{\Hypertarget{a08492_adbdb7ff9b549fa1a79ec565dbe1c1345}\label{a08492_adbdb7ff9b549fa1a79ec565dbe1c1345}} 
bool {\bfseries read\+\_\+binary} (std\+::istream \&\+\_\+in, \hyperlink{a08468}{Base\+Importer} \&\+\_\+bi, \hyperlink{a08480}{Options} \&\+\_\+opt, bool swap) const
\item 
\mbox{\Hypertarget{a08492_a14199a3919afedfbb0b9d14c6ae79945}\label{a08492_a14199a3919afedfbb0b9d14c6ae79945}} 
void {\bfseries read\+Value} (std\+::istream \&\+\_\+in, float \&\+\_\+value) const
\item 
\mbox{\Hypertarget{a08492_a6874f0546fa23a16a00c37cf6468a35c}\label{a08492_a6874f0546fa23a16a00c37cf6468a35c}} 
void {\bfseries read\+Value} (std\+::istream \&\+\_\+in, int \&\+\_\+value) const
\item 
\mbox{\Hypertarget{a08492_a99e7a077d711bf8d7ee45ae0da2d316a}\label{a08492_a99e7a077d711bf8d7ee45ae0da2d316a}} 
void {\bfseries read\+Value} (std\+::istream \&\+\_\+in, unsigned int \&\+\_\+value) const
\item 
\mbox{\Hypertarget{a08492_a23e4fd7d0686346657b83810e01d66fa}\label{a08492_a23e4fd7d0686346657b83810e01d66fa}} 
int {\bfseries get\+Color\+Type} (std\+::string \&\+\_\+line, bool \+\_\+tex\+Coords\+Available) const
\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a08492_a3c01b93bf3f3a077d8dd2a069c839224}\label{a08492_a3c01b93bf3f3a077d8dd2a069c839224}} 
\hyperlink{a08480}{Options} {\bfseries options\+\_\+}
\item 
\mbox{\Hypertarget{a08492_a3e230068dc4ccc4f7fcf6ca483cfffc6}\label{a08492_a3e230068dc4ccc4f7fcf6ca483cfffc6}} 
\hyperlink{a08480}{Options} {\bfseries user\+Options\+\_\+}
\end{DoxyCompactItemize}
\subsection*{Additional Inherited Members}


\subsection{Detailed Description}
Implementation of the O\+FF format reader. This class is singleton\textquotesingle{}ed by \hyperlink{a08912}{SingletonT} to O\+F\+F\+Reader.

By passing \hyperlink{a08480}{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 112 of file O\+F\+F\+Reader.\+hh.



\subsection{Member Function Documentation}
\mbox{\Hypertarget{a08492_abbe833299f79b23de4bf4c1bf1580713}\label{a08492_abbe833299f79b23de4bf4c1bf1580713}} 
\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{\texorpdfstring{can\+\_\+u\+\_\+read()}{can\_u\_read()}}
{\footnotesize\ttfamily 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]}}



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{a08484_accf5c3edc6b4f628d0a696c7d10fc475}{Open\+Mesh\+::\+I\+O\+::\+Base\+Reader}.



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

\mbox{\Hypertarget{a08492_a36bf8b125fad9000bf91c99267e09420}\label{a08492_a36bf8b125fad9000bf91c99267e09420}} 
\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{\texorpdfstring{get\+\_\+extensions()}{get\_extensions()}}
{\footnotesize\ttfamily std\+::string Open\+Mesh\+::\+I\+O\+::\+\_\+\+O\+F\+F\+Reader\+\_\+\+::get\+\_\+extensions (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}

Returns a string with the accepted file extensions separated by a whitespace and in small caps. 

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



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

\mbox{\Hypertarget{a08492_ae6abbcd58b42708cdaf454a92a8e42c3}\label{a08492_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{\texorpdfstring{read()}{read()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily bool Open\+Mesh\+::\+I\+O\+::\+\_\+\+O\+F\+F\+Reader\+\_\+\+::read (\begin{DoxyParamCaption}\item[{const std\+::string \&}]{\+\_\+filename,  }\item[{\hyperlink{a08468}{Base\+Importer} \&}]{\+\_\+bi,  }\item[{\hyperlink{a08480}{Options} \&}]{\+\_\+opt }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}

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{a08480}{Options} can be passed via \+\_\+opt. After execution \+\_\+opt contains the \hyperlink{a08480}{Options} that were available 

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



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

\mbox{\Hypertarget{a08492_aa94f52dc263700daa126a32ec1018e2f}\label{a08492_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{\texorpdfstring{read()}{read()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily bool Open\+Mesh\+::\+I\+O\+::\+\_\+\+O\+F\+F\+Reader\+\_\+\+::read (\begin{DoxyParamCaption}\item[{std\+::istream \&}]{\+\_\+is,  }\item[{\hyperlink{a08468}{Base\+Importer} \&}]{\+\_\+bi,  }\item[{\hyperlink{a08480}{Options} \&}]{\+\_\+opt }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}

Reads a mesh given by a std\+::stream. This method usually uses the same stream reading method that read uses. \hyperlink{a08480}{Options} can be passed via \+\_\+opt. After execution \+\_\+opt contains the \hyperlink{a08480}{Options} that were available.

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

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



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



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