org.gwoptics.graphicsutils
Class graphicsUtils

java.lang.Object
  extended by org.gwoptics.graphicsutils.graphicsUtils

public class graphicsUtils
extends java.lang.Object

Contains an assortment of functions that can help with some trickier graphical problems.

Author:
Daniel Brown

Constructor Summary
graphicsUtils()
           
 
Method Summary
static float[] convertWorldToScreen(processing.core.PMatrix3D view, processing.core.PMatrix3D proj, processing.core.PVector vec, float width, float height)
          This function takes a 3D point and determines which pixels on the screen it maps too.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

graphicsUtils

public graphicsUtils()
Method Detail

convertWorldToScreen

public static float[] convertWorldToScreen(processing.core.PMatrix3D view,
                                           processing.core.PMatrix3D proj,
                                           processing.core.PVector vec,
                                           float width,
                                           float height)
This function takes a 3D point and determines which pixels on the screen it maps too. This has various uses such as overlays of 3D displays, or altering pixels using the pixel array around certain areas depending on object 3D position.

Parameters:
view - Camera view matrix
proj - Camera projection matrix
vec - 3D point to map to screen coordinates
width - width of viewport
height - height of viewport
Returns:
PVector with 2D screen coordinates in the X and Y component of the vector


processing library gwoptics by Daniel Brown and Andreas Freise. (c) 2009 onwards