de.javagl.swogl.rendering
Class PickingRayComputerLWJGL

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

public class PickingRayComputerLWJGL
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() method has to be called after the GL modelview matrix has been set up to include the view transformation.


Constructor Summary
PickingRayComputerLWJGL()
          Creates a new PickingRayComputerLWJGL
 
Method Summary
 de.javagl.swogl.geometry.Ray computePickingRay(int x, int y)
           
 void update()
          Update this picking ray computer based on the state that is obtained from the current GL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PickingRayComputerLWJGL

public PickingRayComputerLWJGL()
Creates a new PickingRayComputerLWJGL

Method Detail

update

public void update()
Update this picking ray computer based on the state that is obtained from the current GL. This method should be called during each rendering pass, on the rendering thread.


computePickingRay

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