OrthographicCamera and PerspectiveCamera.
| Modifier and Type | Field and Description |
|---|---|
| public final Matrix4 | combined
the combined projection and view matrix |
| public final Vector3 | direction
the unit length direction vector of the camera |
| public float | far
the far clipping plane distance, has to be positive |
| public final Frustum | frustum
the frustum |
| public final Matrix4 | invProjectionView
the inverse combined projection and view matrix |
| public float | near
the near clipping plane distance, has to be positive |
| public final Vector3 | position
the position of the camera |
| public final Matrix4 | projection
the projection matrix |
| private final Ray | |
| private final Vector3 | |
| public final Vector3 | up
the unit length up vector of the camera |
| public final Matrix4 | view
the view matrix |
| public float | viewportHeight
the viewport height |
| public float | viewportWidth
the viewport width |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Ray | Returns: the picking Ray.the coordinate of the bottom left corner of the viewport in glViewport coordinates. viewportX, float the coordinate of the bottom left corner of the viewport in glViewport coordinates. viewportY, float the width of the viewport in pixels viewportWidth, float the height of the viewport in pixels viewportHeight)Creates a picking |
| public Ray | Returns: the picking Ray.Creates a picking |
| public void | lookAt(float
the x-coordinate of the point to look at x, float the y-coordinate of the point to look at y, float the z-coordinate of the point to look at z)Recalculates the direction of the camera to look at the point (x, y, z). |
| public void | |
| public void | normalizeUp()
Normalizes the up vector by first calculating the right vector via a cross product between direction and up, and then recalculating the up vector via a cross product between right and direction. |
| public Vector3 | |
| public Vector3 | Returns: the mutated and projected worldCoordsVector3the coordinate of the bottom left corner of the viewport in glViewport coordinates. viewportX, float the coordinate of the bottom left corner of the viewport in glViewport coordinates. viewportY, float the width of the viewport in pixels viewportWidth, float the height of the viewport in pixels viewportHeight)Projects the |
| public void | rotate(float
the angle angle, float the x-component of the axis axisX, float the y-component of the axis axisY, float the z-component of the axis axisZ)Rotates the direction and up vector of this camera by the given angle around the given axis. |
| public void | |
| public void | |
| public void | rotate(final Quaternion
The quaternion quat)Rotates the direction and up vector of this camera by the given |
| public void | rotateAround(Vector3
the point to attach the axis to point, Vector3 the axis to rotate around axis, float the angle, in degrees angle)Rotates the direction and up vector of this camera by the given angle around the given axis, with the axis attached to given point. |
| public void | |
| public void | translate(float
the displacement on the x-axis x, float the displacement on the y-axis y, float the displacement on the z-axis z)Moves the camera by the given amount on each axis. |
| public void | |
| public Vector3 | Returns: the mutated and unprojected touchCoordsVector3the point in touch coordinates (origin top left) touchCoords, float the coordinate of the bottom left corner of the viewport in glViewport coordinates. viewportX, float the coordinate of the bottom left corner of the viewport in glViewport coordinates. viewportY, float the width of the viewport in pixels viewportWidth, float the height of the viewport in pixels viewportHeight)Function to translate a point given in touch coordinates to world space. |
| public Vector3 | |
| public abstract void | |
| public abstract void |
| combined | back to summary |
|---|---|
| public final Matrix4 combined the combined projection and view matrix | |
| direction | back to summary |
|---|---|
| public final Vector3 direction the unit length direction vector of the camera | |
| far | back to summary |
|---|---|
| public float far the far clipping plane distance, has to be positive | |
| frustum | back to summary |
|---|---|
| public final Frustum frustum the frustum | |
| invProjectionView | back to summary |
|---|---|
| public final Matrix4 invProjectionView the inverse combined projection and view matrix | |
| near | back to summary |
|---|---|
| public float near the near clipping plane distance, has to be positive | |
| position | back to summary |
|---|---|
| public final Vector3 position the position of the camera | |
| projection | back to summary |
|---|---|
| public final Matrix4 projection the projection matrix | |
| ray | back to summary |
|---|---|
| private final Ray ray | |
| tmpVec | back to summary |
|---|---|
| private final Vector3 tmpVec | |
| up | back to summary |
|---|---|
| public final Vector3 up the unit length up vector of the camera | |
| view | back to summary |
|---|---|
| public final Matrix4 view the view matrix | |
| viewportHeight | back to summary |
|---|---|
| public float viewportHeight the viewport height | |
| viewportWidth | back to summary |
|---|---|
| public float viewportWidth the viewport width | |
| Camera | back to summary |
|---|---|
| public Camera() | |
| getPickRay | back to summary |
|---|---|
| public Ray getPickRay(float touchX, float touchY, float viewportX, float viewportY, float viewportWidth, float viewportHeight) Creates a picking
| |
| getPickRay | back to summary |
|---|---|
| public Ray getPickRay(float touchX, float touchY) Creates a picking
| |
| lookAt | back to summary |
|---|---|
| public void lookAt(float x, float y, float z) Recalculates the direction of the camera to look at the point (x, y, z). This function assumes the up vector is normalized.
| |
| lookAt | back to summary |
|---|---|
| public void lookAt(Vector3 target) Recalculates the direction of the camera to look at the point (x, y, z).
| |
| normalizeUp | back to summary |
|---|---|
| public void normalizeUp() Normalizes the up vector by first calculating the right vector via a cross product between direction and up, and then recalculating the up vector via a cross product between right and direction. | |
| project | back to summary |
|---|---|
| public Vector3 project(Vector3 worldCoords) Projects the | |
| project | back to summary |
|---|---|
| public Vector3 project(Vector3 worldCoords, float viewportX, float viewportY, float viewportWidth, float viewportHeight) Projects the
| |
| rotate | back to summary |
|---|---|
| public void rotate(float angle, float axisX, float axisY, float axisZ) Rotates the direction and up vector of this camera by the given angle around the given axis. The direction and up vector will not be orthogonalized.
| |
| rotate | back to summary |
|---|---|
| public void rotate(Vector3 axis, float angle) Rotates the direction and up vector of this camera by the given angle around the given axis. The direction and up vector will not be orthogonalized.
| |
| rotate | back to summary |
|---|---|
| public void rotate(final Matrix4 transform) Rotates the direction and up vector of this camera by the given rotation matrix. The direction and up vector will not be orthogonalized.
| |
| rotate | back to summary |
|---|---|
| public void rotate(final Quaternion quat) Rotates the direction and up vector of this camera by the given
| |
| rotateAround | back to summary |
|---|---|
| public void rotateAround(Vector3 point, Vector3 axis, float angle) Rotates the direction and up vector of this camera by the given angle around the given axis, with the axis attached to given point. The direction and up vector will not be orthogonalized. | |
| transform | back to summary |
|---|---|
| public void transform(final Matrix4 transform) Transform the position, direction and up vector by the given matrix
| |
| translate | back to summary |
|---|---|
| public void translate(float x, float y, float z) Moves the camera by the given amount on each axis.
| |
| translate | back to summary |
|---|---|
| public void translate(Vector3 vec) Moves the camera by the given vector.
| |
| unproject | back to summary |
|---|---|
| public Vector3 unproject(Vector3 touchCoords, float viewportX, float viewportY, float viewportWidth, float viewportHeight) Function to translate a point given in touch coordinates to world space. It's the same as GLU gluUnProject, but does not
rely on OpenGL. The x- and y-coordinate of vec are assumed to be in touch coordinates (origin is the top left corner, y
pointing down, x pointing to the right) as reported by the touch methods in
| |
| unproject | back to summary |
|---|---|
| public Vector3 unproject(Vector3 touchCoords) Function to translate a point given in touch coordinates to world space. It's the same as GLU gluUnProject but does not
rely on OpenGL. The viewport is assumed to span the whole screen and is fetched from | |
| update | back to summary |
|---|---|
| public abstract void update() Recalculates the projection and view matrix of this camera and the | |
| update | back to summary |
|---|---|
| public abstract void update(boolean updateFrustum) Recalculates the projection and view matrix of this camera and the | |