1 /* $Id: matrix.h,v 1.4 1999/11/12 18:10:47 brianp 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.
38 GLfloat
*inv
; /* optional */
45 #define gl_calculate_model_project_matrix gl_calculate_model_project_matr
49 extern void gl_rotation_matrix( GLfloat angle
, GLfloat x
, GLfloat y
, GLfloat z
,
53 extern void gl_mat_mul_floats( GLmatrix
*mat
, const GLfloat
*m
, GLuint flags
);
55 extern void gl_mat_mul_mat( GLmatrix
*mat
, const GLmatrix
*mat2
);
57 extern void gl_calculate_model_project_matrix( GLcontext
*ctx
);
59 extern void gl_matrix_ctr( GLmatrix
*m
);
61 extern void gl_matrix_dtr( GLmatrix
*m
);
63 extern void gl_matrix_alloc_inv( GLmatrix
*m
);
65 extern void gl_matrix_copy( GLmatrix
*to
, const GLmatrix
*from
);
67 extern void gl_matrix_mul( GLmatrix
*dest
,
71 extern void gl_matrix_analyze( GLmatrix
*mat
);
73 extern GLboolean
gl_matrix_invert( GLmatrix
*mat
);
75 extern void gl_print_matrix( const GLmatrix
*m
);
80 _mesa_Frustum( GLdouble left
, GLdouble right
,
81 GLdouble bottom
, GLdouble top
,
82 GLdouble nearval
, GLdouble farval
);
85 _mesa_Ortho( GLdouble left
, GLdouble right
,
86 GLdouble bottom
, GLdouble top
,
87 GLdouble nearval
, GLdouble farval
);
90 _mesa_PushMatrix( void );
93 _mesa_PopMatrix( void );
96 _mesa_LoadIdentity( void );
99 _mesa_LoadMatrixf( const GLfloat
*m
);
102 _mesa_LoadMatrixd( const GLdouble
*m
);
105 _mesa_MatrixMode( GLenum mode
);
108 _mesa_MultMatrixf( const GLfloat
*m
);
111 _mesa_MultMatrixd( const GLdouble
*m
);
114 _mesa_Rotatef( GLfloat angle
, GLfloat x
, GLfloat y
, GLfloat z
);
117 _mesa_Rotated( GLdouble angle
, GLdouble x
, GLdouble y
, GLdouble z
);
120 _mesa_Scalef( GLfloat x
, GLfloat y
, GLfloat z
);
123 _mesa_Scaled( GLdouble x
, GLdouble y
, GLdouble z
);
126 _mesa_Translatef( GLfloat x
, GLfloat y
, GLfloat z
);
129 _mesa_Translated( GLdouble x
, GLdouble y
, GLdouble z
);
132 _mesa_Viewport( GLint x
, GLint y
, GLsizei width
, GLsizei height
);
135 gl_Viewport( GLcontext
*ctx
, GLint x
, GLint y
, GLsizei width
, GLsizei height
);
138 _mesa_DepthRange( GLclampd nearval
, GLclampd farval
);