diff options
Diffstat (limited to 'src/others/mimesh/libg3d-0.0.8/doc/api/xml/vector.xml')
-rw-r--r-- | src/others/mimesh/libg3d-0.0.8/doc/api/xml/vector.xml | 184 |
1 files changed, 184 insertions, 0 deletions
diff --git a/src/others/mimesh/libg3d-0.0.8/doc/api/xml/vector.xml b/src/others/mimesh/libg3d-0.0.8/doc/api/xml/vector.xml new file mode 100644 index 0000000..d306c67 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/doc/api/xml/vector.xml | |||
@@ -0,0 +1,184 @@ | |||
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-vector"> | ||
5 | <refmeta> | ||
6 | <refentrytitle role="top_of_page" id="libg3d-vector.top_of_page">vector</refentrytitle> | ||
7 | <manvolnum>3</manvolnum> | ||
8 | <refmiscinfo>LIBG3D Library</refmiscinfo> | ||
9 | </refmeta> | ||
10 | |||
11 | <refnamediv> | ||
12 | <refname>vector</refname> | ||
13 | <refpurpose>Vector manipulation and calculation</refpurpose> | ||
14 | <!--[<xref linkend="desc" endterm="desc.title"/>]--> | ||
15 | </refnamediv> | ||
16 | |||
17 | <refsynopsisdiv id="libg3d-vector.synopsis" role="synopsis"> | ||
18 | <title role="synopsis.title">Synopsis</title> | ||
19 | |||
20 | <synopsis> | ||
21 | |||
22 | #include <g3d/vector.h> | ||
23 | |||
24 | typedef <link linkend="G3DVector">G3DVector</link>; | ||
25 | <link linkend="gboolean">gboolean</link> <link linkend="g3d-vector-normal">g3d_vector_normal</link> (<link linkend="G3DFloat">G3DFloat</link> ax, | ||
26 | <link linkend="G3DFloat">G3DFloat</link> ay, | ||
27 | <link linkend="G3DFloat">G3DFloat</link> az, | ||
28 | <link linkend="G3DFloat">G3DFloat</link> bx, | ||
29 | <link linkend="G3DFloat">G3DFloat</link> by, | ||
30 | <link linkend="G3DFloat">G3DFloat</link> bz, | ||
31 | <link linkend="G3DFloat">G3DFloat</link> *nx, | ||
32 | <link linkend="G3DFloat">G3DFloat</link> *ny, | ||
33 | <link linkend="G3DFloat">G3DFloat</link> *nz); | ||
34 | <link linkend="gboolean">gboolean</link> <link linkend="g3d-vector-unify">g3d_vector_unify</link> (<link linkend="G3DFloat">G3DFloat</link> *nx, | ||
35 | <link linkend="G3DFloat">G3DFloat</link> *ny, | ||
36 | <link linkend="G3DFloat">G3DFloat</link> *nz); | ||
37 | <link linkend="gboolean">gboolean</link> <link linkend="g3d-vector-transform">g3d_vector_transform</link> (<link linkend="G3DFloat">G3DFloat</link> *x, | ||
38 | <link linkend="G3DFloat">G3DFloat</link> *y, | ||
39 | <link linkend="G3DFloat">G3DFloat</link> *z, | ||
40 | <link linkend="G3DMatrix">G3DMatrix</link> *matrix); | ||
41 | </synopsis> | ||
42 | </refsynopsisdiv> | ||
43 | |||
44 | |||
45 | |||
46 | |||
47 | |||
48 | |||
49 | |||
50 | |||
51 | |||
52 | <refsect1 id="libg3d-vector.description" role="desc"> | ||
53 | <title role="desc.title">Description</title> | ||
54 | <para> | ||
55 | A vector is a one-dimensional array of floating point data. | ||
56 | </para> | ||
57 | <para> | ||
58 | Declare it as statically as: | ||
59 | </para> | ||
60 | <para> | ||
61 | G3DVector vector[3]; | ||
62 | </para> | ||
63 | <para> | ||
64 | or allocate it dynamically with: | ||
65 | </para> | ||
66 | <para> | ||
67 | G3DVector *vector = g3d_vector_new(3, 1);</para> | ||
68 | <para> | ||
69 | |||
70 | </para> | ||
71 | </refsect1> | ||
72 | |||
73 | <refsect1 id="libg3d-vector.details" role="details"> | ||
74 | <title role="details.title">Details</title> | ||
75 | <refsect2 id="G3DVector" role="typedef"> | ||
76 | <title>G3DVector</title> | ||
77 | <indexterm zone="G3DVector"><primary>G3DVector</primary></indexterm><programlisting>typedef G3DFloat G3DVector; | ||
78 | </programlisting> | ||
79 | <para> | ||
80 | Vector element type.</para> | ||
81 | <para> | ||
82 | |||
83 | </para></refsect2> | ||
84 | <refsect2 id="g3d-vector-normal" role="function"> | ||
85 | <title>g3d_vector_normal ()</title> | ||
86 | <indexterm zone="g3d-vector-normal"><primary>g3d_vector_normal</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> g3d_vector_normal (<link linkend="G3DFloat">G3DFloat</link> ax, | ||
87 | <link linkend="G3DFloat">G3DFloat</link> ay, | ||
88 | <link linkend="G3DFloat">G3DFloat</link> az, | ||
89 | <link linkend="G3DFloat">G3DFloat</link> bx, | ||
90 | <link linkend="G3DFloat">G3DFloat</link> by, | ||
91 | <link linkend="G3DFloat">G3DFloat</link> bz, | ||
92 | <link linkend="G3DFloat">G3DFloat</link> *nx, | ||
93 | <link linkend="G3DFloat">G3DFloat</link> *ny, | ||
94 | <link linkend="G3DFloat">G3DFloat</link> *nz);</programlisting> | ||
95 | <para> | ||
96 | calculate the normal from a plane defined by two vectors</para> | ||
97 | <para> | ||
98 | |||
99 | </para><variablelist role="params"> | ||
100 | <varlistentry><term><parameter>ax</parameter> :</term> | ||
101 | <listitem><simpara> x component first vector | ||
102 | </simpara></listitem></varlistentry> | ||
103 | <varlistentry><term><parameter>ay</parameter> :</term> | ||
104 | <listitem><simpara> y component first vector | ||
105 | </simpara></listitem></varlistentry> | ||
106 | <varlistentry><term><parameter>az</parameter> :</term> | ||
107 | <listitem><simpara> z component first vector | ||
108 | </simpara></listitem></varlistentry> | ||
109 | <varlistentry><term><parameter>bx</parameter> :</term> | ||
110 | <listitem><simpara> x component second vector | ||
111 | </simpara></listitem></varlistentry> | ||
112 | <varlistentry><term><parameter>by</parameter> :</term> | ||
113 | <listitem><simpara> y component second vector | ||
114 | </simpara></listitem></varlistentry> | ||
115 | <varlistentry><term><parameter>bz</parameter> :</term> | ||
116 | <listitem><simpara> z component second vector | ||
117 | </simpara></listitem></varlistentry> | ||
118 | <varlistentry><term><parameter>nx</parameter> :</term> | ||
119 | <listitem><simpara> x component resulting normal | ||
120 | </simpara></listitem></varlistentry> | ||
121 | <varlistentry><term><parameter>ny</parameter> :</term> | ||
122 | <listitem><simpara> y component resulting normal | ||
123 | </simpara></listitem></varlistentry> | ||
124 | <varlistentry><term><parameter>nz</parameter> :</term> | ||
125 | <listitem><simpara> z component resulting normal | ||
126 | </simpara></listitem></varlistentry> | ||
127 | <varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success, FALSE else | ||
128 | </simpara></listitem></varlistentry> | ||
129 | </variablelist></refsect2> | ||
130 | <refsect2 id="g3d-vector-unify" role="function"> | ||
131 | <title>g3d_vector_unify ()</title> | ||
132 | <indexterm zone="g3d-vector-unify"><primary>g3d_vector_unify</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> g3d_vector_unify (<link linkend="G3DFloat">G3DFloat</link> *nx, | ||
133 | <link linkend="G3DFloat">G3DFloat</link> *ny, | ||
134 | <link linkend="G3DFloat">G3DFloat</link> *nz);</programlisting> | ||
135 | <para> | ||
136 | Transforms the given vector to the unit vector.</para> | ||
137 | <para> | ||
138 | |||
139 | </para><variablelist role="params"> | ||
140 | <varlistentry><term><parameter>nx</parameter> :</term> | ||
141 | <listitem><simpara> x component of vector | ||
142 | </simpara></listitem></varlistentry> | ||
143 | <varlistentry><term><parameter>ny</parameter> :</term> | ||
144 | <listitem><simpara> y component of vector | ||
145 | </simpara></listitem></varlistentry> | ||
146 | <varlistentry><term><parameter>nz</parameter> :</term> | ||
147 | <listitem><simpara> z component of vector | ||
148 | </simpara></listitem></varlistentry> | ||
149 | <varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success, FALSE else | ||
150 | </simpara></listitem></varlistentry> | ||
151 | </variablelist></refsect2> | ||
152 | <refsect2 id="g3d-vector-transform" role="function"> | ||
153 | <title>g3d_vector_transform ()</title> | ||
154 | <indexterm zone="g3d-vector-transform"><primary>g3d_vector_transform</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> g3d_vector_transform (<link linkend="G3DFloat">G3DFloat</link> *x, | ||
155 | <link linkend="G3DFloat">G3DFloat</link> *y, | ||
156 | <link linkend="G3DFloat">G3DFloat</link> *z, | ||
157 | <link linkend="G3DMatrix">G3DMatrix</link> *matrix);</programlisting> | ||
158 | <para> | ||
159 | Transforms the given vector corresponding to the given matrix</para> | ||
160 | <para> | ||
161 | |||
162 | </para><variablelist role="params"> | ||
163 | <varlistentry><term><parameter>x</parameter> :</term> | ||
164 | <listitem><simpara> x component of vector | ||
165 | </simpara></listitem></varlistentry> | ||
166 | <varlistentry><term><parameter>y</parameter> :</term> | ||
167 | <listitem><simpara> y component of vector | ||
168 | </simpara></listitem></varlistentry> | ||
169 | <varlistentry><term><parameter>z</parameter> :</term> | ||
170 | <listitem><simpara> z component of vector | ||
171 | </simpara></listitem></varlistentry> | ||
172 | <varlistentry><term><parameter>matrix</parameter> :</term> | ||
173 | <listitem><simpara> transformation matrix (4x4) | ||
174 | </simpara></listitem></varlistentry> | ||
175 | <varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success, FALSE else | ||
176 | </simpara></listitem></varlistentry> | ||
177 | </variablelist></refsect2> | ||
178 | |||
179 | </refsect1> | ||
180 | |||
181 | |||
182 | |||
183 | |||
184 | </refentry> | ||