Add to git.
[c2lib.git] / doc / new_vec.3.html
1 <html>
2 <head>
3 <meta name="generator" content="groff -Thtml, see www.gnu.org">
4 <meta name="Content-Style" content="text/css">
5 <title>new_matrix</title>
6 </head>
7 <body>
8
9 <h1 align=center>new_matrix</h1>
10 <a href="#NAME">NAME</a><br>
11 <a href="#SYNOPSIS">SYNOPSIS</a><br>
12 <a href="#DESCRIPTION">DESCRIPTION</a><br>
13 <a href="#AUTHOR">AUTHOR</a><br>
14 <a href="#LICENSE">LICENSE</a><br>
15 <a href="#VERSION">VERSION</a><br>
16 <a href="#SEE ALSO">SEE ALSO</a><br>
17
18 <hr>
19 <!-- Creator     : groff version 1.17.2 -->
20 <!-- CreationDate: Fri May  3 14:57:13 2002 -->
21 <a name="NAME"></a>
22 <h2>NAME</h2>
23 <table width="100%" border=0 rules="none" frame="void"
24        cols="2" cellspacing="0" cellpadding="0">
25 <tr valign="top" align="left">
26 <td width="10%"></td><td width="90%">
27 new_matrix, new_vec - allocate a new matrix or vector</td></table>
28 <a name="SYNOPSIS"></a>
29 <h2>SYNOPSIS</h2>
30
31 <table width="100%" border=0 rules="none" frame="void"
32        cols="2" cellspacing="0" cellpadding="0">
33 <tr valign="top" align="left">
34 <td width="10%"></td><td width="90%">
35 <pre><b>#include &lt;matvec.h&gt;
36
37 #define new_matrix(pool) ((float *) pmalloc ((pool), sizeof (float) * 16))
38 #define new_vec(pool) ((float *) pmalloc ((pool), sizeof (float) * 4))
39 </b></pre></td></table>
40 <a name="DESCRIPTION"></a>
41 <h2>DESCRIPTION</h2>
42
43 <table width="100%" border=0 rules="none" frame="void"
44        cols="2" cellspacing="0" cellpadding="0">
45 <tr valign="top" align="left">
46 <td width="10%"></td><td width="90%">
47 <b>new_matrix</b> allocates a new 4x4 matrix of floats in
48 <b>pool</b>.</td></table>
49
50 <table width="100%" border=0 rules="none" frame="void"
51        cols="2" cellspacing="0" cellpadding="0">
52 <tr valign="top" align="left">
53 <td width="10%"></td><td width="90%">
54 <b>new_vec</b> allocates a new 4-vector of floats in
55 <b>pool</b>.</td></table>
56
57 <table width="100%" border=0 rules="none" frame="void"
58        cols="2" cellspacing="0" cellpadding="0">
59 <tr valign="top" align="left">
60 <td width="10%"></td><td width="90%">
61 You may use these functions to allocate matrices and vectors
62 dynamically, or you may allocate them statically. The other
63 matrix and vector functions available do not distriguish
64 between dynamically and statically allocated
65 variables.</td></table>
66
67 <table width="100%" border=0 rules="none" frame="void"
68        cols="2" cellspacing="0" cellpadding="0">
69 <tr valign="top" align="left">
70 <td width="10%"></td><td width="90%">
71 Note: All matrices are stored in COLUMN-MAJOR ORDER! This is
72 for compatibility with OpenGL, but it is the OPPOSITE of the
73 natural C row-major ordering, so beware.</td></table>
74 <a name="AUTHOR"></a>
75 <h2>AUTHOR</h2>
76
77 <table width="100%" border=0 rules="none" frame="void"
78        cols="2" cellspacing="0" cellpadding="0">
79 <tr valign="top" align="left">
80 <td width="10%"></td><td width="90%">
81 Richard Jones &lt;rich@annexia.org&gt;</td></table>
82 <a name="LICENSE"></a>
83 <h2>LICENSE</h2>
84
85 <table width="100%" border=0 rules="none" frame="void"
86        cols="2" cellspacing="0" cellpadding="0">
87 <tr valign="top" align="left">
88 <td width="10%"></td><td width="90%">
89 GNU LGPL (see http://www.gnu.org/)</td></table>
90 <a name="VERSION"></a>
91 <h2>VERSION</h2>
92
93 <table width="100%" border=0 rules="none" frame="void"
94        cols="2" cellspacing="0" cellpadding="0">
95 <tr valign="top" align="left">
96 <td width="10%"></td><td width="90%">
97 c2lib-1.2.13</td></table>
98 <a name="SEE ALSO"></a>
99 <h2>SEE ALSO</h2>
100
101 <table width="100%" border=0 rules="none" frame="void"
102        cols="2" cellspacing="0" cellpadding="0">
103 <tr valign="top" align="left">
104 <td width="10%"></td><td width="90%">
105 <b>new_identity_matrix(3)</b>,
106 <b>new_zero_vec(3)</b>.</td></table>
107 <hr>
108 </body>
109 </html>