de.javagl.swogl.rendering
Class PickingRayComputerShaderLWJGL

java.lang.Object
  extended by de.javagl.swogl.rendering.PickingRayComputerShaderLWJGL
All Implemented Interfaces:
de.javagl.swogl.PickingRayComputer

public class PickingRayComputerShaderLWJGL
extends java.lang.Object
implements de.javagl.swogl.PickingRayComputer

Implementation of a PickingRayComputer that obtains the information required for picking from the viewport and modelview and projection matrix of LWJGL.

Note that, in order to make this PickingRayComputer work properly, the update(Matrix4f, Matrix4f) method has to be called with the current camera- and projection matrix during each rendering pass.


Constructor Summary
PickingRayComputerShaderLWJGL()
          Creates a new PickingRayComputerShaderLWJGL
 
Method Summary
 de.javagl.swogl.geometry.Ray computePickingRay(int x, int y)
           
 void update(javax.vecmath.Matrix4f cameraMatrix, javax.vecmath.Matrix4f projectionMatrix)
          Update this picking ray computer with the given camera- and projection matrix.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PickingRayComputerShaderLWJGL

public PickingRayComputerShaderLWJGL()
Creates a new PickingRayComputerShaderLWJGL

Method Detail

update

public void update(javax.vecmath.Matrix4f cameraMatrix,
                   javax.vecmath.Matrix4f projectionMatrix)
Update this picking ray computer with the given camera- and projection matrix. This method should be called during each rendering pass, on the rendering thread.

Parameters:
cameraMatrix - The camera matrix (i.e. the inverse of the view matrix)
projectionMatrix - The projection matrix

computePickingRay

public de.javagl.swogl.geometry.Ray computePickingRay(int x,
                                                      int y)
Specified by:
computePickingRay in interface de.javagl.swogl.PickingRayComputer