1 /* $Id: matrix.h,v 1.1 1999/08/19 00:55:41 jtg Exp $ */
4 * Mesa 3-D graphics library
7 * Copyright (C) 1999 Brian Paul All Rights Reserved.
9 * Permission is hereby granted, free of charge, to any person obtaining a
10 * copy of this software and associated documentation files (the "Software"),
11 * to deal in the Software without restriction, including without limitation
12 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
13 * and/or sell copies of the Software, and to permit persons to whom the
14 * Software is furnished to do so, subject to the following conditions:
16 * The above copyright notice and this permission notice shall be included
17 * in all copies or substantial portions of the Software.
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
20 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
23 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
40 GLfloat
*inv
; /* optional */
46 #define gl_calculate_model_project_matrix gl_calculate_model_project_matr
50 extern void gl_rotation_matrix( GLfloat angle
, GLfloat x
, GLfloat y
, GLfloat z
,
55 extern void gl_Frustum( GLcontext
*ctx
,
56 GLdouble left
, GLdouble right
,
57 GLdouble bottom
, GLdouble top
,
58 GLdouble nearval
, GLdouble farval
);
60 extern void gl_Ortho( GLcontext
*ctx
,
61 GLdouble left
, GLdouble right
,
62 GLdouble bottom
, GLdouble top
,
63 GLdouble nearval
, GLdouble farval
);
65 extern void gl_PushMatrix( GLcontext
*ctx
);
67 extern void gl_PopMatrix( GLcontext
*ctx
);
69 extern void gl_LoadIdentity( GLcontext
*ctx
);
71 extern void gl_LoadMatrixf( GLcontext
*ctx
, const GLfloat
*m
);
73 extern void gl_MatrixMode( GLcontext
*ctx
, GLenum mode
);
75 extern void gl_MultMatrixf( GLcontext
*ctx
, const GLfloat
*m
);
77 extern void gl_mat_mul_floats( GLmatrix
*mat
, const GLfloat
*m
, GLuint flags
);
78 extern void gl_mat_mul_mat( GLmatrix
*mat
, const GLmatrix
*mat2
);
80 extern void gl_Rotatef( GLcontext
*ctx
,
81 GLfloat angle
, GLfloat x
, GLfloat y
, GLfloat z
);
83 extern void gl_Scalef( GLcontext
*ctx
, GLfloat x
, GLfloat y
, GLfloat z
);
85 extern void gl_Translatef( GLcontext
*ctx
, GLfloat x
, GLfloat y
, GLfloat z
);
87 extern void gl_Viewport( GLcontext
*ctx
,
88 GLint x
, GLint y
, GLsizei width
, GLsizei height
);
90 extern void gl_DepthRange( GLcontext
* ctx
, GLclampd nearval
, GLclampd farval
);
96 extern void gl_calculate_model_project_matrix( GLcontext
*ctx
);
99 extern void gl_matrix_ctr( GLmatrix
*m
);
101 extern void gl_matrix_dtr( GLmatrix
*m
);
103 extern void gl_matrix_alloc_inv( GLmatrix
*m
);
105 extern void gl_matrix_copy( GLmatrix
*to
, const GLmatrix
*from
);
107 extern void gl_matrix_mul( GLmatrix
*dest
,
111 extern void gl_matrix_analyze( GLmatrix
*mat
);