public class View
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
Modelview |
modelview
ModelView
|
Projection |
projection
Projection
|
Viewport |
viewport
Viewport of the last reshape
|
| Constructor and Description |
|---|
View() |
View(Viewport viewport,
Projection projection,
Modelview modelview) |
| Modifier and Type | Method and Description |
|---|---|
Line |
getRayFromMouse(Line ray,
int x,
int y)
Ray starting a modelview position towards to direction pointed by the mouse (x,y)
coordinates within this
SceneView viewport. (0,0) is bottom left |
static boolean |
project(Vec3 obj,
Mat4x4 model,
Mat4x4 proj,
Viewport viewport,
Vec3 win) |
boolean |
project(Vec3 object,
Vec3 win) |
void |
set(View src) |
void |
setProjection(IGL gl)
|
void |
setViewport(IGL gl)
|
void |
setViewportAndProjection(IGL gl)
|
static boolean |
unProject(Mat4x4 model,
Mat4x4 proj,
Viewport viewport,
Vec3 win,
Vec3 obj) |
boolean |
unProject(Vec3 win,
Vec3 obj)
Equivalent to gluUnProject
|
public final Modelview modelview
public final Projection projection
public final Viewport viewport
public View()
public View(Viewport viewport, Projection projection, Modelview modelview)
public void set(View src)
public final void setViewport(IGL gl)
public final void setProjection(IGL gl)
public final void setViewportAndProjection(IGL gl)
public final Line getRayFromMouse(Line ray, int x, int y)
SceneView viewport. (0,0) is bottom leftray - destination to store resultx - position along horizontal axisy - position along vertical axispublic boolean unProject(Vec3 win, Vec3 obj)
sceneView - Specifies the scene which contains the modelview, projection and viewportwin - Specify the window coordinates to be mapped.obj - returns the computed object coordinatesunProject(Mat4x4, Mat4x4, Viewport, Vec3, Vec3)public static boolean unProject(Mat4x4 model, Mat4x4 proj, Viewport viewport, Vec3 win, Vec3 obj)
model - Specifies the modelview matrixproj - Specifies the projection matrixviewport - Specify the viewportwin - Specify the window coordinates to be mappedobj - returns the computed object coordinatesunProject(Vec3, Vec3)Bonzai Engine 1.4.1-20200831 - A Java OpenGL engine and tools for Windows/Mac/Linux/Android
Copyright © 2007-2019 Jérôme Jouvie bonzaiengine.com contact@bonzaiengine.com