public final class Interact2D
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static SimpleVector |
project3D2D(Camera camera,
FrameBuffer buffer,
SimpleVector vertex)
Projects a vertex from world space into screen space.
|
static SimpleVector |
project3D2D(Camera camera,
FrameBuffer buffer,
SimpleVector vertex,
SimpleVector toFill)
Projects a vertex from world space into screen space.
|
static SimpleVector |
projectCenter3D2D(Camera camera,
FrameBuffer buffer,
Object3D obj)
Gets the center of the object in screen-coordinates (2D) by transforming
and projecting it from 3D objectspace into 2D screenspace.
|
static SimpleVector |
projectCenter3D2D(FrameBuffer buffer,
Object3D obj)
Gets the center of the object in screen-coordinates (2D) by transforming
and projecting it from 3D objectspace into 2D screenspace.
|
static SimpleVector |
reproject2D3D(Camera camera,
FrameBuffer buffer,
int x,
int y)
Reprojects a 2D vector (a screen/framebuffer coordinate in most cases)
back into 3D.
|
static SimpleVector |
reproject2D3D(Camera camera,
FrameBuffer buffer,
int x,
int y,
float z)
Reprojects a 2D vector (a screen/framebuffer coordinate in most cases)
back into 3D with a given z (in 3D).
|
static SimpleVector |
reproject2D3D(Camera camera,
FrameBuffer buffer,
int x,
int y,
float z,
SimpleVector toFill)
Reprojects a 2D vector (a screen/framebuffer coordinate in most cases)
back into 3D with a given z (in 3D).
|
static SimpleVector |
reproject2D3D(Camera camera,
FrameBuffer buffer,
int x,
int y,
SimpleVector toFill)
Reprojects a 2D vector (a screen/framebuffer coordinate in most cases)
back into 3D.
|
static SimpleVector |
reproject2D3DWS(Camera camera,
FrameBuffer buffer,
int x,
int y)
Reprojects a 2D vector (a screen/framebuffer coordinate in most cases)
back into 3D (world space).
|
static SimpleVector |
reproject2D3DWS(Camera camera,
FrameBuffer buffer,
int x,
int y,
float z)
Reprojects a 2D vector (a screen/framebuffer coordinate in most cases)
back into 3D (world space).
|
static SimpleVector |
reproject2D3DWS(Camera camera,
FrameBuffer buffer,
int x,
int y,
float z,
SimpleVector toFill)
Reprojects a 2D vector (a screen/framebuffer coordinate in most cases)
back into 3D (world space).
|
static SimpleVector |
reproject2D3DWS(Camera camera,
FrameBuffer buffer,
int x,
int y,
SimpleVector toFill)
Reprojects a 2D vector (a screen/framebuffer coordinate in most cases)
back into 3D (world space).
|
public static SimpleVector reproject2D3D(Camera camera, FrameBuffer buffer, int x, int y)
camera - the camera used to render the scenebuffer - the framebuffer containing the rendered imagex - the x position in 2Dy - the y position in 2Dpublic static SimpleVector reproject2D3D(Camera camera, FrameBuffer buffer, int x, int y, SimpleVector toFill)
camera - the camera used to render the scenebuffer - the framebuffer containing the rendered imagex - the x position in 2Dy - the y position in 2DtoFill - a SimpleVector that will be filled with the resultpublic static SimpleVector reproject2D3DWS(Camera camera, FrameBuffer buffer, int x, int y)
camera - the camera used to render the scenebuffer - the framebuffer containing the rendered imagex - the x position in 2Dy - the y position in 2Dpublic static SimpleVector reproject2D3DWS(Camera camera, FrameBuffer buffer, int x, int y, SimpleVector toFill)
camera - the camera used to render the scenebuffer - the framebuffer containing the rendered imagex - the x position in 2Dy - the y position in 2DtoFill - a SimpleVector that will be filled with the resultpublic static SimpleVector reproject2D3DWS(Camera camera, FrameBuffer buffer, int x, int y, float z)
camera - the camera used to render the scenebuffer - the framebuffer containing the rendered imagex - the x position in 2Dy - the y position in 2Dz - the z position in camera spacepublic static SimpleVector reproject2D3DWS(Camera camera, FrameBuffer buffer, int x, int y, float z, SimpleVector toFill)
camera - the camera used to render the scenebuffer - the framebuffer containing the rendered imagex - the x position in 2Dy - the y position in 2Dz - the z position in camera spacetoFill - a SimpleVector that will be filled with the resultpublic static SimpleVector reproject2D3D(Camera camera, FrameBuffer buffer, int x, int y, float z)
camera - the camera used to render the scenebuffer - the framebuffer containing the rendered imagex - the x position in 2Dy - the y position in 2Dz - the z position of the "picking plane" (in camera space)public static SimpleVector reproject2D3D(Camera camera, FrameBuffer buffer, int x, int y, float z, SimpleVector toFill)
camera - the camera used to render the scenebuffer - the framebuffer containing the rendered imagex - the x position in 2Dy - the y position in 2Dz - the z position of the "picking plane" (in in camera space)toFill - a SimpleVector that will be filled with the resultpublic static SimpleVector project3D2D(Camera camera, FrameBuffer buffer, SimpleVector vertex)
camera - the Camera used for the projectionbuffer - the Framebuffervertex - the vertex in world spacepublic static SimpleVector project3D2D(Camera camera, FrameBuffer buffer, SimpleVector vertex, SimpleVector toFill)
camera - the Camera used for the projectionbuffer - the Framebuffervertex - the vertex in world spacetoFill - the SimpleVector that will be filled with the resultpublic static SimpleVector projectCenter3D2D(FrameBuffer buffer, Object3D obj)
buffer - the framebuffer the object will be (or has been) rendered intoobj - the object itselfpublic static SimpleVector projectCenter3D2D(Camera camera, FrameBuffer buffer, Object3D obj)
camera - the camera that represents the worldspace->cameraspace
transformation. The frontbuffer matrix of the camera will be
used. If the camera is null, the one from the object's World
will be used instead.buffer - the framebuffer the object will be (or has been) rendered intoobj - the object itself