core | glapi | vbo | math | shader | swrast | swrast_setup | tnl | tnl_dd

matrix.h File Reference

#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.
void GLAPIENTRY _mesa_Ortho (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble nearval, GLdouble farval)
 Apply an orthographic projection matrix.
void GLAPIENTRY _mesa_PushMatrix (void)
 Push the current matrix stack.
void GLAPIENTRY _mesa_PopMatrix (void)
 Pop the current matrix stack.
void GLAPIENTRY _mesa_LoadIdentity (void)
 Replace the current matrix with the identity matrix.
void GLAPIENTRY _mesa_LoadMatrixf (const GLfloat *m)
 Replace the current matrix with a given matrix.
void GLAPIENTRY _mesa_LoadMatrixd (const GLdouble *m)
void GLAPIENTRY _mesa_MatrixMode (GLenum mode)
 Set the current matrix stack.
void GLAPIENTRY _mesa_MultMatrixf (const GLfloat *m)
 Multiply the current matrix with a given matrix.
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.
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.
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 translation matrix.
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 _mesa_init_matrix (GLcontext *ctx)
 Initialize the context matrix data.
void _mesa_init_transform (GLcontext *ctx)
 Initialize the context transform attribute group.
void _mesa_free_matrix_data (GLcontext *ctx)
 Free the context matrix data.
void _mesa_update_modelview_project (GLcontext *ctx, GLuint newstate)
 Updates the combined modelview-projection matrix.


Function Documentation

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 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 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 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 translation 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  new_state 
)

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.


Generated on Sun Sep 27 06:47:46 2009 for Mesa Main by  doxygen 1.5.4