source: trunk/src/opengl/mesa/matrix.h@ 3721

Last change on this file since 3721 was 3597, checked in by jeroen, 25 years ago

* empty log message *

File size: 4.0 KB
Line 
1/* $Id: matrix.h,v 1.2 2000-05-23 20:34:52 jeroen Exp $ */
2
3/*
4 * Mesa 3-D graphics library
5 * Version: 3.3
6 *
7 * Copyright (C) 1999 Brian Paul All Rights Reserved.
8 *
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:
15 *
16 * The above copyright notice and this permission notice shall be included
17 * in all copies or substantial portions of the Software.
18 *
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.
25 */
26
27
28
29
30
31#ifndef MATRIX_H
32#define MATRIX_H
33
34
35#include "config.h"
36
37typedef struct {
38 GLfloat m[16];
39 GLfloat *inv; /* optional*/
40 GLuint flags;
41 GLuint type;
42} GLmatrix;
43
44
45#ifdef VMS
46#define gl_calculate_model_project_matrix gl_calculate_model_project_matr
47#endif
48
49
50extern void gl_matrix_transposef( GLfloat to[16], const GLfloat from[16] );
51
52extern void gl_matrix_transposed( GLdouble to[16], const GLdouble from[16] );
53
54
55extern void gl_rotation_matrix( GLfloat angle, GLfloat x, GLfloat y, GLfloat z,
56 GLfloat m[] );
57
58
59extern void gl_mat_mul_floats( GLmatrix *mat, const GLfloat *m, GLuint flags );
60
61extern void gl_mat_mul_mat( GLmatrix *mat, const GLmatrix *mat2 );
62
63extern void gl_calculate_model_project_matrix( GLcontext *ctx );
64
65extern void gl_matrix_copy( GLmatrix *to, const GLmatrix *from );
66
67extern void gl_matrix_ctr( GLmatrix *m );
68
69extern void gl_matrix_dtr( GLmatrix *m );
70
71extern void gl_matrix_alloc_inv( GLmatrix *m );
72
73extern void gl_matrix_mul( GLmatrix *dest,
74 const GLmatrix *a,
75 const GLmatrix *b );
76
77extern void gl_matrix_analyze( GLmatrix *mat );
78
79extern GLboolean gl_matrix_invert( GLmatrix *mat );
80
81extern void gl_print_matrix( const GLmatrix *m );
82
83
84
85extern void
86_mesa_Frustum( GLdouble left, GLdouble right,
87 GLdouble bottom, GLdouble top,
88 GLdouble nearval, GLdouble farval );
89
90extern void
91_mesa_Ortho( GLdouble left, GLdouble right,
92 GLdouble bottom, GLdouble top,
93 GLdouble nearval, GLdouble farval );
94
95extern void
96_mesa_PushMatrix( void );
97
98extern void
99_mesa_PopMatrix( void );
100
101extern void
102_mesa_LoadIdentity( void );
103
104extern void
105_mesa_LoadMatrixf( const GLfloat *m );
106
107extern void
108_mesa_LoadMatrixd( const GLdouble *m );
109
110extern void
111_mesa_MatrixMode( GLenum mode );
112
113extern void
114_mesa_MultMatrixf( const GLfloat *m );
115
116extern void
117_mesa_MultMatrixd( const GLdouble *m );
118
119extern void
120_mesa_Rotatef( GLfloat angle, GLfloat x, GLfloat y, GLfloat z );
121
122extern void
123_mesa_Rotated( GLdouble angle, GLdouble x, GLdouble y, GLdouble z );
124
125extern void
126_mesa_Scalef( GLfloat x, GLfloat y, GLfloat z );
127
128extern void
129_mesa_Scaled( GLdouble x, GLdouble y, GLdouble z );
130
131extern void
132_mesa_Translatef( GLfloat x, GLfloat y, GLfloat z );
133
134extern void
135_mesa_Translated( GLdouble x, GLdouble y, GLdouble z );
136
137extern void
138_mesa_LoadTransposeMatrixfARB( const GLfloat *m );
139
140extern void
141_mesa_LoadTransposeMatrixdARB( const GLdouble *m );
142
143extern void
144_mesa_MultTransposeMatrixfARB( const GLfloat *m );
145
146extern void
147_mesa_MultTransposeMatrixdARB( const GLdouble *m );
148
149extern void
150_mesa_Viewport( GLint x, GLint y, GLsizei width, GLsizei height );
151
152extern void
153gl_Viewport( GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height );
154
155extern void
156_mesa_DepthRange( GLclampd nearval, GLclampd farval );
157
158
159
160#endif
Note: See TracBrowser for help on using the repository browser.