29package com.jogamp.opengl.test.junit.math;
31import com.jogamp.junit.util.JunitTracer;
32import com.jogamp.opengl.glu.GLU;
34import org.junit.Assert;
36import org.junit.FixMethodOrder;
37import org.junit.runners.MethodSorters;
42@FixMethodOrder(MethodSorters.NAME_ASCENDING)
48 final int[] pickedPoint =
new int[]{400,300};
49 final double pickedPointDepth = 0;
50 final double[] sceneModelViewValues =
new double[]{1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1};
51 final double[] projectionValues =
new double[]{1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1};
52 final int[] viewport =
new int[]{0,0,800,600};
53 final double[] objCoords =
new double[]{Double.NaN,Double.NaN,Double.NaN};
54 glu.
gluUnProject(pickedPoint[0], pickedPoint[1], pickedPointDepth, sceneModelViewValues, 0, projectionValues, 0, viewport, 0, objCoords, 0);
55 Assert.assertTrue(!Double.isNaN(objCoords[0])&&!Double.isNaN(objCoords[1])&&!Double.isNaN(objCoords[2]));
58 public static void main(
final String args[]) {
Provides access to the OpenGL Utility Library (GLU).
boolean gluUnProject(float winX, float winY, float winZ, float[] model, int model_offset, float[] proj, int proj_offset, int[] view, int view_offset, float[] objPos, int objPos_offset)
Interface to C language function: GLint gluUnProject(GLdouble winX, GLdouble winY,...
static void main(final String args[])