org.gwoptics.graphicsutils
Class graphicsUtils
java.lang.Object
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
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 |
graphicsUtils
public graphicsUtils()
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 matrixproj
- Camera projection matrixvec
- 3D point to map to screen coordinateswidth
- width of viewportheight
- 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