Graphics Reference
In-Depth Information
void ESUTIL_API
esPerspective
(ESMatrix *
result,
GLfloat
fovy,
GLfloat
aspect
GLfloat
nearZ,
GLfloat
farZ
)
Multiply matrix specified by
result
with a perspective projection
matrix and return new matrix in
result
. This function is provided as a
convenience to more easily create a perspective matrix than by directly
using
esFrustum
.
Parameters:
result
the input matrix
fovy
specifies the field of view in degrees, should be between
(0, 180)
aspect
the aspect ratio of the rendering window (e.g., width/height)
nearZ
,
farZ
specify the distances to the near and far depth clipping
planes; both distances must be positive
Returns:
The new matrix after the perspective projection matrix has been
multiplied is returned in
result
void ESUTIL_API
esOrtho
(ESMatrix *
result,
GLfloat
left,
GLfloat
right,
GLfloat
bottom,
GLfloat
top,
GLfloat
nearZ,
GLfloat
farZ
)
Multiply matrix specified by
result
with an orthographic projection
matrix and return new matrix in
result
.
Parameters:
result
the input matrix
left
,
right
specify the coordinates for the left and right clipping planes
bottom
,
top
specify the coordinates for the bottom and top clipping
planes
nearZ
,
farZ
specify the distances to the near and far depth clipping
planes; both
nearZ
and
farZ
can be positive or negative
Returns:
The new matrix after the orthographic projection matrix has been
multiplied is returned in
result