PSPSDK 2024-12-16
Loading...
Searching...
No Matches
pspgum.h File Reference
#include <psptypes.h>
Include dependency graph for pspgum.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void sceGumDrawArray (int prim, int vtype, int count, const void *indices, const void *vertices)
 
void sceGumDrawArrayN (int prim, int vtype, int count, int a3, const void *indices, const void *vertices)
 
void sceGumDrawBezier (int vtype, int ucount, int vcount, const void *indices, const void *vertices)
 
void sceGumDrawSpline (int vtype, int ucount, int vcount, int uedge, int vedge, const void *indices, const void *vertices)
 
void sceGumLoadIdentity (void)
 Load identity matrix.
 
void sceGumLoadMatrix (const ScePspFMatrix4 *m)
 Load matrix.
 
void sceGumLookAt (ScePspFVector3 *eye, ScePspFVector3 *center, ScePspFVector3 *up)
 
void sceGumMatrixMode (int mode)
 Select which matrix stack to operate on.
 
void sceGumMultMatrix (const ScePspFMatrix4 *m)
 Multiply current matrix with input.
 
void sceGumOrtho (float left, float right, float bottom, float top, float near, float far)
 Apply ortho projection matrix.
 
void sceGumPerspective (float fovy, float aspect, float near, float far)
 Apply perspective projection matrix.
 
void sceGumPopMatrix (void)
 Pop matrix from stack.
 
void sceGumPushMatrix (void)
 Push current matrix onto stack.
 
void sceGumRotateX (float angle)
 Rotate around the X axis.
 
void sceGumRotateY (float angle)
 Rotate around the Y axis.
 
void sceGumRotateZ (float angle)
 Rotate around the Z axis.
 
void sceGumRotateXYZ (const ScePspFVector3 *v)
 Rotate around all 3 axis in order X, Y, Z.
 
void sceGumRotateZYX (const ScePspFVector3 *v)
 Rotate around all 3 axis in order Z, Y, X.
 
void sceGumScale (const ScePspFVector3 *v)
 Scale matrix.
 
void sceGumStoreMatrix (ScePspFMatrix4 *m)
 Store current matrix in the stack.
 
void sceGumTranslate (const ScePspFVector3 *v)
 Translate coordinate system.
 
void sceGumUpdateMatrix (void)
 Explicitly flush dirty matrices to the hardware.
 
void sceGumFullInverse ()
 Invert 4x4 matrix.
 
void sceGumFastInverse ()
 Invert orthonogal 4x4 matrix.
 
void sceGumBeginObject (int vtype, int count, const void *indices, const void *vertices)
 Stack-aware version of sceGuBeginObject() (look in pspgu.h for description)
 
void sceGumEndObject ()
 Stack-aware version of sceGuEndObject()
 
void gumInit (void)
 
void gumLoadIdentity (ScePspFMatrix4 *m)
 Load matrix with identity.
 
void gumLoadMatrix (ScePspFMatrix4 *r, const ScePspFMatrix4 *a)
 
void gumLookAt (ScePspFMatrix4 *m, ScePspFVector3 *eye, ScePspFVector3 *center, ScePspFVector3 *up)
 
void gumMultMatrix (ScePspFMatrix4 *result, const ScePspFMatrix4 *a, const ScePspFMatrix4 *b)
 
void gumOrtho (ScePspFMatrix4 *m, float left, float right, float bottom, float top, float near, float far)
 
void gumPerspective (ScePspFMatrix4 *m, float fovy, float aspect, float near, float far)
 
void gumRotateX (ScePspFMatrix4 *m, float angle)
 
void gumRotateXYZ (ScePspFMatrix4 *m, const ScePspFVector3 *v)
 
void gumRotateY (ScePspFMatrix4 *m, float angle)
 
void gumRotateZ (ScePspFMatrix4 *m, float angle)
 
void gumRotateZYX (ScePspFMatrix4 *m, const ScePspFVector3 *v)
 
void gumScale (ScePspFMatrix4 *m, const ScePspFVector3 *v)
 
void gumTranslate (ScePspFMatrix4 *m, const ScePspFVector3 *v)
 
void gumFullInverse (ScePspFMatrix4 *r, const ScePspFMatrix4 *a)
 
void gumFastInverse (ScePspFMatrix4 *r, const ScePspFMatrix4 *a)
 Invert orthonogal 4x4 matrix.
 
void gumCrossProduct (ScePspFVector3 *r, const ScePspFVector3 *a, const ScePspFVector3 *b)
 
float gumDotProduct (const ScePspFVector3 *a, const ScePspFVector3 *b)
 
void gumNormalize (ScePspFVector3 *v)
 

Function Documentation

◆ gumCrossProduct()

void gumCrossProduct ( ScePspFVector3 r,
const ScePspFVector3 a,
const ScePspFVector3 b 
)

◆ gumDotProduct()

float gumDotProduct ( const ScePspFVector3 a,
const ScePspFVector3 b 
)

◆ gumFastInverse()

void gumFastInverse ( ScePspFMatrix4 r,
const ScePspFMatrix4 a 
)

Invert orthonogal 4x4 matrix.

Note that the matrix in the stack has to be orthonogal (that is, all rotational axises must be unit length & orthonogal against the others), otherwise the result of the function cannot be depended on. If you need to invert a matrix that is not orthonogal, use gumFullInverse().

Parameters
r- Matrix receiving result
a- Orthonogal matrix that is to be inverted

◆ gumFullInverse()

void gumFullInverse ( ScePspFMatrix4 r,
const ScePspFMatrix4 a 
)

◆ gumInit()

void gumInit ( void  )

◆ gumLoadIdentity()

void gumLoadIdentity ( ScePspFMatrix4 m)

Load matrix with identity.

Parameters
m- Matrix to load with identity

◆ gumLoadMatrix()

void gumLoadMatrix ( ScePspFMatrix4 r,
const ScePspFMatrix4 a 
)

◆ gumLookAt()

void gumLookAt ( ScePspFMatrix4 m,
ScePspFVector3 eye,
ScePspFVector3 center,
ScePspFVector3 up 
)

◆ gumMultMatrix()

void gumMultMatrix ( ScePspFMatrix4 result,
const ScePspFMatrix4 a,
const ScePspFMatrix4 b 
)

◆ gumNormalize()

void gumNormalize ( ScePspFVector3 v)

◆ gumOrtho()

void gumOrtho ( ScePspFMatrix4 m,
float  left,
float  right,
float  bottom,
float  top,
float  near,
float  far 
)

◆ gumPerspective()

void gumPerspective ( ScePspFMatrix4 m,
float  fovy,
float  aspect,
float  near,
float  far 
)

◆ gumRotateX()

void gumRotateX ( ScePspFMatrix4 m,
float  angle 
)

◆ gumRotateXYZ()

void gumRotateXYZ ( ScePspFMatrix4 m,
const ScePspFVector3 v 
)

◆ gumRotateY()

void gumRotateY ( ScePspFMatrix4 m,
float  angle 
)

◆ gumRotateZ()

void gumRotateZ ( ScePspFMatrix4 m,
float  angle 
)

◆ gumRotateZYX()

void gumRotateZYX ( ScePspFMatrix4 m,
const ScePspFVector3 v 
)

◆ gumScale()

void gumScale ( ScePspFMatrix4 m,
const ScePspFVector3 v 
)

◆ gumTranslate()

void gumTranslate ( ScePspFMatrix4 m,
const ScePspFVector3 v 
)

◆ sceGumBeginObject()

void sceGumBeginObject ( int  vtype,
int  count,
const void indices,
const void vertices 
)

Stack-aware version of sceGuBeginObject() (look in pspgu.h for description)

Note
NOT YET IMPLEMENTED
Parameters
vtype- Vertex type to process
count- Number of vertices to test
indices- Optional index-list
vertices- Vertex-list

◆ sceGumDrawArray()

void sceGumDrawArray ( int  prim,
int  vtype,
int  count,
const void indices,
const void vertices 
)

◆ sceGumDrawArrayN()

void sceGumDrawArrayN ( int  prim,
int  vtype,
int  count,
int  a3,
const void indices,
const void vertices 
)

◆ sceGumDrawBezier()

void sceGumDrawBezier ( int  vtype,
int  ucount,
int  vcount,
const void indices,
const void vertices 
)

◆ sceGumDrawSpline()

void sceGumDrawSpline ( int  vtype,
int  ucount,
int  vcount,
int  uedge,
int  vedge,
const void indices,
const void vertices 
)

◆ sceGumEndObject()

void sceGumEndObject ( )

Stack-aware version of sceGuEndObject()

Note
NOT YET IMPLEMENTED

◆ sceGumFastInverse()

void sceGumFastInverse ( )

Invert orthonogal 4x4 matrix.

Note that the matrix in the stack has to be orthonogal (that is, all rotational axises must be unit length & orthonogal against the others), otherwise the result of the function cannot be depended on. If you need to invert a matrix that is not orthonogal, use sceGumFullInverse().

◆ sceGumFullInverse()

void sceGumFullInverse ( )

Invert 4x4 matrix.

This invert algorithm can operate on matrices that are not orthongal (See sceGumFastInverse())

◆ sceGumLoadIdentity()

void sceGumLoadIdentity ( void  )

Load identity matrix.

[1 0 0 0] [0 1 0 0] [0 0 1 0] [0 0 0 1]

◆ sceGumLoadMatrix()

void sceGumLoadMatrix ( const ScePspFMatrix4 m)

Load matrix.

Parameters
m- Matrix to load into stack

◆ sceGumLookAt()

void sceGumLookAt ( ScePspFVector3 eye,
ScePspFVector3 center,
ScePspFVector3 up 
)

◆ sceGumMatrixMode()

void sceGumMatrixMode ( int  mode)

Select which matrix stack to operate on.

Available matrix modes are:

  • GU_PROJECTION
  • GU_VIEW
  • GU_MODEL
  • GU_TEXTURE
Parameters
mode- Matrix mode to use

◆ sceGumMultMatrix()

void sceGumMultMatrix ( const ScePspFMatrix4 m)

Multiply current matrix with input.

Parameters
m- Matrix to multiply stack with

◆ sceGumOrtho()

void sceGumOrtho ( float  left,
float  right,
float  bottom,
float  top,
float  near,
float  far 
)

Apply ortho projection matrix.

Note
The matrix loses its orthonogal status after executing this function.

◆ sceGumPerspective()

void sceGumPerspective ( float  fovy,
float  aspect,
float  near,
float  far 
)

Apply perspective projection matrix.

Note
The matrix loses its orthonogal status after executing this function.

◆ sceGumPopMatrix()

void sceGumPopMatrix ( void  )

Pop matrix from stack.

◆ sceGumPushMatrix()

void sceGumPushMatrix ( void  )

Push current matrix onto stack.

◆ sceGumRotateX()

void sceGumRotateX ( float  angle)

Rotate around the X axis.

Parameters
angle- Angle in radians

◆ sceGumRotateXYZ()

void sceGumRotateXYZ ( const ScePspFVector3 v)

Rotate around all 3 axis in order X, Y, Z.

Parameters
v- Pointer to vector containing angles

◆ sceGumRotateY()

void sceGumRotateY ( float  angle)

Rotate around the Y axis.

Parameters
angle- Angle in radians

◆ sceGumRotateZ()

void sceGumRotateZ ( float  angle)

Rotate around the Z axis.

Parameters
angle- Angle in radians

◆ sceGumRotateZYX()

void sceGumRotateZYX ( const ScePspFVector3 v)

Rotate around all 3 axis in order Z, Y, X.

Parameters
v- Pointer to vector containing angles

◆ sceGumScale()

void sceGumScale ( const ScePspFVector3 v)

Scale matrix.

Note
The matrix loses its orthonogal status after executing this function.

◆ sceGumStoreMatrix()

void sceGumStoreMatrix ( ScePspFMatrix4 m)

Store current matrix in the stack.

Parameters
m- Matrix to write result to

◆ sceGumTranslate()

void sceGumTranslate ( const ScePspFVector3 v)

Translate coordinate system.

Parameters
v- Translation coordinates

◆ sceGumUpdateMatrix()

void sceGumUpdateMatrix ( void  )

Explicitly flush dirty matrices to the hardware.