<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>AllegroGL: Math conversion routines</title> <link href="alleggl.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.5.2 --> <div class="tabs"> <ul> <li><a href="main.html"><span>Main Page</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="annotated.html"><span>Data Structures</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> </ul> </div> <h1>Math conversion routines</h1>Routines to convert between OpenGL and Allegro math types. <a href="#_details">More...</a><h2>Matrix conversion routines</h2> <ul> <li>void <a class="el" href="group__math.html#g4cf4f453cb3f95a1e7e861a7401b4a8d">allegro_gl_MATRIX_to_GLfloat</a> (MATRIX *m, GLfloat gl[16]) <dl class="el"><dd class="mdescRight">Converts an Allegro fixed-point matrix to an array of floats suitable for OpenGL's matrix operations. <a href="#g4cf4f453cb3f95a1e7e861a7401b4a8d"></a><br></dl><li>void <a class="el" href="group__math.html#gee6cb48f8e3e70abecc6c282a8ea1edc">allegro_gl_MATRIX_to_GLdouble</a> (MATRIX *m, GLdouble gl[16]) <dl class="el"><dd class="mdescRight">Converts an Allegro fixed-point matrix to an array of doubles suitable for OpenGL's matrix operations. <a href="#gee6cb48f8e3e70abecc6c282a8ea1edc"></a><br></dl><li>void <a class="el" href="group__math.html#ge8e0ee18b9aeca955402be16de6ca79d">allegro_gl_MATRIX_f_to_GLfloat</a> (MATRIX_f *m, GLfloat gl[16]) <dl class="el"><dd class="mdescRight">Converts an Allegro floating-point matrix to an array of floats suitable for OpenGL's matrix operations. <a href="#ge8e0ee18b9aeca955402be16de6ca79d"></a><br></dl><li>void <a class="el" href="group__math.html#gb93f3588ea08b048f418023aa76cb3fc">allegro_gl_MATRIX_f_to_GLdouble</a> (MATRIX_f *m, GLdouble gl[16]) <dl class="el"><dd class="mdescRight">Converts an Allegro floating-point matrix to an array of doubles suitable for OpenGL's matrix operations. <a href="#gb93f3588ea08b048f418023aa76cb3fc"></a><br></dl><li>void <a class="el" href="group__math.html#g468e83ca4de52ed839978d48f5dbe111">allegro_gl_GLfloat_to_MATRIX</a> (GLfloat gl[16], MATRIX *m) <dl class="el"><dd class="mdescRight">Converts an OpenGL floating-point matrix issued from the matrix stack to an Allegro fixed-point matrix. <a href="#g468e83ca4de52ed839978d48f5dbe111"></a><br></dl><li>void <a class="el" href="group__math.html#g68e2e0e9dcdba42004070a5f8f547994">allegro_gl_GLdouble_to_MATRIX</a> (GLdouble gl[16], MATRIX *m) <dl class="el"><dd class="mdescRight">Converts an OpenGL double precision floating-point matrix issued from the matrix stack to an Allegro fixed-point matrix. <a href="#g68e2e0e9dcdba42004070a5f8f547994"></a><br></dl><li>void <a class="el" href="group__math.html#g08692466ae37d7888bbd5f5ee5aa9268">allegro_gl_GLfloat_to_MATRIX_f</a> (GLfloat gl[16], MATRIX_f *m) <dl class="el"><dd class="mdescRight">Converts an OpenGL floating-point matrix issued from the matrix stack to an Allegro floating-point matrix. <a href="#g08692466ae37d7888bbd5f5ee5aa9268"></a><br></dl><li>void <a class="el" href="group__math.html#ga6b729a9e93e249a8a76e078e94a2b44">allegro_gl_GLdouble_to_MATRIX_f</a> (GLdouble gl[16], MATRIX_f *m) <dl class="el"><dd class="mdescRight">Converts an OpenGL double precision floating-point matrix issued from the matrix stack to an Allegro single-precision floating-point matrix. <a href="#ga6b729a9e93e249a8a76e078e94a2b44"></a><br></dl></ul> <h2>Quaternion conversion routines</h2> <ul> <li>void <a class="el" href="group__math.html#ga83a678516d8a7a5503a2b0c9014cb64">allegro_gl_apply_quat</a> (QUAT *q) <dl class="el"><dd class="mdescRight">Multiplies the Quaternion to the current transformation matrix, by converting it to a call to glRotatef(). <a href="#ga83a678516d8a7a5503a2b0c9014cb64"></a><br></dl><li>void <a class="el" href="group__math.html#gb00b667363181a8f0853121170bebaca">allegro_gl_quat_to_glrotatef</a> (QUAT *q, float *angle, float *x, float *y, float *z) <dl class="el"><dd class="mdescRight">Converts a quaternion to a vector/angle, which can be used with glRotate*(). <a href="#gb00b667363181a8f0853121170bebaca"></a><br></dl><li>void <a class="el" href="group__math.html#g956160418e1c0c37143dd3cee54477ce">allegro_gl_quat_to_glrotated</a> (QUAT *q, double *angle, double *x, double *y, double *z) <dl class="el"><dd class="mdescRight">Converts a quaternion to a vector/angle, which can be used with glRotate*(). <a href="#g956160418e1c0c37143dd3cee54477ce"></a><br></dl></ul> <hr><a name="_details"></a><h2>Detailed Description</h2> Routines to convert between OpenGL and Allegro math types. <p> <hr><h2>Function Documentation</h2> <a class="anchor" name="g4cf4f453cb3f95a1e7e861a7401b4a8d"></a><!-- doxytag: member="alleggl.h::allegro_gl_MATRIX_to_GLfloat" ref="g4cf4f453cb3f95a1e7e861a7401b4a8d" args="(MATRIX *m, GLfloat gl[16])" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void allegro_gl_MATRIX_to_GLfloat </td> <td>(</td> <td class="paramtype">MATRIX * </td> <td class="paramname"> <em>m</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">GLfloat </td> <td class="paramname"> <em>gl</em>[16]</td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> Converts an Allegro fixed-point matrix to an array of floats suitable for OpenGL's matrix operations. <p> <b>Example:</b> <pre> MATRIX m = identity_matrix; GLfloat gl_m[16]; get_vector_rotation_matrix(&m, itofix(1), 0, itofix(1), ftofix(43.83)); allegro_gl_MATRIX_to_GLfloat(&m, &gl_m); glLoadMatrixf(&gl_m); </pre><p> <dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__math.html#gee6cb48f8e3e70abecc6c282a8ea1edc" title="Converts an Allegro fixed-point matrix to an array of doubles suitable for OpenGL's...">allegro_gl_MATRIX_to_GLdouble()</a> <p> <a class="el" href="group__math.html#ge8e0ee18b9aeca955402be16de6ca79d" title="Converts an Allegro floating-point matrix to an array of floats suitable for OpenGL's...">allegro_gl_MATRIX_f_to_GLfloat()</a> <p> <a class="el" href="group__math.html#gb93f3588ea08b048f418023aa76cb3fc" title="Converts an Allegro floating-point matrix to an array of doubles suitable for OpenGL's...">allegro_gl_MATRIX_f_to_GLdouble()</a> <p> <a class="el" href="group__math.html#g68e2e0e9dcdba42004070a5f8f547994" title="Converts an OpenGL double precision floating-point matrix issued from the matrix...">allegro_gl_GLdouble_to_MATRIX()</a> <p> <a class="el" href="group__math.html#g08692466ae37d7888bbd5f5ee5aa9268" title="Converts an OpenGL floating-point matrix issued from the matrix stack to an Allegro...">allegro_gl_GLfloat_to_MATRIX_f()</a> <p> <a class="el" href="group__math.html#ga6b729a9e93e249a8a76e078e94a2b44" title="Converts an OpenGL double precision floating-point matrix issued from the matrix...">allegro_gl_GLdouble_to_MATRIX_f()</a> <p> <a class="el" href="group__math.html#g468e83ca4de52ed839978d48f5dbe111" title="Converts an OpenGL floating-point matrix issued from the matrix stack to an Allegro...">allegro_gl_GLfloat_to_MATRIX()</a> </dd></dl> <p> Definition at line <a class="el" href="math_8c-source.html#l00066">66</a> of file <a class="el" href="math_8c-source.html">math.c</a>. </div> </div><p> <a class="anchor" name="gee6cb48f8e3e70abecc6c282a8ea1edc"></a><!-- doxytag: member="alleggl.h::allegro_gl_MATRIX_to_GLdouble" ref="gee6cb48f8e3e70abecc6c282a8ea1edc" args="(MATRIX *m, GLdouble gl[16])" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void allegro_gl_MATRIX_to_GLdouble </td> <td>(</td> <td class="paramtype">MATRIX * </td> <td class="paramname"> <em>m</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">GLdouble </td> <td class="paramname"> <em>gl</em>[16]</td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> Converts an Allegro fixed-point matrix to an array of doubles suitable for OpenGL's matrix operations. <p> <dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__math.html#g4cf4f453cb3f95a1e7e861a7401b4a8d" title="Converts an Allegro fixed-point matrix to an array of floats suitable for OpenGL's...">allegro_gl_MATRIX_to_GLfloat()</a> <p> <a class="el" href="group__math.html#ge8e0ee18b9aeca955402be16de6ca79d" title="Converts an Allegro floating-point matrix to an array of floats suitable for OpenGL's...">allegro_gl_MATRIX_f_to_GLfloat()</a> <p> <a class="el" href="group__math.html#gb93f3588ea08b048f418023aa76cb3fc" title="Converts an Allegro floating-point matrix to an array of doubles suitable for OpenGL's...">allegro_gl_MATRIX_f_to_GLdouble()</a> <p> <a class="el" href="group__math.html#g68e2e0e9dcdba42004070a5f8f547994" title="Converts an OpenGL double precision floating-point matrix issued from the matrix...">allegro_gl_GLdouble_to_MATRIX()</a> <p> <a class="el" href="group__math.html#g08692466ae37d7888bbd5f5ee5aa9268" title="Converts an OpenGL floating-point matrix issued from the matrix stack to an Allegro...">allegro_gl_GLfloat_to_MATRIX_f()</a> <p> <a class="el" href="group__math.html#ga6b729a9e93e249a8a76e078e94a2b44" title="Converts an OpenGL double precision floating-point matrix issued from the matrix...">allegro_gl_GLdouble_to_MATRIX_f()</a> <p> <a class="el" href="group__math.html#g468e83ca4de52ed839978d48f5dbe111" title="Converts an OpenGL floating-point matrix issued from the matrix stack to an Allegro...">allegro_gl_GLfloat_to_MATRIX()</a> </dd></dl> <p> Definition at line <a class="el" href="math_8c-source.html#l00082">82</a> of file <a class="el" href="math_8c-source.html">math.c</a>. </div> </div><p> <a class="anchor" name="ge8e0ee18b9aeca955402be16de6ca79d"></a><!-- doxytag: member="alleggl.h::allegro_gl_MATRIX_f_to_GLfloat" ref="ge8e0ee18b9aeca955402be16de6ca79d" args="(MATRIX_f *m, GLfloat gl[16])" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void allegro_gl_MATRIX_f_to_GLfloat </td> <td>(</td> <td class="paramtype">MATRIX_f * </td> <td class="paramname"> <em>m</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">GLfloat </td> <td class="paramname"> <em>gl</em>[16]</td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> Converts an Allegro floating-point matrix to an array of floats suitable for OpenGL's matrix operations. <p> <dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__math.html#g4cf4f453cb3f95a1e7e861a7401b4a8d" title="Converts an Allegro fixed-point matrix to an array of floats suitable for OpenGL's...">allegro_gl_MATRIX_to_GLfloat()</a> <p> <a class="el" href="group__math.html#gee6cb48f8e3e70abecc6c282a8ea1edc" title="Converts an Allegro fixed-point matrix to an array of doubles suitable for OpenGL's...">allegro_gl_MATRIX_to_GLdouble()</a> <p> <a class="el" href="group__math.html#gb93f3588ea08b048f418023aa76cb3fc" title="Converts an Allegro floating-point matrix to an array of doubles suitable for OpenGL's...">allegro_gl_MATRIX_f_to_GLdouble()</a> <p> <a class="el" href="group__math.html#g68e2e0e9dcdba42004070a5f8f547994" title="Converts an OpenGL double precision floating-point matrix issued from the matrix...">allegro_gl_GLdouble_to_MATRIX()</a> <p> <a class="el" href="group__math.html#g08692466ae37d7888bbd5f5ee5aa9268" title="Converts an OpenGL floating-point matrix issued from the matrix stack to an Allegro...">allegro_gl_GLfloat_to_MATRIX_f()</a> <p> <a class="el" href="group__math.html#ga6b729a9e93e249a8a76e078e94a2b44" title="Converts an OpenGL double precision floating-point matrix issued from the matrix...">allegro_gl_GLdouble_to_MATRIX_f()</a> <p> <a class="el" href="group__math.html#g468e83ca4de52ed839978d48f5dbe111" title="Converts an OpenGL floating-point matrix issued from the matrix stack to an Allegro...">allegro_gl_GLfloat_to_MATRIX()</a> </dd></dl> <p> Definition at line <a class="el" href="math_8c-source.html#l00098">98</a> of file <a class="el" href="math_8c-source.html">math.c</a>. </div> </div><p> <a class="anchor" name="gb93f3588ea08b048f418023aa76cb3fc"></a><!-- doxytag: member="alleggl.h::allegro_gl_MATRIX_f_to_GLdouble" ref="gb93f3588ea08b048f418023aa76cb3fc" args="(MATRIX_f *m, GLdouble gl[16])" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void allegro_gl_MATRIX_f_to_GLdouble </td> <td>(</td> <td class="paramtype">MATRIX_f * </td> <td class="paramname"> <em>m</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">GLdouble </td> <td class="paramname"> <em>gl</em>[16]</td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> Converts an Allegro floating-point matrix to an array of doubles suitable for OpenGL's matrix operations. <p> <dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__math.html#g4cf4f453cb3f95a1e7e861a7401b4a8d" title="Converts an Allegro fixed-point matrix to an array of floats suitable for OpenGL's...">allegro_gl_MATRIX_to_GLfloat()</a> <p> <a class="el" href="group__math.html#gee6cb48f8e3e70abecc6c282a8ea1edc" title="Converts an Allegro fixed-point matrix to an array of doubles suitable for OpenGL's...">allegro_gl_MATRIX_to_GLdouble()</a> <p> <a class="el" href="group__math.html#ge8e0ee18b9aeca955402be16de6ca79d" title="Converts an Allegro floating-point matrix to an array of floats suitable for OpenGL's...">allegro_gl_MATRIX_f_to_GLfloat()</a> <p> <a class="el" href="group__math.html#g68e2e0e9dcdba42004070a5f8f547994" title="Converts an OpenGL double precision floating-point matrix issued from the matrix...">allegro_gl_GLdouble_to_MATRIX()</a> <p> <a class="el" href="group__math.html#g08692466ae37d7888bbd5f5ee5aa9268" title="Converts an OpenGL floating-point matrix issued from the matrix stack to an Allegro...">allegro_gl_GLfloat_to_MATRIX_f()</a> <p> <a class="el" href="group__math.html#ga6b729a9e93e249a8a76e078e94a2b44" title="Converts an OpenGL double precision floating-point matrix issued from the matrix...">allegro_gl_GLdouble_to_MATRIX_f()</a> <p> <a class="el" href="group__math.html#g468e83ca4de52ed839978d48f5dbe111" title="Converts an OpenGL floating-point matrix issued from the matrix stack to an Allegro...">allegro_gl_GLfloat_to_MATRIX()</a> </dd></dl> <p> Definition at line <a class="el" href="math_8c-source.html#l00114">114</a> of file <a class="el" href="math_8c-source.html">math.c</a>. </div> </div><p> <a class="anchor" name="g468e83ca4de52ed839978d48f5dbe111"></a><!-- doxytag: member="alleggl.h::allegro_gl_GLfloat_to_MATRIX" ref="g468e83ca4de52ed839978d48f5dbe111" args="(GLfloat gl[16], MATRIX *m)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void allegro_gl_GLfloat_to_MATRIX </td> <td>(</td> <td class="paramtype">GLfloat </td> <td class="paramname"> <em>gl</em>[16], </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">MATRIX * </td> <td class="paramname"> <em>m</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> Converts an OpenGL floating-point matrix issued from the matrix stack to an Allegro fixed-point matrix. <p> <dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__math.html#g4cf4f453cb3f95a1e7e861a7401b4a8d" title="Converts an Allegro fixed-point matrix to an array of floats suitable for OpenGL's...">allegro_gl_MATRIX_to_GLfloat()</a> <p> <a class="el" href="group__math.html#gee6cb48f8e3e70abecc6c282a8ea1edc" title="Converts an Allegro fixed-point matrix to an array of doubles suitable for OpenGL's...">allegro_gl_MATRIX_to_GLdouble()</a> <p> <a class="el" href="group__math.html#ge8e0ee18b9aeca955402be16de6ca79d" title="Converts an Allegro floating-point matrix to an array of floats suitable for OpenGL's...">allegro_gl_MATRIX_f_to_GLfloat()</a> <p> <a class="el" href="group__math.html#gb93f3588ea08b048f418023aa76cb3fc" title="Converts an Allegro floating-point matrix to an array of doubles suitable for OpenGL's...">allegro_gl_MATRIX_f_to_GLdouble()</a> <p> <a class="el" href="group__math.html#g68e2e0e9dcdba42004070a5f8f547994" title="Converts an OpenGL double precision floating-point matrix issued from the matrix...">allegro_gl_GLdouble_to_MATRIX()</a> <p> <a class="el" href="group__math.html#g08692466ae37d7888bbd5f5ee5aa9268" title="Converts an OpenGL floating-point matrix issued from the matrix stack to an Allegro...">allegro_gl_GLfloat_to_MATRIX_f()</a> <p> <a class="el" href="group__math.html#ga6b729a9e93e249a8a76e078e94a2b44" title="Converts an OpenGL double precision floating-point matrix issued from the matrix...">allegro_gl_GLdouble_to_MATRIX_f()</a> </dd></dl> <p> Definition at line <a class="el" href="math_8c-source.html#l00143">143</a> of file <a class="el" href="math_8c-source.html">math.c</a>. </div> </div><p> <a class="anchor" name="g68e2e0e9dcdba42004070a5f8f547994"></a><!-- doxytag: member="alleggl.h::allegro_gl_GLdouble_to_MATRIX" ref="g68e2e0e9dcdba42004070a5f8f547994" args="(GLdouble gl[16], MATRIX *m)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void allegro_gl_GLdouble_to_MATRIX </td> <td>(</td> <td class="paramtype">GLdouble </td> <td class="paramname"> <em>gl</em>[16], </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">MATRIX * </td> <td class="paramname"> <em>m</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> Converts an OpenGL double precision floating-point matrix issued from the matrix stack to an Allegro fixed-point matrix. <p> <dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__math.html#g4cf4f453cb3f95a1e7e861a7401b4a8d" title="Converts an Allegro fixed-point matrix to an array of floats suitable for OpenGL's...">allegro_gl_MATRIX_to_GLfloat()</a> <p> <a class="el" href="group__math.html#gee6cb48f8e3e70abecc6c282a8ea1edc" title="Converts an Allegro fixed-point matrix to an array of doubles suitable for OpenGL's...">allegro_gl_MATRIX_to_GLdouble()</a> <p> <a class="el" href="group__math.html#ge8e0ee18b9aeca955402be16de6ca79d" title="Converts an Allegro floating-point matrix to an array of floats suitable for OpenGL's...">allegro_gl_MATRIX_f_to_GLfloat()</a> <p> <a class="el" href="group__math.html#gb93f3588ea08b048f418023aa76cb3fc" title="Converts an Allegro floating-point matrix to an array of doubles suitable for OpenGL's...">allegro_gl_MATRIX_f_to_GLdouble()</a> <p> <a class="el" href="group__math.html#g08692466ae37d7888bbd5f5ee5aa9268" title="Converts an OpenGL floating-point matrix issued from the matrix stack to an Allegro...">allegro_gl_GLfloat_to_MATRIX_f()</a> <p> <a class="el" href="group__math.html#ga6b729a9e93e249a8a76e078e94a2b44" title="Converts an OpenGL double precision floating-point matrix issued from the matrix...">allegro_gl_GLdouble_to_MATRIX_f()</a> <p> <a class="el" href="group__math.html#g468e83ca4de52ed839978d48f5dbe111" title="Converts an OpenGL floating-point matrix issued from the matrix stack to an Allegro...">allegro_gl_GLfloat_to_MATRIX()</a> </dd></dl> <p> Definition at line <a class="el" href="math_8c-source.html#l00159">159</a> of file <a class="el" href="math_8c-source.html">math.c</a>. </div> </div><p> <a class="anchor" name="g08692466ae37d7888bbd5f5ee5aa9268"></a><!-- doxytag: member="alleggl.h::allegro_gl_GLfloat_to_MATRIX_f" ref="g08692466ae37d7888bbd5f5ee5aa9268" args="(GLfloat gl[16], MATRIX_f *m)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void allegro_gl_GLfloat_to_MATRIX_f </td> <td>(</td> <td class="paramtype">GLfloat </td> <td class="paramname"> <em>gl</em>[16], </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">MATRIX_f * </td> <td class="paramname"> <em>m</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> Converts an OpenGL floating-point matrix issued from the matrix stack to an Allegro floating-point matrix. <p> <dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__math.html#g4cf4f453cb3f95a1e7e861a7401b4a8d" title="Converts an Allegro fixed-point matrix to an array of floats suitable for OpenGL's...">allegro_gl_MATRIX_to_GLfloat()</a> <p> <a class="el" href="group__math.html#gee6cb48f8e3e70abecc6c282a8ea1edc" title="Converts an Allegro fixed-point matrix to an array of doubles suitable for OpenGL's...">allegro_gl_MATRIX_to_GLdouble()</a> <p> <a class="el" href="group__math.html#ge8e0ee18b9aeca955402be16de6ca79d" title="Converts an Allegro floating-point matrix to an array of floats suitable for OpenGL's...">allegro_gl_MATRIX_f_to_GLfloat()</a> <p> <a class="el" href="group__math.html#gb93f3588ea08b048f418023aa76cb3fc" title="Converts an Allegro floating-point matrix to an array of doubles suitable for OpenGL's...">allegro_gl_MATRIX_f_to_GLdouble()</a> <p> <a class="el" href="group__math.html#g68e2e0e9dcdba42004070a5f8f547994" title="Converts an OpenGL double precision floating-point matrix issued from the matrix...">allegro_gl_GLdouble_to_MATRIX()</a> <p> <a class="el" href="group__math.html#ga6b729a9e93e249a8a76e078e94a2b44" title="Converts an OpenGL double precision floating-point matrix issued from the matrix...">allegro_gl_GLdouble_to_MATRIX_f()</a> <p> <a class="el" href="group__math.html#g468e83ca4de52ed839978d48f5dbe111" title="Converts an OpenGL floating-point matrix issued from the matrix stack to an Allegro...">allegro_gl_GLfloat_to_MATRIX()</a> </dd></dl> <p> Definition at line <a class="el" href="math_8c-source.html#l00175">175</a> of file <a class="el" href="math_8c-source.html">math.c</a>. </div> </div><p> <a class="anchor" name="ga6b729a9e93e249a8a76e078e94a2b44"></a><!-- doxytag: member="alleggl.h::allegro_gl_GLdouble_to_MATRIX_f" ref="ga6b729a9e93e249a8a76e078e94a2b44" args="(GLdouble gl[16], MATRIX_f *m)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void allegro_gl_GLdouble_to_MATRIX_f </td> <td>(</td> <td class="paramtype">GLdouble </td> <td class="paramname"> <em>gl</em>[16], </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">MATRIX_f * </td> <td class="paramname"> <em>m</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> Converts an OpenGL double precision floating-point matrix issued from the matrix stack to an Allegro single-precision floating-point matrix. <p> <dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__math.html#g4cf4f453cb3f95a1e7e861a7401b4a8d" title="Converts an Allegro fixed-point matrix to an array of floats suitable for OpenGL's...">allegro_gl_MATRIX_to_GLfloat()</a> <p> <a class="el" href="group__math.html#gee6cb48f8e3e70abecc6c282a8ea1edc" title="Converts an Allegro fixed-point matrix to an array of doubles suitable for OpenGL's...">allegro_gl_MATRIX_to_GLdouble()</a> <p> <a class="el" href="group__math.html#ge8e0ee18b9aeca955402be16de6ca79d" title="Converts an Allegro floating-point matrix to an array of floats suitable for OpenGL's...">allegro_gl_MATRIX_f_to_GLfloat()</a> <p> <a class="el" href="group__math.html#gb93f3588ea08b048f418023aa76cb3fc" title="Converts an Allegro floating-point matrix to an array of doubles suitable for OpenGL's...">allegro_gl_MATRIX_f_to_GLdouble()</a> <p> <a class="el" href="group__math.html#g68e2e0e9dcdba42004070a5f8f547994" title="Converts an OpenGL double precision floating-point matrix issued from the matrix...">allegro_gl_GLdouble_to_MATRIX()</a> <p> <a class="el" href="group__math.html#g08692466ae37d7888bbd5f5ee5aa9268" title="Converts an OpenGL floating-point matrix issued from the matrix stack to an Allegro...">allegro_gl_GLfloat_to_MATRIX_f()</a> <p> <a class="el" href="group__math.html#g468e83ca4de52ed839978d48f5dbe111" title="Converts an OpenGL floating-point matrix issued from the matrix stack to an Allegro...">allegro_gl_GLfloat_to_MATRIX()</a> </dd></dl> <p> Definition at line <a class="el" href="math_8c-source.html#l00192">192</a> of file <a class="el" href="math_8c-source.html">math.c</a>. </div> </div><p> <a class="anchor" name="ga83a678516d8a7a5503a2b0c9014cb64"></a><!-- doxytag: member="alleggl.h::allegro_gl_apply_quat" ref="ga83a678516d8a7a5503a2b0c9014cb64" args="(QUAT *q)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void allegro_gl_apply_quat </td> <td>(</td> <td class="paramtype">QUAT * </td> <td class="paramname"> <em>q</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> Multiplies the Quaternion to the current transformation matrix, by converting it to a call to glRotatef(). <p> <b>Example:</b> <pre> QUAT q = identity_quat; get_vector_rotation_quat(&q, itofix(1), 0, itofix(1), ftofix(43.83)); glLoadIdentity(); allegro_gl_apply_quat(&q); </pre><p> <dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__math.html#gb00b667363181a8f0853121170bebaca" title="Converts a quaternion to a vector/angle, which can be used with glRotate*().">allegro_gl_quat_to_glrotatef()</a>, <a class="el" href="group__math.html#g956160418e1c0c37143dd3cee54477ce" title="Converts a quaternion to a vector/angle, which can be used with glRotate*().">allegro_gl_quat_to_glrotated()</a></dd></dl> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>q</em> </td><td>The Quaternion to apply. </td></tr> </table> </dl> <p> Definition at line <a class="el" href="math_8c-source.html#l00222">222</a> of file <a class="el" href="math_8c-source.html">math.c</a>. <p> References <a class="el" href="alleggl_8c-source.html#l00037">__allegro_gl_valid_context</a>, and <a class="el" href="math_8c-source.html#l00199">RAD_2_DEG</a>. </div> </div><p> <a class="anchor" name="gb00b667363181a8f0853121170bebaca"></a><!-- doxytag: member="alleggl.h::allegro_gl_quat_to_glrotatef" ref="gb00b667363181a8f0853121170bebaca" args="(QUAT *q, float *angle, float *x, float *y, float *z)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void allegro_gl_quat_to_glrotatef </td> <td>(</td> <td class="paramtype">QUAT * </td> <td class="paramname"> <em>q</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">float * </td> <td class="paramname"> <em>angle</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">float * </td> <td class="paramname"> <em>x</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">float * </td> <td class="paramname"> <em>y</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">float * </td> <td class="paramname"> <em>z</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> Converts a quaternion to a vector/angle, which can be used with glRotate*(). <p> Values are returned in the parameters.<p> <b>Example:</b> <pre> QUAT q = identity_quat; float x, y, z, angle; allegro_gl_quat_to_glrotatef(&q, &angle, &x, &y, &z); glRotatef(angle, x, y, z); </pre><p> <dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__math.html#g956160418e1c0c37143dd3cee54477ce" title="Converts a quaternion to a vector/angle, which can be used with glRotate*().">allegro_gl_quat_to_glrotated()</a>, <a class="el" href="group__math.html#ga83a678516d8a7a5503a2b0c9014cb64" title="Multiplies the Quaternion to the current transformation matrix, by converting it...">allegro_gl_apply_quat()</a></dd></dl> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>q</em> </td><td>The Quaternion to convert. </td></tr> <tr><td valign="top"></td><td valign="top"><em>angle</em> </td><td>The angle of rotation, in degrees. </td></tr> <tr><td valign="top"></td><td valign="top"><em>x</em> </td><td>The rotation vector's x-axis component. </td></tr> <tr><td valign="top"></td><td valign="top"><em>y</em> </td><td>The rotation vector's y-axis component. </td></tr> <tr><td valign="top"></td><td valign="top"><em>z</em> </td><td>The rotation vector's z-axis component. </td></tr> </table> </dl> <p> Definition at line <a class="el" href="math_8c-source.html#l00258">258</a> of file <a class="el" href="math_8c-source.html">math.c</a>. <p> References <a class="el" href="math_8c-source.html#l00199">RAD_2_DEG</a>. </div> </div><p> <a class="anchor" name="g956160418e1c0c37143dd3cee54477ce"></a><!-- doxytag: member="alleggl.h::allegro_gl_quat_to_glrotated" ref="g956160418e1c0c37143dd3cee54477ce" args="(QUAT *q, double *angle, double *x, double *y, double *z)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void allegro_gl_quat_to_glrotated </td> <td>(</td> <td class="paramtype">QUAT * </td> <td class="paramname"> <em>q</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">double * </td> <td class="paramname"> <em>angle</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">double * </td> <td class="paramname"> <em>x</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">double * </td> <td class="paramname"> <em>y</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">double * </td> <td class="paramname"> <em>z</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> Converts a quaternion to a vector/angle, which can be used with glRotate*(). <p> Values are returned in the parameters. See allegro_gl_quat_to_rotatef() for an example.<p> <dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__math.html#gb00b667363181a8f0853121170bebaca" title="Converts a quaternion to a vector/angle, which can be used with glRotate*().">allegro_gl_quat_to_glrotatef()</a>, <a class="el" href="group__math.html#ga83a678516d8a7a5503a2b0c9014cb64" title="Multiplies the Quaternion to the current transformation matrix, by converting it...">allegro_gl_apply_quat()</a></dd></dl> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>q</em> </td><td>The Quaternion to convert. </td></tr> <tr><td valign="top"></td><td valign="top"><em>angle</em> </td><td>The angle of rotation, in degrees. </td></tr> <tr><td valign="top"></td><td valign="top"><em>x</em> </td><td>The rotation vector's x-axis component. </td></tr> <tr><td valign="top"></td><td valign="top"><em>y</em> </td><td>The rotation vector's y-axis component. </td></tr> <tr><td valign="top"></td><td valign="top"><em>z</em> </td><td>The rotation vector's z-axis component. </td></tr> </table> </dl> <p> Definition at line <a class="el" href="math_8c-source.html#l00290">290</a> of file <a class="el" href="math_8c-source.html">math.c</a>. <p> References <a class="el" href="math_8c-source.html#l00199">RAD_2_DEG</a>. </div> </div><p> <hr size="1"><address style="text-align: right;"><small>Generated on Mon Nov 12 11:05:32 2007 for AllegroGL by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.2 </small></address> </body> </html>