|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectandroid.opengl.GLU
public class GLU
A set of GL utilities inspired by the OpenGL Utility Toolkit.
| Constructor Summary | |
|---|---|
GLU()
|
|
| Method Summary | |
|---|---|
static String |
gluErrorString(int error)
Return an error string from a GL or GLU error code. |
static void |
gluLookAt(GL10 gl,
float eyeX,
float eyeY,
float eyeZ,
float centerX,
float centerY,
float centerZ,
float upX,
float upY,
float upZ)
Define a viewing transformation in terms of an eye point, a center of view, and an up vector. |
static void |
gluOrtho2D(GL10 gl,
float left,
float right,
float bottom,
float top)
Set up a 2D orthographic projection matrix |
static void |
gluPerspective(GL10 gl,
float fovy,
float aspect,
float zNear,
float zFar)
Set up a perspective projection matrix |
static int |
gluProject(float objX,
float objY,
float objZ,
float[] model,
int modelOffset,
float[] project,
int projectOffset,
int[] view,
int viewOffset,
float[] win,
int winOffset)
Map object coordinates into window coordinates. |
static int |
gluUnProject(float winX,
float winY,
float winZ,
float[] model,
int modelOffset,
float[] project,
int projectOffset,
int[] view,
int viewOffset,
float[] obj,
int objOffset)
Map window coordinates to object coordinates. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GLU()
| Method Detail |
|---|
public static String gluErrorString(int error)
error - - a GL or GLU error code.
public static void gluLookAt(GL10 gl,
float eyeX,
float eyeY,
float eyeZ,
float centerX,
float centerY,
float centerZ,
float upX,
float upY,
float upZ)
gl - a GL10 interfaceeyeX - eye point XeyeY - eye point YeyeZ - eye point ZcenterX - center of view XcenterY - center of view YcenterZ - center of view ZupX - up vector XupY - up vector YupZ - up vector Z
public static void gluOrtho2D(GL10 gl,
float left,
float right,
float bottom,
float top)
gl - left - right - bottom - top -
public static void gluPerspective(GL10 gl,
float fovy,
float aspect,
float zNear,
float zFar)
gl - a GL10 interfacefovy - 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).
public static int gluProject(float objX,
float objY,
float objZ,
float[] model,
int modelOffset,
float[] project,
int projectOffset,
int[] view,
int viewOffset,
float[] win,
int winOffset)
Note that you can use the OES_matrix_get extension, if present, to get the current modelView and projection matrices.
objX - object coordinates XobjY - object coordinates YobjZ - object coordinates Zmodel - the current modelview matrixmodelOffset - the offset into the model array where the modelview
maxtrix data starts.project - the current projection matrixprojectOffset - 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.
public static int gluUnProject(float winX,
float winY,
float winZ,
float[] model,
int modelOffset,
float[] project,
int projectOffset,
int[] view,
int viewOffset,
float[] obj,
int objOffset)
Note that you can use the OES_matrix_get extension, if present, to get the current modelView and projection matrices.
winX - window coordinates XwinY - window coordinates YwinZ - window coordinates Zmodel - the current modelview matrixmodelOffset - the offset into the model array where the modelview
maxtrix data starts.project - the current projection matrixprojectOffset - 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.
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||