synergynetframework.jme.gfx
Class JMEGfxUtils

java.lang.Object
  extended by synergynetframework.jme.gfx.JMEGfxUtils

public class JMEGfxUtils
extends java.lang.Object

The Class JMEGfxUtils.


Constructor Summary
JMEGfxUtils()
           
 
Method Summary
static float distance(float x1, float x2, float y1, float y2)
          Distance.
static com.jme.math.Vector3f getCursorWoldCoorinatesOnPlane(com.jme.math.Vector2f cursorScreen, com.jme.scene.Spatial s, com.jme.math.Plane p)
          Gets the cursor wold coorinates on plane.
static com.jme.math.Vector3f getCursorWorldCoordinatesOnSpatialPlane(com.jme.math.Vector2f cursorScreen, com.jme.scene.Spatial s)
          Gets the cursor world coordinates on spatial plane.
static com.jme.math.Vector3f[] getWorldVertices(com.jme.scene.TriMesh m, int triangleIndex)
          Gets an array of the three vertices representing the triangle of the supplied mesh with the given triangle index, in WORLD coordinates.
static com.jme.math.Vector2f tableToScreen3f(java.awt.geom.Point2D.Float position)
          Table to screen3f.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JMEGfxUtils

public JMEGfxUtils()
Method Detail

distance

public static float distance(float x1,
                             float x2,
                             float y1,
                             float y2)
Distance.

Parameters:
x1 - the x1
x2 - the x2
y1 - the y1
y2 - the y2
Returns:
the float

getCursorWoldCoorinatesOnPlane

public static com.jme.math.Vector3f getCursorWoldCoorinatesOnPlane(com.jme.math.Vector2f cursorScreen,
                                                                   com.jme.scene.Spatial s,
                                                                   com.jme.math.Plane p)
Gets the cursor wold coorinates on plane.

Parameters:
cursorScreen - the cursor screen
s - the s
p - the p
Returns:
the cursor wold coorinates on plane

getCursorWorldCoordinatesOnSpatialPlane

public static com.jme.math.Vector3f getCursorWorldCoordinatesOnSpatialPlane(com.jme.math.Vector2f cursorScreen,
                                                                            com.jme.scene.Spatial s)
Gets the cursor world coordinates on spatial plane.

Parameters:
cursorScreen - the cursor screen
s - the s
Returns:
the cursor world coordinates on spatial plane

getWorldVertices

public static com.jme.math.Vector3f[] getWorldVertices(com.jme.scene.TriMesh m,
                                                       int triangleIndex)
Gets an array of the three vertices representing the triangle of the supplied mesh with the given triangle index, in WORLD coordinates.

Parameters:
m - the m
triangleIndex - the triangle index
Returns:
the world vertices

tableToScreen3f

public static com.jme.math.Vector2f tableToScreen3f(java.awt.geom.Point2D.Float position)
Table to screen3f.

Parameters:
position - the position
Returns:
the vector2f