123caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell/* 223caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell * Mesa 3-D graphics library 3049e320f46f3a3daaa36ef67cc680dc504c124d5Brian Paul * Version: 6.3 422144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes * 5049e320f46f3a3daaa36ef67cc680dc504c124d5Brian Paul * Copyright (C) 1999-2005 Brian Paul All Rights Reserved. 622144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes * 723caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell * Permission is hereby granted, free of charge, to any person obtaining a 823caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell * copy of this software and associated documentation files (the "Software"), 923caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell * to deal in the Software without restriction, including without limitation 1023caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell * the rights to use, copy, modify, merge, publish, distribute, sublicense, 1123caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell * and/or sell copies of the Software, and to permit persons to whom the 1223caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell * Software is furnished to do so, subject to the following conditions: 1322144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes * 1423caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell * The above copyright notice and this permission notice shall be included 1523caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell * in all copies or substantial portions of the Software. 1622144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes * 1723caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1823caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1923caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 2023caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 2123caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 2223caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 2323caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell */ 2423caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell 2523caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell 267dc9a8827d7c248826adc5db0d1bf148d2e233f7Brian Paul/** 277dc9a8827d7c248826adc5db0d1bf148d2e233f7Brian Paul * \file math/m_matrix.h 287dc9a8827d7c248826adc5db0d1bf148d2e233f7Brian Paul * Defines basic structures for matrix-handling. 297dc9a8827d7c248826adc5db0d1bf148d2e233f7Brian Paul */ 307dc9a8827d7c248826adc5db0d1bf148d2e233f7Brian Paul 3123caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell#ifndef _M_MATRIX_H 3223caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell#define _M_MATRIX_H 3323caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell 3423caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell 3529495bbb84a4f4517b108f2e88e0edc60bb4a341Vinson Lee#include "main/glheader.h" 3629495bbb84a4f4517b108f2e88e0edc60bb4a341Vinson Lee 3723caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell 3863e7a4c6e5bf51d8090046ebc5adcb4207448565José Fonseca#ifdef __cplusplus 3963e7a4c6e5bf51d8090046ebc5adcb4207448565José Fonsecaextern "C" { 4063e7a4c6e5bf51d8090046ebc5adcb4207448565José Fonseca#endif 4163e7a4c6e5bf51d8090046ebc5adcb4207448565José Fonseca 4263e7a4c6e5bf51d8090046ebc5adcb4207448565José Fonseca 436dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/** 446dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell * \name Symbolic names to some of the entries in the matrix 456dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell * 467dc9a8827d7c248826adc5db0d1bf148d2e233f7Brian Paul * These are handy for the viewport mapping, which is expressed as a matrix. 4723caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell */ 486dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/*@{*/ 4923caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell#define MAT_SX 0 5023caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell#define MAT_SY 5 5123caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell#define MAT_SZ 10 5223caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell#define MAT_TX 12 5323caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell#define MAT_TY 13 5423caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell#define MAT_TZ 14 556dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/*@}*/ 5623caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell 577dc9a8827d7c248826adc5db0d1bf148d2e233f7Brian Paul 58449e47f06a46c42fb9895d13f37b599600225e56Brian Paul/** 596dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell * Different kinds of 4x4 transformation matrices. 607dc9a8827d7c248826adc5db0d1bf148d2e233f7Brian Paul * We use these to select specific optimized vertex transformation routines. 616dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell */ 626dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwellenum GLmatrixtype { 637dc9a8827d7c248826adc5db0d1bf148d2e233f7Brian Paul MATRIX_GENERAL, /**< general 4x4 matrix */ 647dc9a8827d7c248826adc5db0d1bf148d2e233f7Brian Paul MATRIX_IDENTITY, /**< identity matrix */ 657dc9a8827d7c248826adc5db0d1bf148d2e233f7Brian Paul MATRIX_3D_NO_ROT, /**< orthogonal projection and others... */ 667dc9a8827d7c248826adc5db0d1bf148d2e233f7Brian Paul MATRIX_PERSPECTIVE, /**< perspective projection matrix */ 677dc9a8827d7c248826adc5db0d1bf148d2e233f7Brian Paul MATRIX_2D, /**< 2-D transformation */ 687dc9a8827d7c248826adc5db0d1bf148d2e233f7Brian Paul MATRIX_2D_NO_ROT, /**< 2-D scale & translate only */ 697dc9a8827d7c248826adc5db0d1bf148d2e233f7Brian Paul MATRIX_3D /**< 3-D transformation */ 706dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell} ; 71adb1a2911aaaa2dad09b955b20834eb3e1e9caf7Brian Paul 726dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/** 737dc9a8827d7c248826adc5db0d1bf148d2e233f7Brian Paul * Matrix type to represent 4x4 transformation matrices. 746dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell */ 7523caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwelltypedef struct { 767dc9a8827d7c248826adc5db0d1bf148d2e233f7Brian Paul GLfloat *m; /**< 16 matrix elements (16-byte aligned) */ 7766d9ac5ac7896538d38f57950888a0184c933925Brian Paul GLfloat *inv; /**< 16-element inverse (16-byte aligned) */ 78449e47f06a46c42fb9895d13f37b599600225e56Brian Paul GLuint flags; /**< possible values determined by (of \link 797dc9a8827d7c248826adc5db0d1bf148d2e233f7Brian Paul * MatFlags MAT_FLAG_* flags\endlink) 807dc9a8827d7c248826adc5db0d1bf148d2e233f7Brian Paul */ 816dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell enum GLmatrixtype type; 8223caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell} GLmatrix; 8323caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell 8423caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell 8523caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell 8623caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell 8723caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwellextern void 8823caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell_math_matrix_ctr( GLmatrix *m ); 8923caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell 9023caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwellextern void 9123caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell_math_matrix_dtr( GLmatrix *m ); 9223caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell 9323caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwellextern void 9423caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell_math_matrix_mul_matrix( GLmatrix *dest, const GLmatrix *a, const GLmatrix *b ); 9523caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell 9623caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwellextern void 9723caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell_math_matrix_mul_floats( GLmatrix *dest, const GLfloat *b ); 9823caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell 9922144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughesextern void 10023caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell_math_matrix_loadf( GLmatrix *mat, const GLfloat *m ); 10123caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell 10222144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughesextern void 10323caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell_math_matrix_translate( GLmatrix *mat, GLfloat x, GLfloat y, GLfloat z ); 10423caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell 10523caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwellextern void 10622144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes_math_matrix_rotate( GLmatrix *m, GLfloat angle, 10723caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell GLfloat x, GLfloat y, GLfloat z ); 10823caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell 10922144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughesextern void 11023caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell_math_matrix_scale( GLmatrix *mat, GLfloat x, GLfloat y, GLfloat z ); 11123caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell 11223caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwellextern void 11322144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes_math_matrix_ortho( GLmatrix *mat, 11423caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell GLfloat left, GLfloat right, 11522144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes GLfloat bottom, GLfloat top, 11623caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell GLfloat nearval, GLfloat farval ); 11723caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell 11823caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwellextern void 11922144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes_math_matrix_frustum( GLmatrix *mat, 120d8bc5a9eba720ffb6a503d32715f895dbdad7197Brian Paul GLfloat left, GLfloat right, 12122144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes GLfloat bottom, GLfloat top, 122d8bc5a9eba720ffb6a503d32715f895dbdad7197Brian Paul GLfloat nearval, GLfloat farval ); 12323caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell 12423caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwellextern void 125049e320f46f3a3daaa36ef67cc680dc504c124d5Brian Paul_math_matrix_viewport(GLmatrix *m, GLint x, GLint y, GLint width, GLint height, 126049e320f46f3a3daaa36ef67cc680dc504c124d5Brian Paul GLfloat zNear, GLfloat zFar, GLfloat depthMax); 127049e320f46f3a3daaa36ef67cc680dc504c124d5Brian Paul 128049e320f46f3a3daaa36ef67cc680dc504c124d5Brian Paulextern void 12923caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell_math_matrix_set_identity( GLmatrix *dest ); 13023caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell 13122144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughesextern void 13223caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell_math_matrix_copy( GLmatrix *to, const GLmatrix *from ); 13323caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell 13423caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwellextern void 135ad2ac216fa0cbebc36530bf9e5256e902710b892Keith Whitwell_math_matrix_analyse( GLmatrix *mat ); 13623caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell 13723caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwellextern void 13823caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell_math_matrix_print( const GLmatrix *m ); 13923caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell 140049e320f46f3a3daaa36ef67cc680dc504c124d5Brian Paulextern GLboolean 141049e320f46f3a3daaa36ef67cc680dc504c124d5Brian Paul_math_matrix_is_length_preserving( const GLmatrix *m ); 142049e320f46f3a3daaa36ef67cc680dc504c124d5Brian Paul 143049e320f46f3a3daaa36ef67cc680dc504c124d5Brian Paulextern GLboolean 144049e320f46f3a3daaa36ef67cc680dc504c124d5Brian Paul_math_matrix_has_rotation( const GLmatrix *m ); 145049e320f46f3a3daaa36ef67cc680dc504c124d5Brian Paul 146049e320f46f3a3daaa36ef67cc680dc504c124d5Brian Paulextern GLboolean 147049e320f46f3a3daaa36ef67cc680dc504c124d5Brian Paul_math_matrix_is_general_scale( const GLmatrix *m ); 148049e320f46f3a3daaa36ef67cc680dc504c124d5Brian Paul 149049e320f46f3a3daaa36ef67cc680dc504c124d5Brian Paulextern GLboolean 150049e320f46f3a3daaa36ef67cc680dc504c124d5Brian Paul_math_matrix_is_dirty( const GLmatrix *m ); 15123caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell 15223caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell 1536dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/** 1546dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell * \name Related functions that don't actually operate on GLmatrix structs 15523caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell */ 1566dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/*@{*/ 1576dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell 15823caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwellextern void 15923caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell_math_transposef( GLfloat to[16], const GLfloat from[16] ); 16023caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell 16123caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwellextern void 16223caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell_math_transposed( GLdouble to[16], const GLdouble from[16] ); 16323caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell 16423caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwellextern void 16523caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell_math_transposefd( GLfloat to[16], const GLdouble from[16] ); 16623caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell 16723caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell 1686dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/* 1696dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell * Transform a point (column vector) by a matrix: Q = M * P 1706dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell */ 1716dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell#define TRANSFORM_POINT( Q, M, P ) \ 1726dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell Q[0] = M[0] * P[0] + M[4] * P[1] + M[8] * P[2] + M[12] * P[3]; \ 1736dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell Q[1] = M[1] * P[0] + M[5] * P[1] + M[9] * P[2] + M[13] * P[3]; \ 1746dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell Q[2] = M[2] * P[0] + M[6] * P[1] + M[10] * P[2] + M[14] * P[3]; \ 1756dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell Q[3] = M[3] * P[0] + M[7] * P[1] + M[11] * P[2] + M[15] * P[3]; 1766dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell 1776dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell 1786dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell#define TRANSFORM_POINT3( Q, M, P ) \ 1796dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell Q[0] = M[0] * P[0] + M[4] * P[1] + M[8] * P[2] + M[12]; \ 1806dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell Q[1] = M[1] * P[0] + M[5] * P[1] + M[9] * P[2] + M[13]; \ 1816dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell Q[2] = M[2] * P[0] + M[6] * P[1] + M[10] * P[2] + M[14]; \ 1826dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell Q[3] = M[3] * P[0] + M[7] * P[1] + M[11] * P[2] + M[15]; 1836dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell 1846dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell 1856dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/* 1866dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell * Transform a normal (row vector) by a matrix: [NX NY NZ] = N * MAT 1876dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell */ 1886dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell#define TRANSFORM_NORMAL( TO, N, MAT ) \ 1896dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwelldo { \ 1906dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell TO[0] = N[0] * MAT[0] + N[1] * MAT[1] + N[2] * MAT[2]; \ 1916dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell TO[1] = N[0] * MAT[4] + N[1] * MAT[5] + N[2] * MAT[6]; \ 1926dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell TO[2] = N[0] * MAT[8] + N[1] * MAT[9] + N[2] * MAT[10]; \ 1936dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell} while (0) 1946dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell 1956dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell 196c12d24b513a67648c30bf892964f887fad71e103Brian Paul/** 197c12d24b513a67648c30bf892964f887fad71e103Brian Paul * Transform a direction by a matrix. 198c12d24b513a67648c30bf892964f887fad71e103Brian Paul */ 199c12d24b513a67648c30bf892964f887fad71e103Brian Paul#define TRANSFORM_DIRECTION( TO, DIR, MAT ) \ 200c12d24b513a67648c30bf892964f887fad71e103Brian Pauldo { \ 201c12d24b513a67648c30bf892964f887fad71e103Brian Paul TO[0] = DIR[0] * MAT[0] + DIR[1] * MAT[4] + DIR[2] * MAT[8]; \ 202c12d24b513a67648c30bf892964f887fad71e103Brian Paul TO[1] = DIR[0] * MAT[1] + DIR[1] * MAT[5] + DIR[2] * MAT[9]; \ 203c12d24b513a67648c30bf892964f887fad71e103Brian Paul TO[2] = DIR[0] * MAT[2] + DIR[1] * MAT[6] + DIR[2] * MAT[10];\ 204c12d24b513a67648c30bf892964f887fad71e103Brian Paul} while (0) 205c12d24b513a67648c30bf892964f887fad71e103Brian Paul 206c12d24b513a67648c30bf892964f887fad71e103Brian Paul 207987aedd7dc75c095a96cb20b21bbad2f71857776Brian Paulextern void 208987aedd7dc75c095a96cb20b21bbad2f71857776Brian Paul_mesa_transform_vector(GLfloat u[4], const GLfloat v[4], const GLfloat m[16]); 209987aedd7dc75c095a96cb20b21bbad2f71857776Brian Paul 210c12d24b513a67648c30bf892964f887fad71e103Brian Paul 2116dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/*@}*/ 21223caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell 21323caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell 21463e7a4c6e5bf51d8090046ebc5adcb4207448565José Fonseca#ifdef __cplusplus 21563e7a4c6e5bf51d8090046ebc5adcb4207448565José Fonseca} 21663e7a4c6e5bf51d8090046ebc5adcb4207448565José Fonseca#endif 21763e7a4c6e5bf51d8090046ebc5adcb4207448565José Fonseca 21823caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell#endif 219