From a644d779ab19cb1d200ae4ba567b9c042c34b337 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 4 Oct 2012 00:34:56 +0200 Subject: Update PMVMatrix/GLMatrixFunc API doc and refine PMVMatrix update / get-Mvi/Mvit-Matrix operation. (Minor API change) Using bitmask for requested Mvi and Mvit matrices, same as dirty-bits to ease matching and update operation. Update of Mvi and Mvit will be performed only if it's dirty-bit and request-bit set within update(). The individual dirty bit is cleared only if it's matrix update is performed. Update is also issued at get-Mvi/Mvit-Matrix operations to ensure proper values w/o update call w/o clearing the modified-bits. update() returns true if the Mvi or Mvit matrix got updated _or_ one of the modified bits is set. update() clears the modified-bits. Adding explicit getModifiedBits() to get and clear it's state. Adding unit test. Lots of API docs .. --- src/jogl/classes/jogamp/opengl/ProjectFloat.java | 29 +++++++++++++++++++----- 1 file changed, 23 insertions(+), 6 deletions(-) (limited to 'src/jogl/classes/jogamp') diff --git a/src/jogl/classes/jogamp/opengl/ProjectFloat.java b/src/jogl/classes/jogamp/opengl/ProjectFloat.java index ce8405f74..b1ba1f89c 100644 --- a/src/jogl/classes/jogamp/opengl/ProjectFloat.java +++ b/src/jogl/classes/jogamp/opengl/ProjectFloat.java @@ -458,7 +458,7 @@ public class ProjectFloat { } /** - * Method gluProject + * Map object coordinates to window coordinates. * * @param objx * @param objy @@ -506,6 +506,9 @@ public class ProjectFloat { return true; } + /** + * Map object coordinates to window coordinates. + */ public boolean gluProject(float objx, float objy, float objz, FloatBuffer modelMatrix, FloatBuffer projMatrix, @@ -543,7 +546,7 @@ public class ProjectFloat { } /** - * Method gluProject + * Map object coordinates to window coordinates. * * @param objx * @param objy @@ -595,7 +598,7 @@ public class ProjectFloat { /** - * Method gluUnproject + * Map window coordinates to object coordinates. * * @param winx * @param winy @@ -651,6 +654,20 @@ public class ProjectFloat { } + /** + * Map window coordinates to object coordinates. + * + * @param winx + * @param winy + * @param winz + * @param modelMatrix + * @param projMatrix + * @param viewport + * @param viewport_offset + * @param obj_pos + * @param obj_pos_offset + * @return + */ public boolean gluUnProject(float winx, float winy, float winz, FloatBuffer modelMatrix, FloatBuffer projMatrix, @@ -695,7 +712,7 @@ public class ProjectFloat { } /** - * Method gluUnproject + * Map window coordinates to object coordinates. * * @param winx * @param winy @@ -754,7 +771,7 @@ public class ProjectFloat { /** - * Method gluUnproject4 + * Map window coordinates to object coordinates. * * @param winx * @param winy @@ -819,7 +836,7 @@ public class ProjectFloat { } /** - * Method gluUnproject4 + * Map window coordinates to object coordinates. * * @param winx * @param winy -- cgit v1.2.3