aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-model.html
diff options
context:
space:
mode:
Diffstat (limited to 'src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-model.html')
-rw-r--r--src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-model.html438
1 files changed, 438 insertions, 0 deletions
diff --git a/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-model.html b/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-model.html
new file mode 100644
index 0000000..3c28b34
--- /dev/null
+++ b/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-model.html
@@ -0,0 +1,438 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3<head>
4<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5<title>model</title>
6<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
7<link rel="start" href="index.html" title="libg3d Reference Manual">
8<link rel="up" href="ch01.html" title="Application interface">
9<link rel="prev" href="libg3d-context.html" title="context">
10<link rel="next" href="libg3d-object.html" title="object">
11<meta name="generator" content="GTK-Doc V1.10 (XML mode)">
12<link rel="stylesheet" href="style.css" type="text/css">
13<link rel="chapter" href="ch01.html" title="Application interface">
14<link rel="chapter" href="ch02.html" title="Plugin interface">
15</head>
16<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
17<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
18<tr valign="middle">
19<td><a accesskey="p" href="libg3d-context.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
20<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
21<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
22<th width="100%" align="center">libg3d Reference Manual</th>
23<td><a accesskey="n" href="libg3d-object.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
24</tr>
25<tr><td colspan="5" class="shortcuts"><nobr><a href="#libg3d-model.synopsis" class="shortcut">Top</a>
26  | 
27 <a href="#libg3d-model.description" class="shortcut">Description</a></nobr></td></tr>
28</table>
29<div class="refentry" lang="en">
30<a name="libg3d-model"></a><div class="titlepage"></div>
31<div class="refnamediv"><table width="100%"><tr>
32<td valign="top">
33<h2><span class="refentrytitle"><a name="libg3d-model.top_of_page"></a>model</span></h2>
34<p>model — Model manipulation functions</p>
35</td>
36<td valign="top" align="right"></td>
37</tr></table></div>
38<div class="refsynopsisdiv">
39<a name="libg3d-model.synopsis"></a><h2>Synopsis</h2>
40<pre class="synopsis">
41
42#include &lt;g3d/g3d.h&gt;
43
44#define <a class="link" href="libg3d-model.html#G3D-MODEL-CENTER:CAPS" title="G3D_MODEL_CENTER">G3D_MODEL_CENTER</a>
45#define <a class="link" href="libg3d-model.html#G3D-MODEL-NOCHECK:CAPS" title="G3D_MODEL_NOCHECK">G3D_MODEL_NOCHECK</a>
46#define <a class="link" href="libg3d-model.html#G3D-MODEL-OPTIMIZE:CAPS" title="G3D_MODEL_OPTIMIZE">G3D_MODEL_OPTIMIZE</a>
47#define <a class="link" href="libg3d-model.html#G3D-MODEL-SCALE:CAPS" title="G3D_MODEL_SCALE">G3D_MODEL_SCALE</a>
48 <a class="link" href="libg3d-model.html#G3DModel" title="G3DModel">G3DModel</a>;
49<a class="link" href="libg3d-model.html#G3DModel" title="G3DModel">G3DModel</a>* <a class="link" href="libg3d-model.html#g3d-model-new" title="g3d_model_new ()">g3d_model_new</a> (void);
50<a class="link" href="libg3d-model.html#G3DModel" title="G3DModel">G3DModel</a>* <a class="link" href="libg3d-model.html#g3d-model-load" title="g3d_model_load ()">g3d_model_load</a> (<a class="link" href="libg3d-context.html#G3DContext" title="G3DContext">G3DContext</a> *context,
51 const <a
52href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
53>gchar</a> *filename);
54<a class="link" href="libg3d-model.html#G3DModel" title="G3DModel">G3DModel</a>* <a class="link" href="libg3d-model.html#g3d-model-load-full" title="g3d_model_load_full ()">g3d_model_load_full</a> (<a class="link" href="libg3d-context.html#G3DContext" title="G3DContext">G3DContext</a> *context,
55 const <a
56href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
57>gchar</a> *filename,
58 <a
59href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
60>guint32</a> flags);
61<a
62href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
63>gboolean</a> <a class="link" href="libg3d-model.html#g3d-model-check" title="g3d_model_check ()">g3d_model_check</a> (<a class="link" href="libg3d-model.html#G3DModel" title="G3DModel">G3DModel</a> *model);
64<a
65href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
66>gboolean</a> <a class="link" href="libg3d-model.html#g3d-model-center" title="g3d_model_center ()">g3d_model_center</a> (<a class="link" href="libg3d-model.html#G3DModel" title="G3DModel">G3DModel</a> *model);
67<a
68href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
69>gboolean</a> <a class="link" href="libg3d-model.html#g3d-model-transform" title="g3d_model_transform ()">g3d_model_transform</a> (<a class="link" href="libg3d-model.html#G3DModel" title="G3DModel">G3DModel</a> *model,
70 <a class="link" href="libg3d-matrix.html#G3DMatrix" title="G3DMatrix">G3DMatrix</a> *matrix);
71void <a class="link" href="libg3d-model.html#g3d-model-clear" title="g3d_model_clear ()">g3d_model_clear</a> (<a class="link" href="libg3d-model.html#G3DModel" title="G3DModel">G3DModel</a> *model);
72void <a class="link" href="libg3d-model.html#g3d-model-free" title="g3d_model_free ()">g3d_model_free</a> (<a class="link" href="libg3d-model.html#G3DModel" title="G3DModel">G3DModel</a> *model);
73<a class="link" href="libg3d-object.html#G3DObject" title="G3DObject">G3DObject</a>* <a class="link" href="libg3d-model.html#g3d-model-get-object-by-name" title="g3d_model_get_object_by_name ()">g3d_model_get_object_by_name</a> (<a class="link" href="libg3d-model.html#G3DModel" title="G3DModel">G3DModel</a> *model,
74 const <a
75href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
76>gchar</a> *name);
77</pre>
78</div>
79<div class="refsect1" lang="en">
80<a name="libg3d-model.description"></a><h2>Description</h2>
81<p>
82A model is a group of objects. All information loaded from a file by libg3d
83is found in this model.</p>
84<p>
85
86</p>
87</div>
88<div class="refsect1" lang="en">
89<a name="libg3d-model.details"></a><h2>Details</h2>
90<div class="refsect2" lang="en">
91<a name="G3D-MODEL-CENTER:CAPS"></a><h3>G3D_MODEL_CENTER</h3>
92<pre class="programlisting">#define G3D_MODEL_CENTER (1 &lt;&lt; 1)
93</pre>
94<p>
95The model should be centered around the (0,0,0).</p>
96<p>
97
98</p>
99</div>
100<hr>
101<div class="refsect2" lang="en">
102<a name="G3D-MODEL-NOCHECK:CAPS"></a><h3>G3D_MODEL_NOCHECK</h3>
103<pre class="programlisting">#define G3D_MODEL_NOCHECK (1 &lt;&lt; 3)
104</pre>
105<p>
106The common checks should be disabled. The checks include:
107</p>
108<div class="itemizedlist"><ul type="disc">
109<li>faces have at least 3 indices</li>
110<li>face indices are &lt;= number of vertices</li>
111<li>material of faces is not NULL</li>
112</ul></div>
113<p>
114
115</p>
116</div>
117<hr>
118<div class="refsect2" lang="en">
119<a name="G3D-MODEL-OPTIMIZE:CAPS"></a><h3>G3D_MODEL_OPTIMIZE</h3>
120<pre class="programlisting">#define G3D_MODEL_OPTIMIZE (1 &lt;&lt; 2)
121</pre>
122<p>
123The model material/object/face lists should be serialized to some private
124arrays (deprecated).</p>
125<p>
126
127</p>
128</div>
129<hr>
130<div class="refsect2" lang="en">
131<a name="G3D-MODEL-SCALE:CAPS"></a><h3>G3D_MODEL_SCALE</h3>
132<pre class="programlisting">#define G3D_MODEL_SCALE (1 &lt;&lt; 0)
133</pre>
134<p>
135The model should be scaled to a maximum extension of +/- 10.0.</p>
136<p>
137
138</p>
139</div>
140<hr>
141<div class="refsect2" lang="en">
142<a name="G3DModel"></a><h3>G3DModel</h3>
143<pre class="programlisting">typedef struct {
144 gchar *filename;
145 GSList *materials;
146 GSList *objects;
147} G3DModel;
148</pre>
149<p>
150A 3D model.</p>
151<p>
152
153</p>
154<div class="variablelist"><table border="0">
155<col align="left" valign="top">
156<tbody>
157<tr>
158<td><p><span class="term"><a
159href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
160>gchar</a> *<em class="structfield"><code>filename</code></em>;</span></p></td>
161<td> file name or URI of loaded model, may be set by application
162</td>
163</tr>
164<tr>
165<td><p><span class="term"><a
166href="/usr/share/gtk-doc/html/glib/glib-Singly-Linked-Lists.html#GSList"
167>GSList</a> *<em class="structfield"><code>materials</code></em>;</span></p></td>
168<td> list of materials (<a class="link" href="libg3d-material.html#G3DMaterial" title="G3DMaterial"><span class="type">G3DMaterial</span></a>)
169</td>
170</tr>
171<tr>
172<td><p><span class="term"><a
173href="/usr/share/gtk-doc/html/glib/glib-Singly-Linked-Lists.html#GSList"
174>GSList</a> *<em class="structfield"><code>objects</code></em>;</span></p></td>
175<td> list of objects (<a class="link" href="libg3d-object.html#G3DObject" title="G3DObject"><span class="type">G3DObject</span></a>)
176</td>
177</tr>
178</tbody>
179</table></div>
180</div>
181<hr>
182<div class="refsect2" lang="en">
183<a name="g3d-model-new"></a><h3>g3d_model_new ()</h3>
184<pre class="programlisting"><a class="link" href="libg3d-model.html#G3DModel" title="G3DModel">G3DModel</a>* g3d_model_new (void);</pre>
185<p>
186This functions allocates and initializes a new G3DModel.</p>
187<p>
188
189</p>
190<div class="variablelist"><table border="0">
191<col align="left" valign="top">
192<tbody><tr>
193<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
194<td> a newly allocated G3DModel
195</td>
196</tr></tbody>
197</table></div>
198</div>
199<hr>
200<div class="refsect2" lang="en">
201<a name="g3d-model-load"></a><h3>g3d_model_load ()</h3>
202<pre class="programlisting"><a class="link" href="libg3d-model.html#G3DModel" title="G3DModel">G3DModel</a>* g3d_model_load (<a class="link" href="libg3d-context.html#G3DContext" title="G3DContext">G3DContext</a> *context,
203 const <a
204href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
205>gchar</a> *filename);</pre>
206<p>
207Loads a model from a file. The model is checked, centered, resized,
208optimized.</p>
209<p>
210
211</p>
212<div class="variablelist"><table border="0">
213<col align="left" valign="top">
214<tbody>
215<tr>
216<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
217<td> a valid context
218</td>
219</tr>
220<tr>
221<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
222<td> the file name of the model to load
223</td>
224</tr>
225<tr>
226<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
227<td> the loaded model or NULL in case of an error
228</td>
229</tr>
230</tbody>
231</table></div>
232</div>
233<hr>
234<div class="refsect2" lang="en">
235<a name="g3d-model-load-full"></a><h3>g3d_model_load_full ()</h3>
236<pre class="programlisting"><a class="link" href="libg3d-model.html#G3DModel" title="G3DModel">G3DModel</a>* g3d_model_load_full (<a class="link" href="libg3d-context.html#G3DContext" title="G3DContext">G3DContext</a> *context,
237 const <a
238href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
239>gchar</a> *filename,
240 <a
241href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
242>guint32</a> flags);</pre>
243<p>
244Loads a model from a file. Depending on <em class="parameter"><code>flags</code></em> the model is checked,
245centered, resized, optimized.</p>
246<p>
247
248</p>
249<div class="variablelist"><table border="0">
250<col align="left" valign="top">
251<tbody>
252<tr>
253<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
254<td> a valid context
255</td>
256</tr>
257<tr>
258<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
259<td> the file name of the model to load
260</td>
261</tr>
262<tr>
263<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
264<td> object manipulation flags
265</td>
266</tr>
267<tr>
268<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
269<td> the loaded model or NULL in case of an error.
270</td>
271</tr>
272</tbody>
273</table></div>
274</div>
275<hr>
276<div class="refsect2" lang="en">
277<a name="g3d-model-check"></a><h3>g3d_model_check ()</h3>
278<pre class="programlisting"><a
279href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
280>gboolean</a> g3d_model_check (<a class="link" href="libg3d-model.html#G3DModel" title="G3DModel">G3DModel</a> *model);</pre>
281<p>
282Checks whether a model returned by plugin is valid.</p>
283<p>
284
285</p>
286<div class="variablelist"><table border="0">
287<col align="left" valign="top">
288<tbody>
289<tr>
290<td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td>
291<td> the model to check
292</td>
293</tr>
294<tr>
295<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
296<td> TRUE on success, FALSE on error
297</td>
298</tr>
299</tbody>
300</table></div>
301</div>
302<hr>
303<div class="refsect2" lang="en">
304<a name="g3d-model-center"></a><h3>g3d_model_center ()</h3>
305<pre class="programlisting"><a
306href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
307>gboolean</a> g3d_model_center (<a class="link" href="libg3d-model.html#G3DModel" title="G3DModel">G3DModel</a> *model);</pre>
308<p>
309Translates all object coordinates that the object center is at (0, 0, 0)</p>
310<p>
311
312</p>
313<div class="variablelist"><table border="0">
314<col align="left" valign="top">
315<tbody>
316<tr>
317<td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td>
318<td> the model to center
319</td>
320</tr>
321<tr>
322<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
323<td> TRUE on success, FALSE on error
324</td>
325</tr>
326</tbody>
327</table></div>
328</div>
329<hr>
330<div class="refsect2" lang="en">
331<a name="g3d-model-transform"></a><h3>g3d_model_transform ()</h3>
332<pre class="programlisting"><a
333href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
334>gboolean</a> g3d_model_transform (<a class="link" href="libg3d-model.html#G3DModel" title="G3DModel">G3DModel</a> *model,
335 <a class="link" href="libg3d-matrix.html#G3DMatrix" title="G3DMatrix">G3DMatrix</a> *matrix);</pre>
336<p>
337Transform all toplevel objects in model with matrix.</p>
338<p>
339
340</p>
341<div class="variablelist"><table border="0">
342<col align="left" valign="top">
343<tbody>
344<tr>
345<td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td>
346<td> the model
347</td>
348</tr>
349<tr>
350<td><p><span class="term"><em class="parameter"><code>matrix</code></em> :</span></p></td>
351<td> transformation matrix
352</td>
353</tr>
354<tr>
355<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
356<td> TRUE on success, FALSE else
357</td>
358</tr>
359</tbody>
360</table></div>
361</div>
362<hr>
363<div class="refsect2" lang="en">
364<a name="g3d-model-clear"></a><h3>g3d_model_clear ()</h3>
365<pre class="programlisting">void g3d_model_clear (<a class="link" href="libg3d-model.html#G3DModel" title="G3DModel">G3DModel</a> *model);</pre>
366<p>
367Removes all objects from a model.</p>
368<p>
369
370</p>
371<div class="variablelist"><table border="0">
372<col align="left" valign="top">
373<tbody><tr>
374<td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td>
375<td> the model to clear
376</td>
377</tr></tbody>
378</table></div>
379</div>
380<hr>
381<div class="refsect2" lang="en">
382<a name="g3d-model-free"></a><h3>g3d_model_free ()</h3>
383<pre class="programlisting">void g3d_model_free (<a class="link" href="libg3d-model.html#G3DModel" title="G3DModel">G3DModel</a> *model);</pre>
384<p>
385Frees all memory allocated for the model including all objects, materials
386and textures.</p>
387<p>
388
389</p>
390<div class="variablelist"><table border="0">
391<col align="left" valign="top">
392<tbody><tr>
393<td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td>
394<td> the model to free
395</td>
396</tr></tbody>
397</table></div>
398</div>
399<hr>
400<div class="refsect2" lang="en">
401<a name="g3d-model-get-object-by-name"></a><h3>g3d_model_get_object_by_name ()</h3>
402<pre class="programlisting"><a class="link" href="libg3d-object.html#G3DObject" title="G3DObject">G3DObject</a>* g3d_model_get_object_by_name (<a class="link" href="libg3d-model.html#G3DModel" title="G3DModel">G3DModel</a> *model,
403 const <a
404href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
405>gchar</a> *name);</pre>
406<p>
407Searches the object tree for an object with the given name.</p>
408<p>
409
410</p>
411<div class="variablelist"><table border="0">
412<col align="left" valign="top">
413<tbody>
414<tr>
415<td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td>
416<td> the model containing all objects
417</td>
418</tr>
419<tr>
420<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
421<td> the name of the requested object
422</td>
423</tr>
424<tr>
425<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
426<td> the requested object or NULL if non was found
427</td>
428</tr>
429</tbody>
430</table></div>
431</div>
432</div>
433</div>
434<div class="footer">
435<hr>
436 Generated by GTK-Doc V1.10</div>
437</body>
438</html>