core  array_cache  math  swrast  swrast_setup  tnl  tnl_dd 
Main Page   Data Structures   File List   Data Fields   Globals   Related Pages  

matrix.h File Reference

Matrix operations. More...

#include "mtypes.h"

Functions

void GLAPIENTRY _mesa_Frustum (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble nearval, GLdouble farval)
 Apply a perspective projection matrix. More...

void GLAPIENTRY _mesa_Ortho (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble nearval, GLdouble farval)
 Apply an orthographic projection matrix. More...

void GLAPIENTRY _mesa_PushMatrix (void)
 Push the current matrix stack. More...

void GLAPIENTRY _mesa_PopMatrix (void)
 Pop the current matrix stack. More...

void GLAPIENTRY _mesa_LoadIdentity (void)
 Replace the current matrix with the identity matrix. More...

void GLAPIENTRY _mesa_LoadMatrixf (const GLfloat *m)
 Replace the current matrix with a given matrix. More...

void GLAPIENTRY _mesa_LoadMatrixd (const GLdouble *m)
void GLAPIENTRY _mesa_MatrixMode (GLenum mode)
 Set the current matrix stack. More...

void GLAPIENTRY _mesa_MultMatrixf (const GLfloat *m)
 Multiply the current matrix with a given matrix. More...

void GLAPIENTRY _mesa_MultMatrixd (const GLdouble *m)
void GLAPIENTRY _mesa_Rotatef (GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
 Multiply the current matrix with a rotation matrix. More...

void GLAPIENTRY _mesa_Rotated (GLdouble angle, GLdouble x, GLdouble y, GLdouble z)
void GLAPIENTRY _mesa_Scalef (GLfloat x, GLfloat y, GLfloat z)
 Multiply the current matrix with a general scaling matrix. More...

void GLAPIENTRY _mesa_Scaled (GLdouble x, GLdouble y, GLdouble z)
void GLAPIENTRY _mesa_Translatef (GLfloat x, GLfloat y, GLfloat z)
 Multiply the current matrix with a general scaling matrix. More...

void GLAPIENTRY _mesa_Translated (GLdouble x, GLdouble y, GLdouble z)
void GLAPIENTRY _mesa_LoadTransposeMatrixfARB (const GLfloat *m)
void GLAPIENTRY _mesa_LoadTransposeMatrixdARB (const GLdouble *m)
void GLAPIENTRY _mesa_MultTransposeMatrixfARB (const GLfloat *m)
void GLAPIENTRY _mesa_MultTransposeMatrixdARB (const GLdouble *m)
void GLAPIENTRY _mesa_Viewport (GLint x, GLint y, GLsizei width, GLsizei height)
 Set the viewport. More...

void _mesa_set_viewport (GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height)
 Set new viewport parameters and update derived state (the _WindowMap matrix). More...

void GLAPIENTRY _mesa_DepthRange (GLclampd nearval, GLclampd farval)
void _mesa_init_matrix (GLcontext *ctx)
 Initialize the context matrix data. More...

void _mesa_init_transform (GLcontext *ctx)
 Initialize the context transform attribute group. More...

void _mesa_init_viewport (GLcontext *ctx)
 Initialize the context viewport attribute group. More...

void _mesa_free_matrix_data (GLcontext *ctx)
 Free the context matrix data. More...

void _mesa_free_viewport_data (GLcontext *ctx)
 Free the context viewport attribute group data. More...

void _mesa_update_modelview_project (GLcontext *ctx, GLuint newstate)
 Updates the combined modelview-projection matrix. More...


Detailed Description

Matrix operations.


Function Documentation

void GLAPIENTRY _mesa_DepthRange GLclampd    nearval,
GLclampd    farval
 

void _mesa_free_matrix_data GLcontext   ctx
 

Free the context matrix data.

Parameters:
ctx  GL context.
Frees each of the matrix stacks and the combined modelview-projection matrix.

void _mesa_free_viewport_data GLcontext   ctx
 

Free the context viewport attribute group data.

Parameters:
ctx  GL context.
Todo:
Move this to a new file with other 'viewport' routines.

void GLAPIENTRY _mesa_Frustum GLdouble    left,
GLdouble    right,
GLdouble    bottom,
GLdouble    top,
GLdouble    nearval,
GLdouble    farval
 

Apply a perspective projection matrix.

Parameters:
left  left clipping plane coordinate.
right  right clipping plane coordinate.
bottom  bottom clipping plane coordinate.
top  top clipping plane coordinate.
nearval  distance to the near clipping plane.
farval  distance to the far clipping plane.
See also:
glFrustum().
Flushes vertices and validates parameters. Calls _math_matrix_frustum() with the top matrix of the current matrix stack and sets __GLcontextRec::NewState.

void _mesa_init_matrix GLcontext   ctx
 

Initialize the context matrix data.

Parameters:
ctx  GL context.
Initializes each of the matrix stacks and the combined modelview-projection matrix.

void _mesa_init_transform GLcontext   ctx
 

Initialize the context transform attribute group.

Parameters:
ctx  GL context.
Todo:
Move this to a new file with other 'transform' routines.

void _mesa_init_viewport GLcontext   ctx
 

Initialize the context viewport attribute group.

Parameters:
ctx  GL context.
Todo:
Move this to a new file with other 'viewport' routines.

void GLAPIENTRY _mesa_LoadIdentity void   
 

Replace the current matrix with the identity matrix.

See also:
glLoadIdentity().
Flushes the vertices and calls _math_matrix_set_identity() with the top-most matrix in the current stack. Marks __GLcontextRec::NewState with the stack dirty flag.

void GLAPIENTRY _mesa_LoadMatrixd const GLdouble *    m
 

void GLAPIENTRY _mesa_LoadMatrixf const GLfloat *    m
 

Replace the current matrix with a given matrix.

Parameters:
m  matrix.
See also:
glLoadMatrixf().
Flushes the vertices and calls _math_matrix_loadf() with the top-most matrix in the current stack and the given matrix. Marks __GLcontextRec::NewState with the dirty stack flag.

void GLAPIENTRY _mesa_LoadTransposeMatrixdARB const GLdouble *    m
 

void GLAPIENTRY _mesa_LoadTransposeMatrixfARB const GLfloat *    m
 

void GLAPIENTRY _mesa_MatrixMode GLenum    mode
 

Set the current matrix stack.

Parameters:
mode  matrix stack.
See also:
glMatrixMode().
Flushes the vertices, validates the parameter and updates __GLcontextRec::CurrentStack and gl_transform_attrib::MatrixMode with the specified matrix stack.

void GLAPIENTRY _mesa_MultMatrixd const GLdouble *    m
 

void GLAPIENTRY _mesa_MultMatrixf const GLfloat *    m
 

Multiply the current matrix with a given matrix.

Parameters:
m  matrix.
See also:
glMultMatrixf().
Flushes the vertices and calls _math_matrix_mul_floats() with the top-most matrix in the current stack and the given matrix. Marks __GLcontextRec::NewState with the dirty stack flag.

void GLAPIENTRY _mesa_MultTransposeMatrixdARB const GLdouble *    m
 

void GLAPIENTRY _mesa_MultTransposeMatrixfARB const GLfloat *    m
 

void GLAPIENTRY _mesa_Ortho GLdouble    left,
GLdouble    right,
GLdouble    bottom,
GLdouble    top,
GLdouble    nearval,
GLdouble    farval
 

Apply an orthographic projection matrix.

Parameters:
left  left clipping plane coordinate.
right  right clipping plane coordinate.
bottom  bottom clipping plane coordinate.
top  top clipping plane coordinate.
nearval  distance to the near clipping plane.
farval  distance to the far clipping plane.
See also:
glOrtho().
Flushes vertices and validates parameters. Calls _math_matrix_ortho() with the top matrix of the current matrix stack and sets __GLcontextRec::NewState.

void GLAPIENTRY _mesa_PopMatrix void   
 

Pop the current matrix stack.

See also:
glPopMatrix().
Flushes the vertices, verifies the current matrix stack is not empty, and moves the stack head down. Marks __GLcontextRec::NewState with the dirty stack flag.

void GLAPIENTRY _mesa_PushMatrix void   
 

Push the current matrix stack.

See also:
glPushMatrix().
Verifies the current matrix stack is not full, and duplicates the top-most matrix in the stack. Marks __GLcontextRec::NewState with the stack dirty flag.

void GLAPIENTRY _mesa_Rotated GLdouble    angle,
GLdouble    x,
GLdouble    y,
GLdouble    z
 

void GLAPIENTRY _mesa_Rotatef GLfloat    angle,
GLfloat    x,
GLfloat    y,
GLfloat    z
 

Multiply the current matrix with a rotation matrix.

Parameters:
angle  angle of rotation, in degrees.
x  rotation vector x coordinate.
y  rotation vector y coordinate.
z  rotation vector z coordinate.
See also:
glRotatef().
Flushes the vertices and calls _math_matrix_rotate() with the top-most matrix in the current stack and the given parameters. Marks __GLcontextRec::NewState with the dirty stack flag.

void GLAPIENTRY _mesa_Scaled GLdouble    x,
GLdouble    y,
GLdouble    z
 

void GLAPIENTRY _mesa_Scalef GLfloat    x,
GLfloat    y,
GLfloat    z
 

Multiply the current matrix with a general scaling matrix.

Parameters:
x  x axis scale factor.
y  y axis scale factor.
z  z axis scale factor.
See also:
glScalef().
Flushes the vertices and calls _math_matrix_scale() with the top-most matrix in the current stack and the given parameters. Marks __GLcontextRec::NewState with the dirty stack flag.

void _mesa_set_viewport GLcontext   ctx,
GLint    x,
GLint    y,
GLsizei    width,
GLsizei    height
 

Set new viewport parameters and update derived state (the _WindowMap matrix).

Usually called from _mesa_Viewport().

Note:
We also call _mesa_ResizeBuffersMESA() because this is a good time to check if the window has been resized. Many device drivers can't get direct notification from the window system of size changes so this is an ad-hoc solution to that problem.
Parameters:
ctx  GL context.
x, y  coordinates of the lower left corner of the viewport rectangle.
width  width of the viewport rectangle.
height  height of the viewport rectangle.
Verifies the parameters, clamps them to the implementation dependent range and updates __GLcontextRec::Viewport. Computes the scale and bias values for the drivers and notifies the driver via the dd_function_table::Viewport callback.

void GLAPIENTRY _mesa_Translated GLdouble    x,
GLdouble    y,
GLdouble    z
 

void GLAPIENTRY _mesa_Translatef GLfloat    x,
GLfloat    y,
GLfloat    z
 

Multiply the current matrix with a general scaling matrix.

Parameters:
x  translation vector x coordinate.
y  translation vector y coordinate.
z  translation vector z coordinate.
See also:
glTranslatef().
Flushes the vertices and calls _math_matrix_translate() with the top-most matrix in the current stack and the given parameters. Marks __GLcontextRec::NewState with the dirty stack flag.

void _mesa_update_modelview_project GLcontext   ctx,
GLuint    newstate
 

Updates the combined modelview-projection matrix.

Parameters:
ctx  GL context.
new_state  new state bit mask.
If there is a new model view matrix then analyzes it. If there is a new projection matrix, updates it. Finally calls calculate_model_project_matrix() to recalculate the modelview-projection matrix.

void GLAPIENTRY _mesa_Viewport GLint    x,
GLint    y,
GLsizei    width,
GLsizei    height
 

Set the viewport.

Parameters:
x, y  coordinates of the lower-left corner of the viewport rectangle.
width  width of the viewport rectangle.
height  height of the viewport rectangle.
See also:
Called via glViewport() or display list execution.
Flushes the vertices and calls _mesa_set_viewport() with the given parameters.


Generated on Sun May 16 15:55:12 2004 for Mesa Core by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001