This file is indexed.

/usr/share/doc/libassimp-doc/apiref/usage.html is in libassimp-doc 3.0~dfsg-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>Assimp: Usage</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Assimp
   &#160;<span id="projectnumber">v2.0 (November 2010)</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">Usage </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><h1><a class="anchor" id="access_cpp"></a>
Access by C++ class interface</h1>
<p>The assimp library can be accessed by both a class or flat function interface. The C++ class interface is the preferred way of interaction: you create an instance of class <a class="el" href="class_assimp_1_1_importer.html" title="CPP-API: The Importer class forms an C++ interface to the functionality of the Open Asset Import Libr...">Assimp::Importer</a>, maybe adjust some settings of it and then call <a class="el" href="class_assimp_1_1_importer.html#a174418ab41d5b8bc51a044895cb991e5" title="Reads the given file and returns its contents if successful. ">Assimp::Importer::ReadFile()</a>. The class will read the files and process its data, handing back the imported data as a pointer to an aiScene to you. You can now extract the data you need from the file. The importer manages all the resources for itsself. If the importer is destroyed, all the data that was created/read by it will be destroyed, too. So the easiest way to use the Importer is to create an instance locally, use its results and then simply let it go out of scope.</p>
<p>C++ example: </p>
<div class="fragment"><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="_importer_8hpp.html">assimp/Importer.hpp</a>&gt;</span>      <span class="comment">// C++ importer interface</span></div>
<div class="line"><span class="preprocessor">#include &lt;<a class="code" href="scene_8h.html">assimp/scene.h</a>&gt;</span>           <span class="comment">// Output data structure</span></div>
<div class="line"><span class="preprocessor">#include &lt;<a class="code" href="postprocess_8h.html">assimp/postprocess.h</a>&gt;</span>     <span class="comment">// Post processing flags</span></div>
<div class="line"></div>
<div class="line"><span class="keywordtype">bool</span> DoTheImportThing( <span class="keyword">const</span> std::string&amp; pFile)</div>
<div class="line">{</div>
<div class="line">  <span class="comment">// Create an instance of the Importer class</span></div>
<div class="line">  <a class="code" href="class_assimp_1_1_importer.html">Assimp::Importer</a> importer;</div>
<div class="line"></div>
<div class="line">  <span class="comment">// And have it read the given file with some example postprocessing</span></div>
<div class="line">  <span class="comment">// Usually - if speed is not the most important aspect for you - you&#39;ll </span></div>
<div class="line">  <span class="comment">// propably to request more postprocessing than we do in this example.</span></div>
<div class="line">  <span class="keyword">const</span> aiScene* scene = importer.<a class="code" href="class_assimp_1_1_importer.html#a174418ab41d5b8bc51a044895cb991e5">ReadFile</a>( pFile, </div>
<div class="line">        <a class="code" href="postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410a8857a0e30688127a82c7b8939958c6dc">aiProcess_CalcTangentSpace</a>       | </div>
<div class="line">        <a class="code" href="postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410a9c3de834f0307f31fa2b1b6d05dd592b">aiProcess_Triangulate</a>            |</div>
<div class="line">        <a class="code" href="postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410a444a6c9d8b63e6dc9e1e2e1edd3cbcd4">aiProcess_JoinIdenticalVertices</a>  |</div>
<div class="line">        <a class="code" href="postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410ab4484f73635d633cd79973bac1431ed6">aiProcess_SortByPType</a>);</div>
<div class="line">  </div>
<div class="line">  <span class="comment">// If the import failed, report it</span></div>
<div class="line">  <span class="keywordflow">if</span>( !scene)</div>
<div class="line">  {</div>
<div class="line">    DoTheErrorLogging( importer.<a class="code" href="class_assimp_1_1_importer.html#a23bab5ba8cb9b6886c690a610766668b">GetErrorString</a>());</div>
<div class="line">    <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line">  }</div>
<div class="line"></div>
<div class="line">  <span class="comment">// Now we can access the file&#39;s contents. </span></div>
<div class="line">  DoTheSceneProcessing( scene);</div>
<div class="line"></div>
<div class="line">  <span class="comment">// We&#39;re done. Everything will be cleaned up by the importer destructor</span></div>
<div class="line">  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line">}</div>
</div><!-- fragment --><p>What exactly is read from the files and how you interpret it is described at the <a class="el" href="data.html">Data Structures</a> page.  The post processing steps that the assimp library can apply to the imported data are listed at <a class="el" href="postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410" title="Defines the flags for all possible post processing steps. ">aiPostProcessSteps</a>. See the pp Post proccessing page for more details.</p>
<p>Note that the aiScene data structure returned is declared 'const'. Yes, you can get rid of these 5 letters with a simple cast. Yes, you may do that. No, it's not recommended (and it's suicide in DLL builds if you try to use new or delete on any of the arrays in the scene).</p>
<h1><a class="anchor" id="access_c"></a>
Access by plain-c function interface</h1>
<p>The plain function interface is just as simple, but requires you to manually call the clean-up after you're done with the imported data. To start the import process, call <a class="el" href="cimport_8h.html#a09fe8ba0c8e91bf04b4c29556be53b6d" title="Reads the given file and returns its content. ">aiImportFile()</a> with the filename in question and the desired postprocessing flags like above. If the call is successful, an aiScene pointer with the imported data is handed back to you. When you're done with the extraction of the data you're interested in, call <a class="el" href="cimport_8h.html#a00a8db599403d4972ce70d97b9219080" title="Releases all resources associated with the given import process. ">aiReleaseImport()</a> on the imported scene to clean up all resources associated with the import.</p>
<p>C example: </p>
<div class="fragment"><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="cimport_8h.html">assimp/cimport.h</a>&gt;</span>        <span class="comment">// Plain-C interface</span></div>
<div class="line"><span class="preprocessor">#include &lt;<a class="code" href="scene_8h.html">assimp/scene.h</a>&gt;</span>          <span class="comment">// Output data structure</span></div>
<div class="line"><span class="preprocessor">#include &lt;<a class="code" href="postprocess_8h.html">assimp/postprocess.h</a>&gt;</span>    <span class="comment">// Post processing flags</span></div>
<div class="line"></div>
<div class="line"><span class="keywordtype">bool</span> DoTheImportThing( <span class="keyword">const</span> <span class="keywordtype">char</span>* pFile)</div>
<div class="line">{</div>
<div class="line">  <span class="comment">// Start the import on the given file with some example postprocessing</span></div>
<div class="line">  <span class="comment">// Usually - if speed is not the most important aspect for you - you&#39;ll t</span></div>
<div class="line">  <span class="comment">// probably to request more postprocessing than we do in this example.</span></div>
<div class="line">  <span class="keyword">const</span> aiScene* scene = <a class="code" href="cimport_8h.html#a09fe8ba0c8e91bf04b4c29556be53b6d">aiImportFile</a>( pFile, </div>
<div class="line">    <a class="code" href="postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410a8857a0e30688127a82c7b8939958c6dc">aiProcess_CalcTangentSpace</a>       | </div>
<div class="line">        <a class="code" href="postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410a9c3de834f0307f31fa2b1b6d05dd592b">aiProcess_Triangulate</a>            |</div>
<div class="line">        <a class="code" href="postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410a444a6c9d8b63e6dc9e1e2e1edd3cbcd4">aiProcess_JoinIdenticalVertices</a>  |</div>
<div class="line">        <a class="code" href="postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410ab4484f73635d633cd79973bac1431ed6">aiProcess_SortByPType</a>);</div>
<div class="line"></div>
<div class="line">  <span class="comment">// If the import failed, report it</span></div>
<div class="line">  <span class="keywordflow">if</span>( !scene)</div>
<div class="line">  {</div>
<div class="line">    DoTheErrorLogging( <a class="code" href="cimport_8h.html#abe72551b74cc4bc3c49349ce3014bc9b">aiGetErrorString</a>());</div>
<div class="line">    <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line">  }</div>
<div class="line"></div>
<div class="line">  <span class="comment">// Now we can access the file&#39;s contents</span></div>
<div class="line">  DoTheSceneProcessing( scene);</div>
<div class="line"></div>
<div class="line">  <span class="comment">// We&#39;re done. Release all resources associated with this import</span></div>
<div class="line">  <a class="code" href="cimport_8h.html#a00a8db599403d4972ce70d97b9219080">aiReleaseImport</a>( scene);</div>
<div class="line">  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line">}</div>
</div><!-- fragment --><h1><a class="anchor" id="custom_io"></a>
Using custom IO logic with the C++ class interface</h1>
<p>The assimp library needs to access files internally. This of course applies to the file you want to read, but also to additional files in the same folder for certain file formats. By default, standard C/C++ IO logic is used to access these files. If your application works in a special environment where custom logic is needed to access the specified files, you have to supply custom implementations of IOStream and IOSystem. A shortened example might look like this:</p>
<div class="fragment"><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="_i_o_stream_8hpp.html">assimp/IOStream.hpp</a>&gt;</span></div>
<div class="line"><span class="preprocessor">#include &lt;<a class="code" href="_i_o_system_8hpp.html">assimp/IOSystem.hpp</a>&gt;</span></div>
<div class="line"></div>
<div class="line"><span class="comment">// My own implementation of IOStream</span></div>
<div class="line"><span class="keyword">class </span>MyIOStream : <span class="keyword">public</span> <a class="code" href="class_assimp_1_1_i_o_stream.html">Assimp::IOStream</a></div>
<div class="line">{</div>
<div class="line">  <span class="keyword">friend</span> <span class="keyword">class </span>MyIOSystem;</div>
<div class="line"></div>
<div class="line"><span class="keyword">protected</span>:</div>
<div class="line">  <span class="comment">// Constructor protected for private usage by MyIOSystem</span></div>
<div class="line">  MyIOStream(<span class="keywordtype">void</span>);</div>
<div class="line"></div>
<div class="line"><span class="keyword">public</span>:</div>
<div class="line">  ~MyIOStream(<span class="keywordtype">void</span>);</div>
<div class="line">  <span class="keywordtype">size_t</span> <a class="code" href="class_assimp_1_1_i_o_stream.html#ae376f641020989d61863b9c6f55c7abf">Read</a>( <span class="keywordtype">void</span>* pvBuffer, <span class="keywordtype">size_t</span> pSize, <span class="keywordtype">size_t</span> pCount) { ... }</div>
<div class="line">  <span class="keywordtype">size_t</span> <a class="code" href="class_assimp_1_1_i_o_stream.html#ad0ca4aae1b8c4d00db391ac3a4171f7b">Write</a>( <span class="keyword">const</span> <span class="keywordtype">void</span>* pvBuffer, <span class="keywordtype">size_t</span> pSize, <span class="keywordtype">size_t</span> pCount) { ... }</div>
<div class="line">  aiReturn <a class="code" href="class_assimp_1_1_i_o_stream.html#a5ed0dddf418ab08cf3fc21f3f3032220">Seek</a>( <span class="keywordtype">size_t</span> pOffset, aiOrigin pOrigin) { ... }</div>
<div class="line">  <span class="keywordtype">size_t</span> <a class="code" href="class_assimp_1_1_i_o_stream.html#a316ac6cd16b5a493d1313f792c806194">Tell</a>()<span class="keyword"> const </span>{ ... }</div>
<div class="line">  <span class="keywordtype">size_t</span> <a class="code" href="class_assimp_1_1_i_o_stream.html#aaa01183d197fb714f28d6c611b6fa058">FileSize</a>()<span class="keyword"> const </span>{ ... }</div>
<div class="line">  <span class="keywordtype">void</span> <a class="code" href="class_assimp_1_1_i_o_stream.html#a7c19952446ece90924b246f087417899">Flush</a> () { ... }</div>
<div class="line">};</div>
<div class="line"></div>
<div class="line"><span class="comment">// Fisher Price - My First Filesystem</span></div>
<div class="line"><span class="keyword">class </span>MyIOSystem : <span class="keyword">public</span> <a class="code" href="class_assimp_1_1_i_o_system.html">Assimp::IOSystem</a></div>
<div class="line">{</div>
<div class="line">  MyIOSystem() { ... }</div>
<div class="line">  ~MyIOSystem() { ... }</div>
<div class="line"></div>
<div class="line">  <span class="comment">// Check whether a specific file exists</span></div>
<div class="line">  <span class="keywordtype">bool</span> <a class="code" href="class_assimp_1_1_i_o_system.html#a7ae6cfaea4957408967463bfc3b84b27">Exists</a>( <span class="keyword">const</span> std::string&amp; pFile)<span class="keyword"> const </span>{</div>
<div class="line">    .. </div>
<div class="line">  }</div>
<div class="line"></div>
<div class="line">  <span class="comment">// Get the path delimiter character we&#39;d like to see</span></div>
<div class="line">  <span class="keywordtype">char</span> GetOsSeparator()<span class="keyword"> const </span>{ </div>
<div class="line">    <span class="keywordflow">return</span> <span class="charliteral">&#39;/&#39;</span>; </div>
<div class="line">  }</div>
<div class="line"></div>
<div class="line">  <span class="comment">// ... and finally a method to open a custom stream</span></div>
<div class="line">  IOStream* <a class="code" href="class_assimp_1_1_i_o_system.html#ac512ece3b0701de5682553007a4c0816">Open</a>( <span class="keyword">const</span> std::string&amp; pFile, <span class="keyword">const</span> std::string&amp; pMode) {</div>
<div class="line">        <span class="keywordflow">return</span> <span class="keyword">new</span> MyIOStream( ... ); </div>
<div class="line">  }</div>
<div class="line"></div>
<div class="line">  <span class="keywordtype">void</span> <a class="code" href="class_assimp_1_1_i_o_system.html#a8c334d60f04bceeb6bd0157d21723f3e">Close</a>( IOStream* pFile) { <span class="keyword">delete</span> pFile; }</div>
<div class="line">};</div>
</div><!-- fragment --><p>Now that your IO system is implemented, supply an instance of it to the Importer object by calling <a class="el" href="class_assimp_1_1_importer.html#a1161f46318af18bb86dfe0fc3edea4df" title="Supplies a custom IO handler to the importer to use to open and access files. ">Assimp::Importer::SetIOHandler()</a>.</p>
<div class="fragment"><div class="line"><span class="keywordtype">void</span> DoTheImportThing( <span class="keyword">const</span> std::string&amp; pFile)</div>
<div class="line">{</div>
<div class="line">  <a class="code" href="class_assimp_1_1_importer.html">Assimp::Importer</a> importer;</div>
<div class="line">  <span class="comment">// put my custom IO handling in place</span></div>
<div class="line">  importer.<a class="code" href="class_assimp_1_1_importer.html#a1161f46318af18bb86dfe0fc3edea4df">SetIOHandler</a>( <span class="keyword">new</span> MyIOSystem());</div>
<div class="line"></div>
<div class="line">  <span class="comment">// the import process will now use this implementation to access any file</span></div>
<div class="line">  importer.<a class="code" href="class_assimp_1_1_importer.html#a174418ab41d5b8bc51a044895cb991e5">ReadFile</a>( pFile, SomeFlag | SomeOtherFlag);</div>
<div class="line">}</div>
</div><!-- fragment --><h1><a class="anchor" id="custom_io_c"></a>
Using custom IO logic with the plain-c function interface</h1>
<p>The C interface also provides a way to override the file system. Control is not as fine-grained as for C++ although surely enough for almost any purpose. The process is simple:</p>
<ul>
<li>
Include <a class="el" href="cfileio_8h.html">cfileio.h</a> </li>
<li>
Fill an <a class="el" href="structai_file_i_o.html" title="C-API: File system callbacks. ">aiFileIO</a> structure with custom file system callbacks (they're self-explanatory as they work similar to the CRT's fXXX functions) </li>
<li>
.. and pass it as parameter to <a class="el" href="cimport_8h.html#ae2b9815cac53dfcb2bf09aa9d8649894" title="Reads the given file using user-defined I/O functions and returns its content. ">aiImportFileEx</a> </li>
</ul>
<h1><a class="anchor" id="logging"></a>
Logging</h1>
<p>The assimp library provides an easy mechanism to log messages. For instance if you want to check the state of your import and you just want to see, after which preprocessing step the import-process was aborted you can take a look into the log. Per default the assimp-library provides a default log implementation, where you can log your user specific message by calling it as a singleton with the requested logging-type. To see how this works take a look to this:</p>
<div class="fragment"><div class="line"><span class="keyword">using namespace </span>Assimp;</div>
<div class="line"></div>
<div class="line"><span class="comment">// Create a logger instance </span></div>
<div class="line"><a class="code" href="class_assimp_1_1_default_logger.html#adccb11f85f8b0ef226c382e11ba665c3">DefaultLogger::create</a>(<span class="stringliteral">&quot;&quot;</span>,<a class="code" href="class_assimp_1_1_logger.html#a8b6248a0fd062431e8572556350d29e6afc9d1d86aa82fdb80e00c99b3c1ce486">Logger::VERBOSE</a>);</div>
<div class="line"></div>
<div class="line"><span class="comment">// Now I am ready for logging my stuff</span></div>
<div class="line"><a class="code" href="class_assimp_1_1_default_logger.html#a7d0a53f2db66945ade30094330a77ba4">DefaultLogger::get</a>()-&gt;<a class="code" href="class_assimp_1_1_logger.html#a12b8a125083c47ac0bb6056f00761e52">info</a>(<span class="stringliteral">&quot;this is my info-call&quot;</span>);</div>
<div class="line"></div>
<div class="line"><span class="comment">// Kill it after the work is done</span></div>
<div class="line"><a class="code" href="class_assimp_1_1_default_logger.html#a0b1da096d7442af5a4a4cb5ebb2540f7">DefaultLogger::kill</a>();</div>
</div><!-- fragment --><p>At first you have to create the default-logger-instance (create). Now you are ready to rock and can log a little bit around. After that you should kill it to release the singleton instance.</p>
<p>If you want to integrate the assimp-log into your own GUI it my be helpful to have a mechanism writing the logs into your own log windows. The logger interface provides this by implementing an interface called LogStream. You can attach and detach this log stream to the default-logger instance or any implementation derived from Logger. Just derivate your own logger from the abstract base class LogStream and overwrite the write-method:</p>
<div class="fragment"><div class="line"><span class="comment">// Example stream</span></div>
<div class="line"><span class="keyword">class </span>myStream :</div>
<div class="line">        <span class="keyword">public</span> LogStream</div>
<div class="line">{</div>
<div class="line"><span class="keyword">public</span>:</div>
<div class="line">        <span class="comment">// Constructor</span></div>
<div class="line">        myStream()</div>
<div class="line">        {</div>
<div class="line">                <span class="comment">// empty</span></div>
<div class="line">        }</div>
<div class="line">        </div>
<div class="line">        <span class="comment">// Destructor</span></div>
<div class="line">        ~myStream()</div>
<div class="line">        {</div>
<div class="line">                <span class="comment">// empty</span></div>
<div class="line">        }</div>
<div class="line"></div>
<div class="line">        <span class="comment">// Write womethink using your own functionality</span></div>
<div class="line">        <span class="keywordtype">void</span> write(<span class="keyword">const</span> <span class="keywordtype">char</span>* message)</div>
<div class="line">        {</div>
<div class="line">                ::printf(<span class="stringliteral">&quot;%s\n&quot;</span>, message);</div>
<div class="line">        }</div>
<div class="line">};</div>
<div class="line"></div>
<div class="line"><span class="comment">// Select the kinds of messages you want to receive on this log stream</span></div>
<div class="line"><span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> severity = Logger::DEBUGGING|Logger::INFO|Logger::ERR|Logger::WARN;</div>
<div class="line"></div>
<div class="line"><span class="comment">// Attaching it to the default logger</span></div>
<div class="line"><a class="code" href="class_assimp_1_1_default_logger.html#a7d0a53f2db66945ade30094330a77ba4">Assimp::DefaultLogger::get</a>()-&gt;<a class="code" href="class_assimp_1_1_logger.html#aaf32a42b02a7e227076013d01e349871">attachStream</a>( <span class="keyword">new</span> myStream(), severity );</div>
</div><!-- fragment --><p>The severity level controls the kind of message which will be written into the attached stream. If you just want to log errors and warnings set the warn and error severity flag for those severities. It is also possible to remove a self defined logstream from an error severity by detaching it with the severity flag set:</p>
<div class="fragment"><div class="line"><span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> severity = 0;</div>
<div class="line">severity |= Logger::DEBUGGING;</div>
<div class="line"></div>
<div class="line"><span class="comment">// Detach debug messages from you self defined stream</span></div>
<div class="line"><a class="code" href="class_assimp_1_1_default_logger.html#a7d0a53f2db66945ade30094330a77ba4">Assimp::DefaultLogger::get</a>()-&gt;<a class="code" href="class_assimp_1_1_logger.html#aaf32a42b02a7e227076013d01e349871">attachStream</a>( <span class="keyword">new</span> myStream(), severity );</div>
</div><!-- fragment --><p>If you want to implement your own logger just derive from the abstract base class #Logger and overwrite the methods debug, info, warn and error.</p>
<p>If you want to see the debug-messages in a debug-configured build, the Logger-interface provides a logging-severity. You can set it calling the following method:</p>
<div class="fragment"><div class="line"><a class="code" href="class_assimp_1_1_default_logger.html#a7d0a53f2db66945ade30094330a77ba4">Assimp::DefaultLogger::get</a>()-&gt;<a class="code" href="class_assimp_1_1_logger.html#a8fb4fa4c2c329a36ac39bc9c743925f1">setLogSeverity</a>( LogSeverity log_severity );</div>
</div><!-- fragment --><p>The normal logging severity supports just the basic stuff like, info, warnings and errors. In the verbose level very fine-grained debug messages will be logged, too. Note that this kind kind of logging might decrease import performance. </p>
</div></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu May 15 2014 08:42:41 for Assimp by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.6
</small></address>
</body>
</html>