public final class JCGLProjectionMatrices extends Object
| Modifier and Type | Method and Description |
|---|---|
static com.io7m.jtensors.core.unparameterized.matrices.Matrix4x4D |
frustumProjectionRH(double x_min,
double x_max,
double y_min,
double y_max,
double z_near,
double z_far)
Calculate a matrix that produces a perspective projection.
|
static <A,B> com.io7m.jtensors.core.parameterized.matrices.PMatrix4x4D<A,B> |
frustumProjectionRHP(double x_min,
double x_max,
double y_min,
double y_max,
double z_near,
double z_far)
Calculate a matrix that produces a perspective projection.
|
static com.io7m.jtensors.core.unparameterized.matrices.Matrix4x4D |
orthographicProjectionRH(double x_min,
double x_max,
double y_min,
double y_max,
double z_near,
double z_far)
Calculate a projection matrix that produces an orthographic projection
based on the given clipping plane coordinates.
|
static <A,B> com.io7m.jtensors.core.parameterized.matrices.PMatrix4x4D<A,B> |
orthographicProjectionRHP(double x_min,
double x_max,
double y_min,
double y_max,
double z_near,
double z_far)
Calculate a projection matrix that produces an orthographic projection
based on the given clipping plane coordinates.
|
static com.io7m.jtensors.core.unparameterized.matrices.Matrix4x4D |
perspectiveProjectionRH(double z_near,
double z_far,
double aspect,
double horizontal_fov)
Calculate a matrix that will produce a perspective projection based on
the given view frustum parameters, the aspect ratio of the viewport and a
given horizontal field of view in radians.
|
static <A,B> com.io7m.jtensors.core.parameterized.matrices.PMatrix4x4D<A,B> |
perspectiveProjectionRHP(double z_near,
double z_far,
double aspect,
double horizontal_fov)
Calculate a matrix that will produce a perspective projection based on
the given view frustum parameters, the aspect ratio of the viewport and a
given horizontal field of view in radians.
|
public static com.io7m.jtensors.core.unparameterized.matrices.Matrix4x4D frustumProjectionRH(double x_min,
double x_max,
double y_min,
double y_max,
double z_near,
double z_far)
Calculate a matrix that produces a perspective projection. The (x_min, y_min, z_near) and (x_max, y_max, z_near) parameters
specify the points on the near clipping plane that are mapped to the
lower-left and upper-right corners of the window, respectively, assuming
that the eye is located at (0, 0, 0). The z_far parameter
specifies the location of the far clipping plane.
Note that iff z_far >= Double.POSITIVE_INFINITY, the function
produces an "infinite projection matrix", suitable for use in code that
deals with shadow volumes.
The function assumes a right-handed coordinate system.
See GPU Gems
x_min - The minimum X clip planex_max - The maximum X clip planey_min - The minimum Y clip planey_max - The maximum Y clip planez_near - The near Z clip planez_far - The far Z clip planepublic static com.io7m.jtensors.core.unparameterized.matrices.Matrix4x4D orthographicProjectionRH(double x_min,
double x_max,
double y_min,
double y_max,
double z_near,
double z_far)
Calculate a projection matrix that produces an orthographic projection based on the given clipping plane coordinates.
The function assumes a right-handed coordinate system.
x_min - The left clipping plane coordinatex_max - The right clipping plane coordinatey_min - The bottom clipping plane coordinatey_max - The top clipping plane coordinatez_near - The near clipping plane coordinatez_far - The far clipping plane coordinatepublic static com.io7m.jtensors.core.unparameterized.matrices.Matrix4x4D perspectiveProjectionRH(double z_near,
double z_far,
double aspect,
double horizontal_fov)
Calculate a matrix that will produce a perspective projection based on
the given view frustum parameters, the aspect ratio of the viewport and a
given horizontal field of view in radians. Note that fov_radians
represents the full horizontal field of view: the angle at the base of the
triangle formed by the frustum on the x/z plane.
Note that iff z_far >= Double.POSITIVE_INFINITY, the
function produces an "infinite projection matrix", suitable for use in code
that deals with shadow volumes.
The function assumes a right-handed coordinate system.
See GPU Gems
z_near - The near clipping plane coordinatez_far - The far clipping plane coordinateaspect - The aspect ratio of the viewport; the width divided
by the height. For example, an aspect ratio of 2.0
indicates a viewport twice as wide as it is highhorizontal_fov - The horizontal field of view in radianspublic static <A,B> com.io7m.jtensors.core.parameterized.matrices.PMatrix4x4D<A,B> frustumProjectionRHP(double x_min,
double x_max,
double y_min,
double y_max,
double z_near,
double z_far)
Calculate a matrix that produces a perspective projection. The (x_min, y_min, z_near) and (x_max, y_max, z_near) parameters
specify the points on the near clipping plane that are mapped to the
lower-left and upper-right corners of the window, respectively, assuming
that the eye is located at (0, 0, 0). The z_far parameter
specifies the location of the far clipping plane.
Note that iff z_far >= Double.POSITIVE_INFINITY, the function
produces an "infinite projection matrix", suitable for use in code that
deals with shadow volumes.
The function assumes a right-handed coordinate system.
See GPU Gems
A - A phantom type parameter, possibly representing a source
coordinate systemB - A phantom type parameter, possibly representing a target
coordinate systemx_min - The minimum X clip planex_max - The maximum X clip planey_min - The minimum Y clip planey_max - The maximum Y clip planez_near - The near Z clip planez_far - The far Z clip planepublic static <A,B> com.io7m.jtensors.core.parameterized.matrices.PMatrix4x4D<A,B> orthographicProjectionRHP(double x_min,
double x_max,
double y_min,
double y_max,
double z_near,
double z_far)
Calculate a projection matrix that produces an orthographic projection based on the given clipping plane coordinates.
The function assumes a right-handed coordinate system.
A - A phantom type parameter, possibly representing a source
coordinate systemB - A phantom type parameter, possibly representing a target
coordinate systemx_min - The left clipping plane coordinatex_max - The right clipping plane coordinatey_min - The bottom clipping plane coordinatey_max - The top clipping plane coordinatez_near - The near clipping plane coordinatez_far - The far clipping plane coordinatepublic static <A,B> com.io7m.jtensors.core.parameterized.matrices.PMatrix4x4D<A,B> perspectiveProjectionRHP(double z_near,
double z_far,
double aspect,
double horizontal_fov)
Calculate a matrix that will produce a perspective projection based on
the given view frustum parameters, the aspect ratio of the viewport and a
given horizontal field of view in radians. Note that fov_radians
represents the full horizontal field of view: the angle at the base of the
triangle formed by the frustum on the x/z plane.
Note that iff z_far >= Double.POSITIVE_INFINITY, the
function produces an "infinite projection matrix", suitable for use in code
that deals with shadow volumes.
The function assumes a right-handed coordinate system.
See GPU Gems
A - A phantom type parameter, possibly representing a
source coordinate systemB - A phantom type parameter, possibly representing a
target coordinate systemz_near - The near clipping plane coordinatez_far - The far clipping plane coordinateaspect - The aspect ratio of the viewport; the width divided
by the height. For example, an aspect ratio of 2.0
indicates a viewport twice as wide as it is highhorizontal_fov - The horizontal field of view in radiansCopyright © 2017 <code@io7m.com> http://io7m.com