diff options
Diffstat (limited to 'src/others/mimesh/libg3d-0.0.8/doc/api/xml/face.xml')
-rw-r--r-- | src/others/mimesh/libg3d-0.0.8/doc/api/xml/face.xml | 197 |
1 files changed, 197 insertions, 0 deletions
diff --git a/src/others/mimesh/libg3d-0.0.8/doc/api/xml/face.xml b/src/others/mimesh/libg3d-0.0.8/doc/api/xml/face.xml new file mode 100644 index 0000000..cb8059a --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/doc/api/xml/face.xml | |||
@@ -0,0 +1,197 @@ | |||
1 | <?xml version="1.0"?> | ||
2 | <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" | ||
3 | "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"> | ||
4 | <refentry id="libg3d-face"> | ||
5 | <refmeta> | ||
6 | <refentrytitle role="top_of_page" id="libg3d-face.top_of_page">face</refentrytitle> | ||
7 | <manvolnum>3</manvolnum> | ||
8 | <refmiscinfo>LIBG3D Library</refmiscinfo> | ||
9 | </refmeta> | ||
10 | |||
11 | <refnamediv> | ||
12 | <refname>face</refname> | ||
13 | <refpurpose>Face manipulation</refpurpose> | ||
14 | <!--[<xref linkend="desc" endterm="desc.title"/>]--> | ||
15 | </refnamediv> | ||
16 | |||
17 | <refsynopsisdiv id="libg3d-face.synopsis" role="synopsis"> | ||
18 | <title role="synopsis.title">Synopsis</title> | ||
19 | |||
20 | <synopsis> | ||
21 | |||
22 | #include <g3d/face.h> | ||
23 | |||
24 | #define <link linkend="G3D-FLAG-MAT-TWOSIDE:CAPS">G3D_FLAG_MAT_TWOSIDE</link> | ||
25 | #define <link linkend="G3D-FLAG-FAC-NORMALS:CAPS">G3D_FLAG_FAC_NORMALS</link> | ||
26 | #define <link linkend="G3D-FLAG-FAC-TEXMAP:CAPS">G3D_FLAG_FAC_TEXMAP</link> | ||
27 | <link linkend="G3DFace">G3DFace</link>; | ||
28 | <link linkend="gboolean">gboolean</link> <link linkend="g3d-face-get-normal">g3d_face_get_normal</link> (<link linkend="G3DFace">G3DFace</link> *face, | ||
29 | <link linkend="G3DObject">G3DObject</link> *object, | ||
30 | <link linkend="G3DFloat">G3DFloat</link> *nx, | ||
31 | <link linkend="G3DFloat">G3DFloat</link> *ny, | ||
32 | <link linkend="G3DFloat">G3DFloat</link> *nz); | ||
33 | <link linkend="void">void</link> <link linkend="g3d-face-free">g3d_face_free</link> (<link linkend="G3DFace">G3DFace</link> *face); | ||
34 | </synopsis> | ||
35 | </refsynopsisdiv> | ||
36 | |||
37 | |||
38 | |||
39 | |||
40 | |||
41 | |||
42 | |||
43 | |||
44 | |||
45 | <refsect1 id="libg3d-face.description" role="desc"> | ||
46 | <title role="desc.title">Description</title> | ||
47 | <para> | ||
48 | A face is plane bordered by at least 3 vertices.</para> | ||
49 | <para> | ||
50 | |||
51 | </para> | ||
52 | </refsect1> | ||
53 | |||
54 | <refsect1 id="libg3d-face.details" role="details"> | ||
55 | <title role="details.title">Details</title> | ||
56 | <refsect2 id="G3D-FLAG-MAT-TWOSIDE:CAPS" role="macro"> | ||
57 | <title>G3D_FLAG_MAT_TWOSIDE</title> | ||
58 | <indexterm zone="G3D-FLAG-MAT-TWOSIDE:CAPS"><primary>G3D_FLAG_MAT_TWOSIDE</primary></indexterm><programlisting>#define G3D_FLAG_MAT_TWOSIDE (1L << 0) | ||
59 | </programlisting> | ||
60 | <para> | ||
61 | Faces using this material should be rendered two-sided as the direction | ||
62 | is unknown.</para> | ||
63 | <para> | ||
64 | |||
65 | </para></refsect2> | ||
66 | <refsect2 id="G3D-FLAG-FAC-NORMALS:CAPS" role="macro"> | ||
67 | <title>G3D_FLAG_FAC_NORMALS</title> | ||
68 | <indexterm zone="G3D-FLAG-FAC-NORMALS:CAPS"><primary>G3D_FLAG_FAC_NORMALS</primary></indexterm><programlisting>#define G3D_FLAG_FAC_NORMALS (1L << 0) | ||
69 | </programlisting> | ||
70 | <para> | ||
71 | The face has custom normals.</para> | ||
72 | <para> | ||
73 | |||
74 | </para></refsect2> | ||
75 | <refsect2 id="G3D-FLAG-FAC-TEXMAP:CAPS" role="macro"> | ||
76 | <title>G3D_FLAG_FAC_TEXMAP</title> | ||
77 | <indexterm zone="G3D-FLAG-FAC-TEXMAP:CAPS"><primary>G3D_FLAG_FAC_TEXMAP</primary></indexterm><programlisting>#define G3D_FLAG_FAC_TEXMAP (1L << 1) | ||
78 | </programlisting> | ||
79 | <para> | ||
80 | The face has a texture map and texture coordinates.</para> | ||
81 | <para> | ||
82 | |||
83 | </para></refsect2> | ||
84 | <refsect2 id="G3DFace" role="struct"> | ||
85 | <title>G3DFace</title> | ||
86 | <indexterm zone="G3DFace"><primary>G3DFace</primary></indexterm><programlisting>typedef struct { | ||
87 | guint32 vertex_count; | ||
88 | guint32 *vertex_indices; | ||
89 | |||
90 | G3DMaterial *material; | ||
91 | |||
92 | guint32 flags; | ||
93 | |||
94 | G3DVector *normals; | ||
95 | |||
96 | G3DImage *tex_image; | ||
97 | guint32 tex_vertex_count; | ||
98 | G3DVector *tex_vertex_data; | ||
99 | } G3DFace; | ||
100 | </programlisting> | ||
101 | <para> | ||
102 | An object representing a surface.</para> | ||
103 | <para> | ||
104 | |||
105 | </para><variablelist role="struct"> | ||
106 | <varlistentry> | ||
107 | <term><link linkend="guint32">guint32</link> <structfield>vertex_count</structfield>;</term> | ||
108 | <listitem><simpara> number of vertices | ||
109 | </simpara></listitem> | ||
110 | </varlistentry> | ||
111 | <varlistentry> | ||
112 | <term><link linkend="guint32">guint32</link> *<structfield>vertex_indices</structfield>;</term> | ||
113 | <listitem><simpara> indices of vertices in <link linkend="G3DObject"><type>G3DObject</type></link> | ||
114 | </simpara></listitem> | ||
115 | </varlistentry> | ||
116 | <varlistentry> | ||
117 | <term><link linkend="G3DMaterial">G3DMaterial</link> *<structfield>material</structfield>;</term> | ||
118 | <listitem><simpara> material to use for surface | ||
119 | </simpara></listitem> | ||
120 | </varlistentry> | ||
121 | <varlistentry> | ||
122 | <term><link linkend="guint32">guint32</link> <structfield>flags</structfield>;</term> | ||
123 | <listitem><simpara> flags | ||
124 | </simpara></listitem> | ||
125 | </varlistentry> | ||
126 | <varlistentry> | ||
127 | <term><link linkend="G3DVector">G3DVector</link> *<structfield>normals</structfield>;</term> | ||
128 | <listitem><simpara> optional normal array (one vector - 3 <link linkend="G3DVector"><type>G3DVector</type></link> values - for each | ||
129 | vertex) | ||
130 | </simpara></listitem> | ||
131 | </varlistentry> | ||
132 | <varlistentry> | ||
133 | <term><link linkend="G3DImage">G3DImage</link> *<structfield>tex_image</structfield>;</term> | ||
134 | <listitem><simpara> optional texture image | ||
135 | </simpara></listitem> | ||
136 | </varlistentry> | ||
137 | <varlistentry> | ||
138 | <term><link linkend="guint32">guint32</link> <structfield>tex_vertex_count</structfield>;</term> | ||
139 | <listitem><simpara> number of texture vertices, should be 0 or match | ||
140 | vertex_count | ||
141 | </simpara></listitem> | ||
142 | </varlistentry> | ||
143 | <varlistentry> | ||
144 | <term><link linkend="G3DVector">G3DVector</link> *<structfield>tex_vertex_data</structfield>;</term> | ||
145 | <listitem><simpara> array of texture vertices | ||
146 | </simpara></listitem> | ||
147 | </varlistentry> | ||
148 | </variablelist></refsect2> | ||
149 | <refsect2 id="g3d-face-get-normal" role="function"> | ||
150 | <title>g3d_face_get_normal ()</title> | ||
151 | <indexterm zone="g3d-face-get-normal"><primary>g3d_face_get_normal</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> g3d_face_get_normal (<link linkend="G3DFace">G3DFace</link> *face, | ||
152 | <link linkend="G3DObject">G3DObject</link> *object, | ||
153 | <link linkend="G3DFloat">G3DFloat</link> *nx, | ||
154 | <link linkend="G3DFloat">G3DFloat</link> *ny, | ||
155 | <link linkend="G3DFloat">G3DFloat</link> *nz);</programlisting> | ||
156 | <para> | ||
157 | calculates the normal of a face.</para> | ||
158 | <para> | ||
159 | |||
160 | </para><variablelist role="params"> | ||
161 | <varlistentry><term><parameter>face</parameter> :</term> | ||
162 | <listitem><simpara> face to calculate normal of | ||
163 | </simpara></listitem></varlistentry> | ||
164 | <varlistentry><term><parameter>object</parameter> :</term> | ||
165 | <listitem><simpara> object containing vertices of face | ||
166 | </simpara></listitem></varlistentry> | ||
167 | <varlistentry><term><parameter>nx</parameter> :</term> | ||
168 | <listitem><simpara> x component of resulting normal | ||
169 | </simpara></listitem></varlistentry> | ||
170 | <varlistentry><term><parameter>ny</parameter> :</term> | ||
171 | <listitem><simpara> y component of resulting normal | ||
172 | </simpara></listitem></varlistentry> | ||
173 | <varlistentry><term><parameter>nz</parameter> :</term> | ||
174 | <listitem><simpara> z component of resulting normal | ||
175 | </simpara></listitem></varlistentry> | ||
176 | <varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success, FALSE else | ||
177 | </simpara></listitem></varlistentry> | ||
178 | </variablelist></refsect2> | ||
179 | <refsect2 id="g3d-face-free" role="function"> | ||
180 | <title>g3d_face_free ()</title> | ||
181 | <indexterm zone="g3d-face-free"><primary>g3d_face_free</primary></indexterm><programlisting><link linkend="void">void</link> g3d_face_free (<link linkend="G3DFace">G3DFace</link> *face);</programlisting> | ||
182 | <para> | ||
183 | Frees all memory allocated for this face.</para> | ||
184 | <para> | ||
185 | |||
186 | </para><variablelist role="params"> | ||
187 | <varlistentry><term><parameter>face</parameter> :</term> | ||
188 | <listitem><simpara> the face to free | ||
189 | </simpara></listitem></varlistentry> | ||
190 | </variablelist></refsect2> | ||
191 | |||
192 | </refsect1> | ||
193 | |||
194 | |||
195 | |||
196 | |||
197 | </refentry> | ||