java.lang.Object | |
↳ | android.opengl.GLU |
A set of GL utilities inspired by the OpenGL Utility Toolkit.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Return an error string from a GL or GLU error code.
| |||||||||||
Define a viewing transformation in terms of an eye point, a center of
view, and an up vector.
| |||||||||||
Set up a 2D orthographic projection matrix
| |||||||||||
Set up a perspective projection matrix
| |||||||||||
Map object coordinates into window coordinates.
| |||||||||||
Map window coordinates to object coordinates.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Return an error string from a GL or GLU error code.
error | - a GL or GLU error code. |
---|
Define a viewing transformation in terms of an eye point, a center of view, and an up vector.
gl | a GL10 interface |
---|---|
eyeX | eye point X |
eyeY | eye point Y |
eyeZ | eye point Z |
centerX | center of view X |
centerY | center of view Y |
centerZ | center of view Z |
upX | up vector X |
upY | up vector Y |
upZ | up vector Z |
Set up a 2D orthographic projection matrix
Set up a perspective projection matrix
gl | a GL10 interface |
---|---|
fovy | specifies the field of view angle, in degrees, in the Y direction. |
aspect | specifies the aspect ration that determins the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height). |
zNear | specifies the distance from the viewer to the near clipping plane (always positive). |
zFar | specifies the distance from the viewer to the far clipping plane (always positive). |
Map object coordinates into window coordinates. gluProject transforms the specified object coordinates into window coordinates using model, proj, and view. The result is stored in win.
Note that you can use the OES_matrix_get extension, if present, to get the current modelView and projection matrices.
objX | object coordinates X |
---|---|
objY | object coordinates Y |
objZ | object coordinates Z |
model | the current modelview matrix |
modelOffset | the offset into the model array where the modelview maxtrix data starts. |
project | the current projection matrix |
projectOffset | the offset into the project array where the project matrix data starts. |
view | the current view, {x, y, width, height} |
viewOffset | the offset into the view array where the view vector data starts. |
win | the output vector {winX, winY, winZ}, that returns the computed window coordinates. |
winOffset | the offset into the win array where the win vector data starts. |
Map window coordinates to object coordinates. gluUnProject maps the specified window coordinates into object coordinates using model, proj, and view. The result is stored in obj.
Note that you can use the OES_matrix_get extension, if present, to get the current modelView and projection matrices.
winX | window coordinates X |
---|---|
winY | window coordinates Y |
winZ | window coordinates Z |
model | the current modelview matrix |
modelOffset | the offset into the model array where the modelview maxtrix data starts. |
project | the current projection matrix |
projectOffset | the offset into the project array where the project matrix data starts. |
view | the current view, {x, y, width, height} |
viewOffset | the offset into the view array where the view vector data starts. |
obj | the output vector {objX, objY, objZ}, that returns the computed object coordinates. |
objOffset | the offset into the obj array where the obj vector data starts. |